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

TriggerRuns forStarts whenOptions
Order placedAllAn order is placed. Product workflows start once for each product in the order.Only orders placed from: Storefront, Admin, API / integrations, System
Order status changedAllAn order moves to a status you choose.Status, and where the change came from
Account createdAccountsAn account, lead or opportunity is created.Account type
Account group changedAccountsAn account is moved into a customer group.Group
Account type or status changedAccountsA lead or opportunity is converted, or its status changes.Type, lead status, opportunity status
Contact createdContactsA contact is created.None
Contact group changedContactsA contact is moved into a customer group.Group
Product createdProductsA product is created.None
Scheduled (recurring)AllDaily, 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 team

Orders 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.

GroupFields
AccountAccount 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
ContactContact 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
ProductNumber of orders containing the product, quantity ordered, revenue, days since created, SKU, product type, attribute set, attribute value, in category
DateDay 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 SKUs

Order 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

ActionWhat it does
Change account groupMoves the account into a customer group.
Update account attributeSets one of your custom account attributes.
Change contact groupMoves the contact, their account, or both into a customer group.
Update contact attributeSets a contact attribute.
Send emailEmails 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 repEmails the account's sales reps, or the customer group's reps if the account has none, with an optional CC.
Create a CRM activityCreates 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 termsSets or turns off net terms (with an optional credit limit), allows or removes payment methods, or sets a deposit.
Change account type / statusConverts a lead or opportunity to an account, or changes its lead or opportunity status.
Issue a credit memoGives the account a credit memo for a set amount, optionally only while its available credit is below a cap.
Update product attributeSets a Yes/No, dropdown, text, date or price product attribute.
Update product status / visibility / categoryEnables or disables the product, changes its visibility, or adds it to or removes it from a category.
Export with Data MapperSends the order through an order-export Data Mapper.
Send webhookSends 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:

VariableShows
{{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

Did this page help you?