In this article you will learn more about Conditions and how to use them in a rule. You should have already read about Building a Rule.

What is a Condition? 

The Conditions in your rule define the event or action that must occur before an Effect is triggered. As you know, every rule requires valid Conditions and Effects. The Talon.One Rule Engine validates the Conditions you have defined and if all or some of are validated to TRUE, only then an Effect is triggered.

Choose between +Add Conditions or Always Trigger Effects. If you choose Always Trigger Effects the effects you select will trigger on every customer order. 

You can add multiple Conditions in a rule to create more precise rules. For example, you can create a rule with the following conditions: 

You can also use a Cart Item Filter in your condition. This is just one example of a Condition, there are many possibilities that can be achieved based on the data you send Talon.One.

Available Conditions

When you click +Add Conditions a drop down will appear with a list possibilities. You can have several Conditions in a rule and choose whether "all" or "at least one" Condition must be true. Below you will find a list of  these options and their definitions. 


A coupon code is valid or A referral code is valid

Select this option if Coupons or Referral codes are required for your campaign. This condition is true if a customer enters a valid code from this campaign. These option is only visible when they have been selected in Settings

Coupon codes can be created on the Coupons page or with the API. Learn how to add Coupons for a campaign here. Unlike Coupons, Referral Codes are created with the API, read our developer documentation for creating Referral Codes and learn more about Referral Campaigns here

Select Attribute

Select this option to build expressions using attributes. Click the field and the available attributes will open in the palette. Search the list for available attributes and select your required data points such as Events, Sessions, Profiles Attributes, etc. Some examples conditions you can create include:
  • Session total is greater than 100$
  • Current time is between Monday and Friday
  • Destination is equal to Berlin
  • Email contains .edu
  • Coupon create date is before current time (or exact date)

You can use built in attributes or use any custom attributes that you have integrated to build conditions. 

Attribute Operators

For the "Select Attribute" condition we offer different operators depending on the type of variable you select on the left side of your argument. On the right side of your new condition, it is possible to enter a single attribute, several attributes, formulas, select exact dates, relatives dates, or day of the week.

Possible operators include: 
  • is equal to
  • is not equal to
  • starts with
  • ends with
  • is one of
  • is not one of
  • contains
  • does not contain
  • matches RegEx

For example, you can choose "is one of" or "is not one of" and select (or type in) multiple inputs:


Select system event trigger

Use this option to create a condition triggered by system events like "Customer Account Registration" or "Customer Session Creation/Update/Close". 

Check if a custom attribute exists

Use this option to check if a current user or session has a value for the attribute. For example, if you want to check is a subscription is valid or if a customer is making a first purchase using the attribute "isFirstPurchase" then select "True" or "False". 

A group of conditions is met

Add several Conditions in this group that will validate to "True" when at least one of these conditions matches. For example, a group of Conditions could include three different shipping cities.


Using the data you send Talon.One, you can create Custom Attributes and use them in your conditions. You can also use Cart Filters for building Conditions. 

There are many possibilities for creating Conditions, so be sure to get in touch if you have questions about creating more customized rules and Campaigns. 
Next you will want to read: