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 -%}
In today’s interview, we sat down with @BSS-TekLabs to discuss practical strategies for...
By JasonH Nov 13, 2024The year-end shopping spree is around the corner! Is your online store ready for the ...
By JasonH Nov 10, 2024We recently spoke with Zopi developers @Zopi about how dropshipping businesses can enha...
By JasonH Oct 23, 2024