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".
User-defined topics
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
Webhooks may be configured to generate events using any User event topic
Last updated