[ { "label": "Validate the customer's EU Vat number", "trigger_type": [ "customer_created", "customer_updated" ], "object_type": "customer", "app_id": "triggers", "settings": { "priority": 0, "condition_groups": { "1": { "conditions": { "1": { "field": "customer.metafields", "settings": { "multiple": "any", "namespace": "c_f", "key": "vat_no", "operator": "not_empty", "value": "", "token_object_type": "customer", "condition_type": "AND" }, "weight": 999 } }, "actions": { "1": { "type": "shopify_api_request", "settings": { "wait": "0", "run_once": 0, "custom_wait": "", "label": "Validate the EU vat number using the apilayer.net", "method": "GET", "path": "http:\/\/www.apilayer.net\/api\/validate?access_key=[api-key]", "data": "{\r\n\"access_key\":[api-key],\r\n\"vat_number\": \"{{customer.metafields.c_f.vat_no.value }}\"\r\n}", "response_handle": "handle_response", "response_object_type": "", "parent_data": "", "workflow_actions": [], "token_object_type": "customer", "exported_workflow": { "label": "HTTP Response subworkflow", "trigger_type": [ "manual" ], "object_type": "http_response", "app_id": "triggers", "settings": { "priority": 0, "condition_groups": { "1": { "conditions": { "1": { "field": "http_response.json", "settings": { "multiple": "all", "name": "valid", "field_type": "boolean", "value": "true", "token_object_type": "http_response", "condition_type": "AND" }, "weight": 999 } }, "actions": { "1": { "type": "debug", "settings": { "wait": "0", "custom_wait": "", "action_label": "", "title": "", "body": "{{ http_response.json|debug }}", "token_object_type": "http_response" }, "weight": 999, "target_key": "http_response" } } } } } } }, "weight": 999, "target_key": "customer" } } } }, "shared_workflow_id": 45273 }, "description": "This automation will validate the customers VAT number saved as a metafield to the customer during creation." } ]