Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
Hello, I am trying to create an automation where customers who placed two or more orders in the past 3 hours would receive a notification. I would like to also let the customer know which are those two specific orders, say #1002 and #1001. My issue is that the last order will always be the triggering order. Thus:
{%- for getOrderData_item in getOrderData -%}
{{- getOrderData_item.name -}}
{%- endfor -%}
won't work, as it would return #1002 (from our example). Any ideas how I can reference the order from before last order?
Solved! Go to the solution
This is an accepted solution.
Maybe this?
{%- for getOrderData_item in getOrderData -%}
{{- getOrderData_item.name }}{% if forloop.first %} and {% endif -%}
{%- endfor -%}
I don't think this is an issue. The get order data will return both orders
That's true. However, it will always return both orders. What I was trying to achieve is to use them separately as values. For example, the desired result should be:
"Your last two orders are #1001 and #1002."
Currently it's returning: "#1001#1002"
This is an accepted solution.
Maybe this?
{%- for getOrderData_item in getOrderData -%}
{{- getOrderData_item.name }}{% if forloop.first %} and {% endif -%}
{%- endfor -%}
Hey 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, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024