Create a flow for alerting when a certain vendor is not purchased from

littlewhimsy
Excursionist
17 0 10

Hi

 

We have a couple of drop ship vendors on our store and I am trying to create a flow where we are emailed if we have no orders for the vendors in a week as that indicates that they are not showing correctly on our website.

 

Thanks

Reply 1 (1)

paul_n
Shopify Staff
1056 136 250

There is a template that allows you check to see if any orders were placed in a certain time period. See:

https://shopify.com/admin/apps/flow/web/v2/editor/templates/c6de0ec7-7ba3-46f7-958c-a6e0460f1f5a

 

I'm not sure exactly how to check with the vendor. The fields you can filter on are basically the same as the Admin, shown here:

https://shopify.dev/docs/api/admin-graphql/2023-01/objects/QueryRoot#connection-queryroot-orders

Assuming none of those variables work...one way to do this would be to use a workflow to tag all new orders based on the vendor. And then use the scheduled workflow to look for all orders that have that tag in the desired time period. 

That first workflow would look something like:

- Order created

- Check...if at least one order / lineItems / vendor == "vendor name"

- If true, add Order tag with "vendor name".

 

If you want to do this for all vendors, it's a bit more complicated but possible:

- Order created

- Add order tag -> use code here to loop over order.lineItems and add each vendor name. 

{% for li on order.lineItems %}{% if li.vendor != blank %}{{ li.vendor }},{% endif %}{% endfor %}

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.