[ { "version": 1, "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", "metafield_definition": null, "metafield_selection_type": "custom" }, "weight": 999 } }, "actions": { "1": { "type": "shopify_api_request", "settings": { "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": [], "twig": "{{ response | debug }}", "wait": "0", "cw_timezone": "America\/New_York", "custom_wait": "", "run_once": 0, "exported_workflow": { "version": 1, "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" } } } }, "subtopic": null } } }, "weight": 999, "target_key": "customer" } } } }, "subtopic": null, "source": "library" }, "description": "This automation will validate the customers VAT number saved as a metafield to the customer during creation. The workflow ensures the VAT number provided by the customer meets the necessary criteria, enhancing the accuracy and compliance of your store's tax-related data." } ]