How can I manage discount code flow order for specific orders?

mpatsi
Shopify Partner
111 0 14

Greetings, 

 

i'm trying to create a flow that will be activated when someone used a specific discount code in the checkout, and after that will send an email, although i have set variables such as the name of the customer and the discount code that was used for the order, when i add the amount of money used in this order with this discount code the variable returns the amount of the discount code used ever, but i want only for this specific order and not to count all the orders, and second which variable i must use to display the products used in the order?

 

Thanks in advance!

Reply 1 (1)

paul_n
Shopify Staff
916 127 221

I think you want order / totalDiscountSet / shopMoney / amount

https://shopify.dev/docs/api/admin-graphql/2023-07/objects/order#field-order-totaldiscountsset

 

Products are located at order / lineItems / product / ...

 

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.