When creating a workflow, you may wish to develop it further using a rule. Implementing a rule or two gives you the ability to tailor a workflow to your store and marketing strategies. Each rule comes with comparison statements such as is, matches any, is less than and is greater than which you can pair with the value of each rule. This gives you unique tools to create powerful logic that would usually require the skills of a developer to create.
You may have already discovered that the trigger you select dictates which actions you can pair with it. This is also true in the case of rules, as the trigger you choose will cause certain rules to become available. Since there are a wide range of rules to choose from, we’ve provided descriptions for each one to make life easier.
You can easily add multiple rules by clicking the and button at the end of each rule. This modifies the workflow so that after a trigger fires, all rules must be satisfied for the workflow to run. This tailors your workflow to more specific circumstances, for example when a customer buys from the watches category and has more than two items in their order.
Alternatively, you can modify a workflow so that it runs if only one of your rules is satisfied. This is done simply by adding a new rule group. In this example, the workflow will run if a customer buys an item from the watches category or has more than two items in their order.
Validation on queued workflows
If you set any kind of delay to a workflow, the rules on that workflow will be validated twice. Firstly when the workflow initially triggered and then again just before the workflow is scheduled to run. If the rules are not validated at this point the queued item will be deleted instead of running.
Order Item Count
- Restricts workflow to customers who have a certain number of items in their order. Pair this rule with statements such as “is greater than” to target customers who buy many products at once.
- Restricts a workflow to orders which have a specified total cost. You could pair this rule with “is greater than 100” to target customers who have placed an order over that amount.
- Pair this rule with “includes” or “does not include” and enter in products from your store. The workflow will only run if an order includes the products you specify.
Order Item Categories
- Restricts a workflow to orders which contain products from certain categories. Use this rule with the comparison statement “matches all of” to specify that the order must contain at least one item from every single category you select. Alternatively, including the comparison statement “matches any of” specifies that at least one item from any specified category must be included in the order.
Order Item Names – Text Match
- Restricts workflow to orders which have items which contain particular keywords in the title.
- Use this rule to target orders that contain a specific coupon. You can also target orders that don’t use a specific coupon.
Order Coupons – Text Match
- Similar to the previous rule but does a text match on the coupon code used in the order instead of matching specific coupons.
Order Payment Gateway
- Targets a particular payment method. e.g. Stripe or Direct Bank Transfer.
Order Shipping Country
- Restricts workflow to orders which are being shipped to a country of your choice.
Order Billing Country
- Restricts workflow to a billing country of your choice.
Order Shipping Method
- Allows you to target customers which require an order shipping method such as flat rate, free shipping, local pickup etc.
Order Shipping Method – Text Match
- Restricts workflow to shipping methods which contain a keyword.
Order Has Cross-Sells Available
- Targets orders with items that have cross-sells in your store. This can be used to ensure you don’t send a cross-sell follow-up email that doesn’t contain any valid cross-sell products.
Order Is Customer’s First
- Targets first-time customers.
Order Placed by Guest
- Target orders that are placed by guest customers or target only registered users by setting the rule value to ‘No’.
Order Is Subscription Renewal
- Restrict workflow to orders that are / are not for subscription renewals. You could use this rule to send a thank you email or a discount coupon.
Order Customer Provided Note
- Targets orders which have a note provided by the customer containing certain keywords.
- Use this rule to target customers based on their order meta/custom fields.
Order Item Meta
- Use this rule to target customers based on their order item meta/custom fields.
This Workflow’s Run Count for Order
- This limits the workflow from triggering too many times for a customer’s order.
This Workflow’s Run Count for Customer
- Limits the workflow so it only runs a certain number of times for each customer. A useful precaution so that your customers don’t receive too many emails or coupons. For example, you can pair this with the comparison statement “is less than” and “1” to ensure that the workflow only runs once per customer. Once the workflow’s run count has reached 1, this rule will prevent it from running a second time.
This Workflow’s Run Count for Guest
- Identical to the previous rule, except it applies to guests in your store.
Customer Is Guest?
- Target customers based on whether they have created an account or not.
Customer User Role
- Restricts the workflow to customers with certain user roles. This is useful if your store uses multiple customer tiers such as VIP or Wholesale. You also might just want to test your workflow by restricting it to administrators only.
Customer User Tags
- Restricts workflow to customers who have certain tags attached to their profile. Please note user tags are not currently support on guest customers.
Customer Total Spent
- Targets customers who have spent over or under a certain amount in your store.
Customer Order Count
- Restricts workflow to customer who have placed a certain number of orders.
- Targets customer email addresses that start with or contain a specific word
Customer’s Purchased Products – All Time
- This rule searches through all the customer’s purchased products for a particular product.
Customer Has Active Subscription?
- Pair with “Yes” or “No” to target users with or without at least one active subscription.
Customer’s Order Statuses
- Restricts workflow to customers that have orders of a certain status e.g. the customer has at least one completed order.
- Use this rule to target users based on their customer meta/custom fields.
Customer Review Count
- Targets customers based on the number of approved reviews they have left on your store.
- Total cost of the customer’s cart is a certain amount.
Cart Item Count
- Number of items in cart is more than or greater than a certain amount.
- Items in cart include a certain product(s).
Cart Item Categories
- Cart includes products from a certain category.
- Coupons being used in cart match a particular type you have created in your store.
- The guest’s email address contains a particular keyword. Alternatively, you can enter a particular customer’s exact email.
Guest Order Count
- Targets guests who have placed a particular number of orders in your store. You could create a workflow that targets guests who have placed greater than 3 orders and encourage them to sign up.
- Target subscriptions that include certain products.
Subscription Item Categories
- Target subscriptions that include products from certain categories.
Subscription Payment Count
- Restricts workflow to subscribers who have paid for their subscriptions a certain number of times. You could use this rule to reward loyal subscribers with a special discount or VIP status.
Subscription Payment Method
- Targets subscribers who pay using a certain method.
- Use this rule to target subscribers based on their subscription meta/custom fields.
- Allows you to target reviews based on the star rating of the review.
Advocate Total Referral Count
- Targets advocates based on their total number of referrals in your store.
Advocate Approved Referral Count
- Targets advocates who have had a specified number of referrals approved in your store.
Advocate Rejected Referral Count
- Targets advocates who have made a number of rejected referrals.
Advocate Potential Fraud Referral Count
- Although you may approve certain cases initially marked as potential fraud, using this rule can be a good way to ensure things don’t get out of hand. This rule targets advocates whose referrals have been marked as potential fraud a number of times.