[ { "label": "Tag orders with the source UTM attributes using GraphQL", "trigger_type": [ "order_created" ], "object_type": "order", "app_id": "triggers", "settings": { "priority": 50, "condition_groups": { "1": { "conditions": [], "actions": { "1": { "type": "shopify_graphql_request", "settings": { "token_object_type": "order", "query_wrapper": { "query": "{ order(id: \"gid:\/\/shopify\/Order\/{{order.id}}\") {\r\n customerJourneySummary{\r\n firstVisit{\r\n referrerUrl \r\n utmParameters{\r\n source\r\n }\r\n }\r\n }\r\n}\r\n}" }, "label": "Get order GraphQl", "query_type_mode_wrapper": { "query_type_mode": "graphql" }, "query_change_editor_wrapper": { "query_change_editor": "Use Twig Editor" }, "variables": "", "twig": "{% set source = response.data.order.customerJourneySummary.firstVisit.utmParameters.source %}\r\n{% do RUN_ACTION(\"order_add_tags\", {\r\n resource: order,\r\n tags: [source]\r\n}) %}", "wait": "0", "cw_timezone": "America\/New_York", "custom_wait": "", "run_once": 0 }, "weight": 999, "target_key": "order" } } } }, "shared_workflow_id": 240545 }, "description": "The workflow is fired when an order is created, it then fetches and tags the order with the source UTM attributes from the referrer URL using GraphQL" } ]