[ { "version": 1, "label": "Gently Nudge customer with an email when they make orders without required Documents ", "trigger_type": [ "order_created" ], "object_type": "order", "app_id": "triggers", "settings": { "priority": 0, "condition_groups": { "1": { "conditions": { "2": { "field": "order.line_items.sku", "settings": { "multiple": "any", "operator": "contains_one", "value": "UTCM01, UTCM03, UTCM04", "long_value": "{% for sku in workflow_vars[\"sku_with_uploads\"].value|split(',') %}\r\n{{sku}}\r\n{% endfor %}", "token_object_type": "order", "condition_type": "AND" }, "weight": 999 }, "4": { "field": "order.twig_condition", "settings": { "title": "Check if the SKU has uploads", "value": "{% set skus = workflow_vars[\"sku_with_uploads\"].value|split(',') %}\r\n{% for line_item in order.line_items if skus|contains(line_item.sku) %}\r\n {% if line_item.properties[\"Uploaded file 1\"]|length<=0 and line_item.properties[\"Uploaded file 2\"]|length<=0 %}\r\n true \r\n {% endif %}\r\n{% endfor %}\r\n", "token_object_type": "order", "condition_type": "AND" }, "weight": 999 } }, "actions": { "1": { "type": "email", "settings": { "token_object_type": "order", "to": "[CLICK TO EDIT]", "cc": "", "bcc": "", "reply_to": "", "subject": "Document upload request for your recent order", "plain_text": "0", "body": "Hi {{ order.customer.first_name }},\r\n\r\n[CUSTOM MESSAGE FOR THE CUSTOMER GOES HERE]", "purpose": "transactional", "wait": "0", "cw_timezone": "America\/Bogota", "custom_wait": "", "run_once": 0 }, "weight": 999, "target_key": "order" } } } } }, "description": "The automation is fired when an order is raised, it checks the items orders against a pre-defined list of SKUs that should have an upload, and if they purchased any of them and did not include the SKU, the workflow sends out a gentle reminder to the customer asking them to resend the files. ", "variables": { "sku_with_uploads": { "label": "SKU with uploads", "machine_name": "sku_with_uploads", "type": "triggers_text", "settings": { "can_be_disabled": true, "disabled": false, "attributes": { "width": null, "bulk_ops_editable": 1, "input_instructions": "Add comma separated list of the SKU", "description": "", "options": "", "default_value": "" }, "weight": 8, "validations": [], "conditions": [] } } } } ]