Discount triggers
Workflow Companion can start a Shopify Flow workflow when a discount is created, updated, or deleted, and when a code is added to or removed from a discount. The triggers work for code and automatic discounts of any type.
Available triggers
- Discount created — starts when a discount is created.
- Discount updated — starts when a discount is updated.
- Discount deleted — starts when a discount is deleted.
- Discount code added — starts when a code is added to a code discount, once for each code. Adding codes in bulk starts one run per code.
- Discount code removed — starts when a code is removed from a code discount, once for each code.
How to turn them on
- In
Settings→Triggers, select Manage in the Resource lifecycle row, turn on Discounts, and allow access to discounts when Shopify asks. - In Shopify Flow, build a workflow that starts with the trigger you need.
Workflow payload details
Discount created and Discount updated send:
Discount— the discount:id— its ID, for examplegid://shopify/DiscountCodeNode/123456789.legacyResourceId— its numeric ID, for example123456789. Pass it to Get discount data to read the rest of the discount.kind—CODEfor a code discount,AUTOMATICfor an automatic one.title— its title.status— its status:ACTIVE,EXPIRED, orSCHEDULED.
Occurred at— when Shopify says the discount was created or updated, in ISO 8601 UTC. For example,2026-09-23T14:05:06.123Z.
On Discount updated, title and status are the ones the discount has after the update.
Discount deleted sends:
Discount— the deleted discount:id— its ID.legacyResourceId— its numeric ID.kind—CODEorAUTOMATIC.
Occurred at— when Shopify says the discount was deleted, in ISO 8601 UTC.
Discount code added and Discount code removed send:
Discount— the code discount:id— its ID.legacyResourceId— its numeric ID.
Redeem code— the code that was added or removed:id— its ID, for examplegid://shopify/DiscountRedeemCode/123456789.code— the code customers enter, for exampleSUMMER20.
Occurred at— when Shopify says the code was added or removed, in ISO 8601 UTC.
Important considerations
- A discount that expires at its end date, or starts at its scheduled start date, doesn't start Discount updated.
- Runs aren't guaranteed to start in the order the changes happened.
Occurred atsays when each one did.