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!
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024