Using Flow app to trigger an email to customers that purchased a newly archived product.

Using Flow app to trigger an email to customers that purchased a newly archived product.

JayMorgan
New Member
4 0 0

I'm offering classes and workshops on my shopify site. The classes are products and listed on the site in a different collection than our physical products. We are trying to find a way to send participants in a class a survey after the class. We have a date for the class stored in metafields attached to the product listing (the class), I haven't found a way to trigger an email to go out the day after a class happens, I don't know if that is possible.

 

One thing we could use to trigger the email going out is after the class happens, we manually go in and Archive the class. So it wouldn't be a big deal to trigger the email off of that... but then I'm triggering off of a product listing and I need to then search through all the orders and find the orders and customers that bought that product. I'm having trouble setting up Flow along all those lines.

 

Hopefully someone can guide me through the options or help write a query to find all the customers associated with that product. Thanks for reading. 

Replies 3 (3)

GoDrinks-Bali
Excursionist
40 0 5

My idea maybe bit long but, its like this
Tag the orders with flow ---

GoDrinksBali_2-1738587794920.png

 

Create flow for the class or after class base on order tags and send email marketing

GoDrinksBali_1-1738587665397.png

 

JayMorgan
New Member
4 0 0

I was just looking into tagging. The sticky part there is every time I list a class I have to go in a create one of these workflows. I was hoping to find a less hands-on way. 

In your solution, what would the query look like to get all orders tagged with a certain tag? I’m having trouble wrapping my head around the query syntax. 

paul_n
Shopify Staff
1577 170 363

You could use "Product status changed" as the trigger and add a condition to check if the new product.status is "archived"

 

You would then need to find orders for that product. You can use "Get order data" for that using something like the below as the filter:

sku:"{% assign variant = product.variants | first %}{{ variant.sku}}"

This assumes you only have 1 variant per product/class. 

 

That action returns a list of orders. So you can use a "For each" action to loop over them and call "Send Marketing Email" for each of the orders in the list (and their customer)

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.