How event topics work
Reference for Mechanic event topics — Shopify webhook events, scheduled events, user-triggered events, and custom event topics.
Last updated
Was this helpful?
Reference for Mechanic event topics — Shopify webhook events, scheduled events, user-triggered events, and custom event topics.
To make events easy to identify, each event has a topic. Tasks signal their interest in specific event topics using subscriptions.
A topic looks like "shopify/customers/create", and it has three parts:
The domain describes the source of the event. Shopify events have "shopify" as their domain, and events generated by Mechanic itself use "mechanic".
The subject describes the type of resource the event describes. Events that are about customers have "customers" as their subject, and events that are about orders have "orders".
The verb describes what has just occurred. Events that are about creating resources generally have "create" as their verb, and events that are about deleting resources generally have "delete".
Looking for the event topic list? Start here. Need Shopify topics? Jump to Shopify.
The User event domain is for custom, user-generated events, having any subject and verb (e.g. "user/foo/bar"). As with all events, a User event topic must use the standard three-part topic form, but only the "user/" prefix is mandatory.
Mechanic allows developers several ways to generate custom User events:
The Event action can be used with any User event topic
Mechanic webhooks may be configured to generate events using any User event topic
Custom Shopify webhooks deliver Shopify webhook events onto a User event topic, with optional filtering and payload customization. For these events, event.topic is the user/... topic and event.shopify_topic stores the source Shopify topic; on native Shopify deliveries, those two values match.
Last updated
Was this helpful?
Was this helpful?