[ { "label": "Cancel an order and notify by email if there is a billing & shipping mismatch.", "trigger_type": [ "order_created", "order_paid" ], "object_type": "order", "app_id": "triggers", "settings": { "priority": 0, "condition_groups": [ { "conditions": { "1": { "field": "order.line_items.fulfillment_service_object.requires_shipping_method", "settings": { "multiple": "any", "value": "true", "condition_type": "AND" }, "weight": 999 }, "2": { "field": "order.twig_condition", "settings": { "title": "Check if Billing Address is empty or it's not equal to Shipping Address", "value": "{% if format_address(order.billing_address, {format: 'html', country: true, company: false, phone: false})=='' or format_address(order.billing_address, {format: 'html', country: true, company: false, phone: false}) != format_address(order.shipping_address, {format: 'html', country: true, company: false, phone: false}) %}\r\n True\r\n{% endif %}", "token_browser": "{{ Browse Tokens }}", "token_object_type": "order", "condition_type": "AND" }, "weight": 999 } }, "actions": [ { "type": "order_cancel", "settings": { "wait": "0", "custom_wait": "", "reason": "fraud", "restock": 1, "notify_customer": 0 }, "weight": 999, "target_key": "order" }, { "type": "email", "settings": { "wait": "0", "run_once": 0, "custom_wait": "", "to": "{{ shop.email }}", "cc": "", "bcc": "", "reply_to": "", "subject": "{{ order.name }}: High Risk Order Cancelled ", "plain_text": "0", "body": "Hi there,\r\n\r\nJust a heads up, the Arigato app automatically cancelled this order because it was identified as a possible fraud.\r\n\r\n{{ shopify_admin_link(order, {resource: 'orders'}) }}", "token_object_type": "order" }, "weight": 999, "target_key": "order" }, { "type": "customer_add_tags", "settings": { "wait": "0", "custom_wait": "", "tags": "Possible Fraud", "token_object_type": "order" }, "weight": 999, "target_key": "order.customer" } ] }, { "conditions": { "1": { "field": "order.line_items.fulfillment_service_object.requires_shipping_method", "settings": { "multiple": "any", "value": "false", "condition_type": "AND" }, "weight": 999 }, "2": { "field": "order.twig_condition", "settings": { "title": "Check if Billing Address is empty", "value": "{% if format_address(order.billing_address, {format: 'html', country: true, company: false, phone: false})=='' %}\r\n True\r\n{% endif %}", "token_browser": "{{ Browse Tokens }}", "token_object_type": "order", "condition_type": "AND" }, "weight": 999 } }, "actions": { "1": { "type": "order_cancel", "settings": { "wait": "0", "custom_wait": "", "reason": "fraud", "restock": 1, "notify_customer": 0 }, "weight": 999, "target_key": "order" }, "2": { "type": "email", "settings": { "wait": "0", "run_once": 0, "custom_wait": "", "to": "{{ shop.email }}", "cc": "", "bcc": "", "reply_to": "", "subject": "{{ order.name }}: High Risk Order Cancelled ", "plain_text": "0", "body": "Hi there,\r\n\r\nJust a heads up, the Arigato app automatically cancelled this order because it was identified as a possible fraud.\r\n\r\n{{ shopify_admin_link(order, {resource: 'orders'}) }}", "token_object_type": "order" }, "weight": 1009, "target_key": "order" }, "3": { "type": "customer_add_tags", "settings": { "wait": "0", "custom_wait": "", "tags": "Possible Fraud", "token_object_type": "order" }, "weight": 1019, "target_key": "order.customer" } } } ], "shared_workflow_id": 29775 }, "description": "The workflow cancels any order that has a billing and shipping adress mismatch of the billing address is empty" } ]