[ { "label": "Customer Shipment Status - SMS \/ Text Twilio", "trigger_type": [ "fulfillment_updated" ], "object_type": "fulfillment", "app_id": "triggers", "settings": { "priority": 50, "condition_groups": { "1": { "conditions": { "1": { "field": "fulfillment.shipment_status", "settings": { "operator": "any", "value": { "in_transit": "in_transit", "confirmed": 0, "out_for_delivery": 0, "delivered": 0, "failure": 0 }, "condition_type": "AND" }, "weight": 999 } }, "actions": { "1": { "type": "twilio", "settings": { "token_object_type": "fulfillment", "to": "{{ fulfillment.order.shipping_address.phone }}", "body": "Your package from Guardian Baseball is now in transit. Track your package: {% for tracking_url in fulfillment.tracking_urls %}\r\n{{ tracking_url|raw }}\r\n{% endfor %}", "opt_out": "", "wait": "0", "cw_timezone": "America\/New_York", "custom_wait": "", "run_once": 0 }, "weight": 999, "target_key": "fulfillment" } } }, "2": { "conditions": { "1": { "field": "fulfillment.shipment_status", "settings": { "operator": "any", "value": { "out_for_delivery": "out_for_delivery", "confirmed": 0, "in_transit": 0, "delivered": 0, "failure": 0 }, "condition_type": "AND" }, "weight": 999 } }, "actions": { "1": { "type": "twilio", "settings": { "token_object_type": "fulfillment", "to": "{{ fulfillment.order.shipping_address.phone }}", "body": "Your package from Guardian Baseball is now out for delivery. It'll arrive any moment now, see tracking for more info {% for tracking_url in fulfillment.tracking_urls %}\r\n{{ tracking_url|raw }}\r\n{% endfor %}", "opt_out": "", "wait": "0", "cw_timezone": "America\/New_York", "custom_wait": "", "run_once": 0 }, "weight": 999, "target_key": "fulfillment" } } }, "3": { "conditions": { "1": { "field": "fulfillment.shipment_status", "settings": { "operator": "any", "value": { "delivered": "delivered", "confirmed": 0, "in_transit": 0, "out_for_delivery": 0, "failure": 0 }, "condition_type": "AND" }, "weight": 999 } }, "actions": { "1": { "type": "twilio", "settings": { "token_object_type": "fulfillment", "to": "{{ fulfillment.order.shipping_address.phone }}", "body": "Your package has been delivered! Thank you for shopping with Guardian Baseball! Enjoy your new gear and contact us if you need anything feel free to call or text us at (502) 200-1771", "opt_out": "", "wait": "0", "cw_timezone": "America\/New_York", "custom_wait": "", "run_once": 0 }, "weight": 999, "target_key": "fulfillment" } } }, "4": { "conditions": { "1": { "field": "fulfillment.shipment_status", "settings": { "operator": "any", "value": { "failure": "failure", "confirmed": 0, "in_transit": 0, "out_for_delivery": 0, "delivered": 0 }, "condition_type": "AND" }, "weight": 999 } }, "actions": { "1": { "type": "twilio", "settings": { "token_object_type": "fulfillment", "to": "{{ fulfillment.order.shipping_address.phone }}", "body": "Ugh. We tried to deliver your package but struck out. To learn what happened or to contact the courier, click here: {% for tracking_url in fulfillment.tracking_urls %}\r\n{{ tracking_url|raw }}\r\n{% endfor %}", "opt_out": "", "wait": "0", "cw_timezone": "America\/New_York", "custom_wait": "", "run_once": 0 }, "weight": 999, "target_key": "fulfillment" } } } }, "shared_workflow_id": 196733 }, "description": "The automation is fired every time a fulfillment is published and checking on the fulfillment, it then sends an SMS alerting the customer of their fulfillment details through Twilio SMS messges" } ]