Change triggers with before and after values
Shopify's own update events say that a product changed, not what changed. A change trigger tells you exactly that: which field, the value before and the value after. The workflow starts only when that field really changed.
The change triggers
| Resource | Triggers |
|---|---|
| Products | Product tags added, Product tags removed, Product status changed, Product title changed, Product handle changed, Product description changed, Product vendor changed, Product type changed |
| Variants | Product variant price changed, Product variant unit price changed, Product variant SKU changed, Product variant barcode changed, Product variant added, Product variant deleted, Product variant cost changed |
| Collections | Collection title changed, Collection handle changed, Collection description changed |
| Inventory | Out of stock at location, Back in stock at location |
| Orders | Order tags added, Order tags removed, Order note changed, Order attributes changed, Order line items changed, Order fulfillment changed, Order financial status changed, Order shipping address changed |
| Draft orders | Draft order tags added, Draft order tags removed, Draft order note changed, Draft order attributes changed, Draft order line items changed, Draft order status changed, Draft order email changed, Draft order shipping address changed, Draft order billing address changed |
| Customers | Customer note changed, Customer account state changed, Customer name changed, Customer email changed, Customer phone changed, Customer address changed |
| Markets | Market status changed |
Metafields and metaobjects have their own page: Metafield and metaobject triggers.
What the event carries
The event is the resource as Shopify sent it, plus the change:
- Extra fields on
event.payload, depending on the trigger. Product tags added addsadded_tags, Product variant price changed adds the old and the new price and the difference in percent. event.changes.items- a list of every tracked field that changed in the same update. Each entry hasfield,oldValueandnewValue.
Variant triggers start once for each variant that changed. A bulk price edit of ten variants starts ten runs, each with its own variant.
Before-and-after rules
In a trigger filter or a Condition step, open Comparison and pick one of the operators in the group Before and after. The rule then asks for the Field that changed, for example price, tags or status, instead of a path. The operators:
| Operator | Matches when |
|---|---|
| changed | The field changed at all |
| changed to | The new value equals your value |
| changed from | The old value equals your value |
| increased | The new number is higher than the old one |
| decreased | The new number is lower than the old one |
Example: start only when a product went from draft to active. Trigger Product status changed, filter rule: field status, changed to, value active.
Before-and-after rules need a change trigger. With any other trigger such a rule never matches, and the editor says so.
Good to know
- Out of stock and Back in stock work per location: they start when the available quantity of an item at one location drops to zero or below, or rises above zero again. The event carries ids, not the product title. Add a Shopify query step to look the product up; the inventory templates show how.
- Product variant added does not start for the first variants of a new product, only for variants added to a product that already exists. Deleting a whole product does not start Product variant deleted.
- If you make an edit by hand within about 30 seconds of a workflow's change to the same resource, loop protection may take your edit for the workflow's echo and not start the workflow again. See Loop protection.
- If a workflow is turned off for a while and on again, the first event can report a change that built up in the meantime.
- Order, draft order and customer triggers need Shopify's approval for protected customer data. The customer name, email, phone and address triggers also need those fields to be approved. See Permissions and store data access.

