flow

Triggers a Shopify Flow workflow with a custom payload. Use this tag to integrate DataJet scripts with Shopify Flow automations. The flow needs to be created in Shopify Flow and the trigger name needs to be: Event Payload Trigger V2.

Read more about DataJet and Shopify Flow here.

{% json my_payload %}
  {
    "customer_id": "{{ customer.id }}",
    "order_total": {{ order.total_price }},
    "action": "send_reward"
  }
{% endjson %}

{% flow payload: my_payload as result %}

{% if result.ok %}
  {% log "Flow triggered successfully" %}
{% else %}
  {% log "Failed to trigger flow" %}
{% endif %}

Syntax

{% flow payload: payload_variable as result_variable %}

Parameters

Parameter
Required
Description

payload

Yes

Object containing data to send to the Flow

Result Object

The result variable contains:

Property
Type
Description

ok

boolean

true if Flow was triggered successfully

body

object

Response body from Flow trigger (if any)

Flow Receives

When triggered, the Shopify Flow receives:

Field
Description

Script ID

The ID of the DataJet script

Script Handle

The handle of the DataJet script

Run ID

The current execution run ID

Payload

Your custom payload as JSON string

Use Cases

Trigger post-order processing:

Send customer data to Flow for segmentation:

Chain DataJet script with Flow actions:

Notes

  • Requires Shopify Flow to be installed and configured

  • Each flow trigger consumes 1 credit

  • Payload is automatically serialized to JSON

  • Use Shopify Flow to handle notifications, tagging, or other actions based on the payload

  • The Flow trigger uses DataJet's custom trigger "Event Payload Trigger V2"

Last updated