Responding to events
Last updated
Was this helpful?
Last updated
Was this helpful?
Shopify uses webhooks to notify apps like Mechanic about new activity. Mechanic supports every type of Shopify webhook in its set of . By setting up to these topics, a task may respond to any supported type of Shopify activity.
Note that Shopify does not strictly guarantee webhook delivery. See for more on this subject.
Shopify's "update" webhooks do not contain information about what piece of data has changed. (For example, a product update webhook does not specify what attribute of the product has changed.) For this reason, it's not possible to subscribe to changes in specific resource attributes (like product SKUs, or order tags).
If a task needs to react to a specific attribute change, the task must scan for and "remember" the original value of that attribute, so as to compare incoming updates with that remembered value. A task could use the action to store these values in the Mechanic cache, or it could use the action to save the remembered value in a metafield.
For an example implementation, see the task.