Event object
The Event object describes an incoming event.
How to access it
Use
event
in any task codeUse
event
in the Liquid console when viewing an event in Mechanic
What it contains
event.topic
â containing the event topic (e.g.shopify/customers/create
)event.data
â containing all data that arrived with this event (e.g. the webhook payload from Shopify, the data from an incoming email, etc)event.source
â reflects the entity that triggered the event (e.g."shopify"
,"user"
)event.created_at
â the date and time at which Mechanic received the eventevent.parent
â if applicable, a reference to the event that used an Event action to create this event; parents are available up to five generations deep (e.g.{{ event.parent.parent.parent.parent.parent }}
), but no furtherIn preview mode, this object also contains a "preview" attribute, as in
event.preview
, set totrue
. (In all other modes, event objects do not have this property.) When this attribute is present, the task should render actions that are indicative of what the merchant should expect the task to do â and these "preview" actions will be shown to the merchant. These actions will also be used to determine what Shopify permissions Mechanic will request from the merchant. Learn more about preview actions
Last updated