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
Hi! I'm trying to get flow to notify me in slack when an order is cancelled and the creation date of that cancelled order is the day before. I do get notified in slack for cancelled orders, but this includes orders that were created and cancelled in the same day.
Here's the query I'm using canceled_At:=' {{ 'now' }} ' AND created_At:=' {{ 'now' | date_minus : "1 days" }} '
Also attached screenshot of flow setup
Hi @jeanyLB 👋
I'm not sure why you're using this "Get order data" action as it will ignore the order returned by the "Order cancelled" trigger and instead return up to 100 orders that match your query. You might instead use a "Run code" action that compares the order.createdAt and order.cancelledAt values returned by the trigger.
I'm also not sure why you've configured the three following conditions in sequence as opposed to branching them to run in parallel. That might not make sense unless the tag values are mutually exclusive.
Hey @RPiii , I'm new to flow and don't have background in coding and stuff so I was going by other tutorials, that's why I used "Get order data". And for the same reason, I don't know how setup a Run code for this. Will you be able to guide me on this please?
And yes, the tags are mutually exclusive.
Can you help me understand the business logic here? You don't want to know if the order was cancelled the same day it was created, only if it was cancelled within the next day? What if it's cancelled after two or three days?
This flow is specifically for orders that are placed from third-party marketplaces--Shopee, Lazada, Tiktok. These marketplaces have a 24hr SLA, after which orders are automatically cancelled by their system if they remain unfulfilled in their respective marketplaces, so we manually fulfill these orders in there. And we only process orders for pick and pack + handover to 3PL the next day after order placement at around 2pm, when the tracking numbers for these orders are generated. Until then, we leave these marketplace orders unfulfilled, which also gives customers time to cancel from their side. So even if the orders are already being packed or have been handed over to our 3PL, since we don't get notified when customers cancel from the marketplace, there had been times where an order was still delivered even though customer was already refunded.
Hence only wanting to get notified for orders that was cancelled within the next day of creation.
Hmm, would something like this make sense?
This workflow works as follows:
If you need to send different Slack message for each marketplace you can create different conditions after the one that checks if the order was cancelled, as in your previous workflow.
Correct me if I'm wrong but with the wait option, if an order, for example, was created on 23:00 yesterday and customer cancelled the order from the marketplace at 13:00 today, the notification will only be sent at 23:00, which will then be too late as the order would have been handed over to our 3PL by 14:00. This is actually why I opted to use Order cancelled as trigger.
Gotcha, yeah that's likely what would happen. Given that, the approach that compares the order.createdAt and order.cancelledAt using a "Run code" action would be more immediate.
Unfortunately, I don't have the bandwidth to mock up that solution right now. There are a number of Shopify partners on this forum that may be able to help configure that for a nominal fee though.