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!
As 2024 wraps up, the dropshipping landscape is already shifting towards 2025's trends....
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024In today’s interview, we sat down with @BSS-Commerce to discuss practical strategies f...
By JasonH Nov 13, 2024