Workflow Triggers, Conditions and Actions
Reference for every trigger, If / Else field, time window, action and email variable.
A reference for every trigger, condition and action you can use in a workflow. The builder only offers the steps that work with your workflow's Runs for and trigger.
Triggers
| Trigger | Runs for | Starts when | Options |
|---|---|---|---|
| Order placed | All | An order is placed. Product workflows start once for each product in the order. | Only orders placed from: Storefront, Admin, API / integrations, System |
| Order status changed | All | An order moves to a status you choose. | Status, and where the change came from |
| Account created | Accounts | An account, lead or opportunity is created. | Account type |
| Account group changed | Accounts | An account is moved into a customer group. | Group |
| Account type or status changed | Accounts | A lead or opportunity is converted, or its status changes. | Type, lead status, opportunity status |
| Contact created | Contacts | A contact is created. | None |
| Contact group changed | Contacts | A contact is moved into a customer group. | Group |
| Product created | Products | A product is created. | None |
| Scheduled (recurring) | All | Daily, weekly or monthly at an hour you choose. Every matching record is checked. | Frequency, day of week or day of month (1–28 or last day), time of day; limit by customer group or account type (product workflows: product type or attribute set) |
Storefront orders placed by your teamOrders your team places while logged in as a contact count as Storefront orders.
Conditions (If / Else)
An If / Else step has one or more rules joined by ALL or ANY. If the rules are true the workflow follows Yes, otherwise No.
| Group | Fields |
|---|---|
| Account | Account number of orders, Account total amount spent, Account average order value, Account quantity ordered of SKUs, Account days since last order, Days since account created, Account customer group, Account type, Lead status, Opportunity status, Account is active, Account name, Number of contacts, Account attribute value |
| Contact | Contact belongs to an account, Contact number of orders, Contact total amount spent, Contact average order value, Contact quantity ordered of SKUs, Contact days since last order, Days since contact created, Contact customer group, Contact email |
| Order (order triggers only) | Order grand total, Order subtotal, Order total item quantity, Order quantity of SKUs, Order status, Payment method, Coupon code, Contains SKU |
| Product | Number of orders containing the product, quantity ordered, revenue, days since created, SKU, product type, attribute set, attribute value, in category |
| Date | Day of the month today (store time) |
Order and spend totals across an account include all of its locations. Canceled orders are never counted, and refunds are subtracted.
Time windows
Order, spend and quantity fields have a time window:
- in the last N days: a rolling window. Enter 0 for all time.
- this period, starting on day D: since the most recent day D of the month (store time). With D = 10, on the 18th it counts from the 10th of this month, and on the 5th it counts from the 10th of last month. D = 1 is the calendar month.
- previous period, starting on day D: the period before that, from day D of last month up to (not including) day D of this month.
SKU quantities
Account quantity ordered of SKUs, Contact quantity ordered of SKUs and Order quantity of SKUs add up the quantity of the products you list. Enter SKUs separated by commas. Use * to match any characters, for example FAN-*, VENT-100. Matching ignores upper and lower case. Refunded and canceled quantities are subtracted.
Order total item quantity vs. Order quantity of SKUsOrder total item quantity counts every item in the order. To count only certain products, use Order quantity of SKUs.
Delay
Delay waits a number of minutes, hours or days, then continues. You can place it anywhere, including inside a branch.
Actions
| Action | What it does |
|---|---|
| Change account group | Moves the account into a customer group. |
| Update account attribute | Sets one of your custom account attributes. |
| Change contact group | Moves the contact, their account, or both into a customer group. |
| Update contact attribute | Sets a contact attribute. |
| Send email | Emails the account's primary contact, all account manager contacts, the contact, or addresses you enter. The subject and message accept HTML and variables (below). |
| Email the account's sales rep | Emails the account's sales reps, or the customer group's reps if the account has none, with an optional CC. |
| Create a CRM activity | Creates a call, meeting or note on the account, due in N days, assigned to the account's sales rep, a team member or no one. |
| Change account payment terms | Sets or turns off net terms (with an optional credit limit), allows or removes payment methods, or sets a deposit. |
| Change account type / status | Converts a lead or opportunity to an account, or changes its lead or opportunity status. |
| Issue a credit memo | Gives the account a credit memo for a set amount, optionally only while its available credit is below a cap. |
| Update product attribute | Sets a Yes/No, dropdown, text, date or price product attribute. |
| Update product status / visibility / category | Enables or disables the product, changes its visibility, or adds it to or removes it from a category. |
| Export with Data Mapper | Sends the order through an order-export Data Mapper. |
| Send webhook | Sends the workflow's data (account, contact, product, order) as JSON to a URL you enter, optionally signed with a secret. |
Actions that find nothing to change, such as an account that's already in the group, are logged but don't count as a change.
Limits
- Email the account's sales rep fails when neither the account nor its customer group has a sales rep with an email address.
- Issue a credit memo isn't available when QuickBooks or NetSuite manages your store credit.
- Export with Data Mapper only appears when you have an order-export Data Mapper.
Email variables
Use these in the subject and message of Send email:
| Variable | Shows |
|---|---|
{{var account.name}} | Account name |
{{var contact.name}} | Contact name |
{{var contact.email}} | Contact email |
{{var order.increment_id}} | Order # |
{{var order.grand_total}} | Order grand total |
{{var product.sku}} | Product SKU |
{{var product.name}} | Product name |
{{var workflow.name}} | Workflow name |
Updated about 4 hours ago
