Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
As below picures show, i'm trying to "Get Order Data", then "add order tags", when PaymentTerms -> PaymentSchedules of the order are less than or equal to 0. So i can know when the customer paid the overdue payment and how many days the customer delayed to pay.
Last time, i was told “ This can be done by adding a 'Get Order Data' step and using paymentSchedule.paymentTerms.order.id as the order_id in the query section. Next, they should iterate over the results and execute the 'Add Order Tags' step”.
I tried add "order_id:{{ paymentSchedule.paymentTerms.order.id }}, and / or
Thank u!!!
Solved! Go to the solution
This is an accepted solution.
Hi @EunorauEbikes,
The search syntax is:
id:{{someVariable.legacyResourceId}}
So that is how you should construct the query.
It would be worthwhile to add a Log Output step in the same branch as the Get Order Data action and set it as the same query string you're computing. This will let you know what the query looks like and you can continue to debug it. On the Order list page, you can copy + paste the output of the Log action into the query field -- it accepts the same syntax. It's possible that the query string is malformed or that some of the data does not exist. Debugging with the Log action is probably the best way to get to the bottom of what's happening.
Hope that helps!
This is an accepted solution.
You need to change the someVariable to the actual variables from the workflow. I was just providing the syntax, That's how it works for all Get data actions. More info can be found in the Shopify API Search Syntax docs, which should be linked from that action.
id:{{paymentSchedule.paymentTerms.order.legacyResourceId}}
This is an accepted solution.
Hi @EunorauEbikes,
The search syntax is:
id:{{someVariable.legacyResourceId}}
So that is how you should construct the query.
It would be worthwhile to add a Log Output step in the same branch as the Get Order Data action and set it as the same query string you're computing. This will let you know what the query looks like and you can continue to debug it. On the Order list page, you can copy + paste the output of the Log action into the query field -- it accepts the same syntax. It's possible that the query string is malformed or that some of the data does not exist. Debugging with the Log action is probably the best way to get to the bottom of what's happening.
Hope that helps!
Thanks u, i will try it, and others you said are valuable for me too.
An error here - ""someVariable" is invalid. Replace this variable."
This is an accepted solution.
You need to change the someVariable to the actual variables from the workflow. I was just providing the syntax, That's how it works for all Get data actions. More info can be found in the Shopify API Search Syntax docs, which should be linked from that action.
id:{{paymentSchedule.paymentTerms.order.legacyResourceId}}