Actions
Actions are how Mechanic tasks make changes — Shopify mutations, emails, HTTP requests, file generation, and more.
An action is an operation with an effect — tagging an order, sending an email, uploading a file to FTP, or calling an external API. Tasks produce actions by rendering action definitions in Liquid, which means a single task can dynamically generate any number of actions based on the data it processes.
Actions run after the task code completes. Each action has a type (specifying the operation) and options (providing specifics). Action definitions can be constructed using the action tag or as raw action objects in JSON.
Action types
An action type determines the class of operation to be performed. While actions may vary greatly, there are only a few action types. Shopify is treated as a first-class action because it's the primary API Mechanic automates against.
Performing operations on the store's Mechanic cache
Debugging; displays the options that it is provided, with no side-effects
Sending transactional email
Generating custom events in the User event domain
Generating files of various types, storing them at a temporary Mechanic-provided URL
Performing FTP file uploads and downloads
Performing HTTP requests
Sending requests to the Shopify Admin API
Integrations
Mechanic also maintains a set of integration actions for third-party services beyond Shopify.
Report Toaster
Requesting reports from Report Toaster, or updating data within Report Toaster
Last updated
Was this helpful?