Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
Hello,
In one of my usecase, I am trying to convert an abandoned checkout to a draft order. We want to automate this process so want to do it using flows.
Any suggestions on how to achieve that?
I tried to start a flow on abandoned checkout and then use "Create Draft Order" action. But an error comes when i run the flow. The error displays "order_id which is a required field is missing". Not sure what to put in order_id. Tried a few variables but nothing worked.
Solved! Go to the solution
This is an accepted solution.
I'm not familiar with a "Create draft order" action in Flow. You may be able to accomplish this with a Customer abandons checkout trigger followed by a Send Admin API request action that uses the draftOrderCreate mutation that populates the relevant fields using Liquid from the Customer and Abandonment objects returned by the trigger. In effect, you might be able to update draftOrder.lineItems with the details from Abandonment.products
This is an accepted solution.
I'm not familiar with a "Create draft order" action in Flow. You may be able to accomplish this with a Customer abandons checkout trigger followed by a Send Admin API request action that uses the draftOrderCreate mutation that populates the relevant fields using Liquid from the Customer and Abandonment objects returned by the trigger. In effect, you might be able to update draftOrder.lineItems with the details from Abandonment.products
Hello,
Thanks for your response. It is helpful and working for my use case.
Hello @RPiii ,
I have a small query in this flow. I implemented this this and it is working fine. But the only problem is that the shipping price in the draft order is not coming as expected. It is not the same as abandoned order.
Can you please let me know that which variable can i use in the liquid code to fetch the shipping price from abandoned order?
I tried a few variables but all of them have a blank value. I want to fetch the correct shipping amount for the draft order. Here, even if i hardcode it as "30.00", it comes as a $0.00 in draft order.
Input JSON (only the shipping part):
"shippingLine": {
"priceWithCurrency": {
"amount": 30.00,
"currencyCode": "USD"
},
"shippingRateHandle": "",
"title": ""
}
Basically, I am not able to figure out that in which field is the shipping price stored? I tried to map many fields but none of them returns the correct shipping amount.
Okay thank you. Do you suggest anything else if i need to retrieve shipping details and use it is createDraftOrder mutation?
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