[ { "label": "Send a coupon text message (SMS) when a customer is tagged", "trigger_type": [ "customer_updated" ], "object_type": "customer", "app_id": "triggers", "settings": { "priority": 0, "condition_groups": [ { "conditions": [ { "field": "customer.tags", "settings": { "operator": "contains", "value": "SEND_OFFER1", "long_value": "OFFER1", "condition_type": "AND" }, "weight": 999 }, { "field": "customer.tags", "settings": { "operator": "not_contains", "value": "OFFER1_SENT", "long_value": "OFFER1_SENT", "condition_type": "AND" }, "weight": 999 }, { "field": "customer.phone", "settings": { "operator": "not_empty", "value": "", "long_value": "", "condition_type": "AND" }, "weight": 999 } ], "actions": [ { "type": "customer_add_tags", "settings": { "wait": "0", "custom_wait": "", "tags": "OFFER1_SENT" }, "weight": 999, "target_key": "customer" }, { "type": "sms", "settings": { "wait": "0", "custom_wait": "", "to": "{{ customer.phone }}", "body": "Use code 123 to get X awesome deal at {{ shop.name }}" }, "weight": 999, "target_key": "customer" } ] } ], "shared_workflow_id": 767 }, "description": "This automation is fired every time a customer is updated, checks for a pre-defined tag, and if the tag exists, it sends a coupon SMS to the customer." } ]