V1
Last updated
Last updated
Below documentation describes first version of DataJet / Shopify Flow Integration. As of 1st October 2024 V1 is deprecated. There is no need to migrate to V2.
DataJet is able to interact with flow either by sending data or receiving it from Shopify Flow.
To send data to Shopify Flow first you would need to create Flow with DataJet trigger.
Next you can proceed with creating a DataJet task that would use flow filter to send data to your flow. Your task can be any of the following:
Blank HTTP (useful when you want to process user submitted form from the frontend)
Blank Scheduled (when you need to perform any repetitive actions in your store)
Blank Input (when task is triggered by uploading CSV file to process)
Blank Event (triggered by any of the shops webhooks)
For the purpose of this example we are going to hardcode payload with customer id property.
Task could look like this:
Now lets add add a tag through flow to that customer. This is how our flow would look like:
When our task code is executed - customer with provided ID would be tagged with: test-flow-tag
Action Trigger is deprecated. Use Action Trigger V2 instead.
DataJet task can also be triggered by configured flow.
In such case first we need to create Blank HTTP task. This task has task id attached as last part of url.
In our case task id is: 61631513777e665dc57343db
Now we can create trigger in Shopify Flow. For that we are going to use flow we configured in previous example:
In Task ID field we need to provide DataJet task id. The complete flow would work as following:
First DataJet triggers Flow with customer id as payload
Flow adds customer tag
Flow triggers DataJet task
DataJet processes HTTP task
Here is sample code for the Blank HTTP task. This code only logs incoming Flow request to console. However we could for example further modify customer here by adding another tags.
request
is global object in all HTTP tasks. It contains incoming request data.