Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
On shopify flow i need to put dynamic content using liquid into a post request.
The logic specifically needs to be
If {{order.customerJourneySummary.lastVisit.referralCode}} exists, then use {{order.customerJourneySummary.lastVisit.referralCode}}. Else {{order.customerJourneySummary.firstVisit.referralCode}}
From my understanding if there is only one visit, only the firstvisit field is populated. We are trying to do last touch attribution which requires only the LAST referral code to be recorded. So this logic is necessary to ensure that if there is only one visit the post request still works.
Thanks in advance,
I also want to know how to solve this problem!
Hi WrdMax,
You should be able to write a regular if statement inside the HTTP request body, like
{% if order.customerJourneySummary.lastVisit.referralCode %}{{order.customerJourneySummary.lastVisit.referralCode}}{% else %}{{order.customerJourneySummary.firstVisit.referralCode}}{% endif %}
Just watch out for whitespace and quotes and stuff depending on how your request is being formatted.
Hope that helps!
User | RANK |
---|---|
3 | |
1 | |
1 | |
1 | |
1 |
On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023The year-end shopping season is just around the corner. Is a flash sale on your radar? Are...
By Jasonh Nov 6, 2023