Shopify Flow - Tagging orders with conversion source data

Shopify Flow - Tagging orders with conversion source data

Danny-KD
Tourist
8 1 6

Hello,

I have a flow setup, that upon order fulfilment, the order is tagged with the conversion source data. I.e. Google, Facebook, Email etc. When I view the orders, this data is present within the conversion section. However, it is not tagging the orders, the tags it creates are blank.

 

The flow is setup as:

When an order is fulfilled, check if the source is unknown/empty if so tag with 'Direct', otherwise tag with the following:

  • {{order.customerJourneySummary.lastVisit.utmParameters.source}}
  • {{order.customerJourneySummary.lastVisit.source}}
  • {{order.customerJourneySummary.lastVisit.sourceType}}

I would expect the first tag to sometimes be empty, but the second two should always be filled. Or the order would be tagged as Direct. Instead I'm getting some orders as Direct, some tagged as expected and some completely Empty. - Even though conversion data shows for the order.

Replies 7 (7)

G-L
Shopify Staff (Retired)
29 4 10

Hi, one thing that comes to mind is that customerJourneySummary does not instantly populate when an order happens but it can take even one day to populate; this might or might not be the issue given you are using a fulfillment trigger.

Another aspect would be to check how you are setting up a check for empty/unknown value which is a thing that could cause issue.

It would be great if you can share more details on the setup with a screenshot here or in a DM.

To learn more visit the Shopify Help Center or the Community Blog.

Danny-KD
Tourist
8 1 6

Thank you. The empty / unknown check is done in conjunction, rather than as a trigger/filter or pre step. See attached. Let me know which flow branch you'd like more detail on.

 

Shopify Flow v1.png

 

paul_n
Shopify Staff
1308 148 298

When you view that info in the UI, it's likely after Flow ran and checked for it. 

 

How are you checking for a null source? What does the workflow run look like? As G-L said most likely sometimes the customerJourneySummary is just blank, especially if it was fulfilled within a day of the order. You may need to add a wait step of up to a day to make this viable. 

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.
Danny-KD
Tourist
8 1 6

How do I add a wait function as I believe this will solve the issue, as our partners are fulfilling orders within 12 hours.

 

What's frustrating though, is the data is available at the order level at the time the order is received.

 

Checking for null seemed only possible by leaving the equals box empty. I then assumed, if no source data it was a direct visit.

 

null.png

 

 

paul_n
Shopify Staff
1308 148 298

The customerJourneySummary data may be available in one system, but there is a background process that handles making it accessible via API. This is outside Flow's control and works the same for everyone using it. 

 

Regarding the wait step, you can put the Wait step immediately after the trigger. Anything accessed after the wait step will be retrieved after the wait step is done. You could also check for empty and if so, run the Wait step and then make use of the value. The latter may take some trial and error to find the right wait value - I believe that the data is processed and made available overnight so 24 hours should be safe.

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.
Danny-KD
Tourist
8 1 6

Thanks, I've added a 1 day wait step in the hope this will help.

amanda-91
Shopify Partner
84 0 49

@Danny-KD If this flow is working with the wait step would you mind sharing the details of the steps' construction included in this flow so I can try to recreate it?