Now that you know the basics of the Rule Builder, you can start building rules. Using the data sent through your Talon.One integration, you have full flexibility to choose from a series of expressions to create any type of promotional campaign. 

In this article you will learn what's possible with the three key components of a rule: 
  1. Conditions
  2. Effects 
  3. Filter Cart Items
First, we will cover the basic steps required to add, save and edit a rule. 

Adding A Rule

To add a rule you must first create a campaign or select an existing one: 
  1. Click on the Application you want to work with
  2. Click on New Campaign or click on an existing campaign
  3. Give your campaign a name
  4. Click on the Rule Builder tab
  5. Click Add Rule


Saving And Editing A Rule

To save a rule or make edits, follow these steps:
  1. Add valid Condition(s) (e.g., coupon code is valid. Learn more below.)
  2. Click Filter Cart Items if required (e.g., per product discounts. Learn more below.)
  3. Add valid Effect(s) (e.g., discount amount 10%. Learn more below.)
  4. Click the Save button on the top right to save the entire rule
  5. Click the check mark to save the steps of your Rules, click the garbage can to delete
  6. Click the Back / Forward arrows on the top right to go back to previous rule setup
  7. Reorder your Conditions or Effects by dragging the hamburger icon on the left
Remember, campaigns can only be activated once they have rules with valid conditions and effects. 

Watch: Building A Coupon Campaign

1. Creating Conditions

When you click +Add Conditions a drop down will appear with a list possibilities. You no longer drag and drop elements from the side bar. You can build Conditions using the following options:

A Coupon Code is Valid or A Referral Code is valid:
  • Use these conditions if your customer is required to enter a code to redeem the promotion.
  • This condition is true if a customer has included a valid coupon from this campaign. 
  • These features are only visible in the Rule Builder when they have been selected in Settings
A variable has a certain value:
  • Use this option to build most of your conditions. Choose whether "all" or "at least one" condition must be true. 
  • Easily search the list of expressions available and select your required data points such as Events, Sessions, Profiles Attributes, etc. to build granular conditions. 
  • To edit, click the field and the pop-up with all available variables will appear. Depending on the selected variable, we offer different operators. It is possible to have multiple arguments in the third field and even enter in formulas.


Event Attributes:
  • Allows you to create conditions by evaluating attributes that are used in Custom Event types. These will only appear if they have been defined in your Application in Developer Settings

2. Creating Effect​s

In Talon.One, Effects occur when either ALL or SOME of the Conditions of a rule are validated to TRUE. When the Rule Engine evaluates the updates 

When you select +Add Effects a drop down will appear with a list of possibilities to build your condition. You can choose from the following options:

List Effects:
  • Use List Effects to apply a discount (or effect) on items in a customer's cart (in a list). 
  • The Cart Item Filters you have saved can be used to give more specific and flexible discounts as effects. 
  • Example: set a discount on a specific SKU or make all items in cart free. 
Set a discount:
  • Use this effect to give a percentage or dollar amount discount.
  • You can also use formulas in the Value field to create more dynamic discounts effects depending on certain variables.
  • For a dollar amount discount on the total order, type in the amount into the value field. Only percentage discounts and more complex formulas require “SessionTotal * 10%”. 
Create Coupon & Create a Referral Code:
  • Here you can choose to create a Coupon Code or Referral Code as an effect of the campaign. 
  • Example: If a customer makes a purchase of X amount in a discount campaign, send them a code for their next purchase. Configure the Coupon details in Settings
Update a value:
  • Set a variable and select the new value or variable you wish to update. 
  • Example: Updating a customer profile or adding loyalty points. 
  • A Webhook will execute effects outside the Talon.One API and trigger third party services like Email or SMS. 
  • Webhooks will appear once they have been added in the Developers section of your account. Learn how to configure a Webhook here
  • Example: If a customer purchases an item from Category X above 50€, trigger an email with a discount on their next purchase.  

3. Filter Cart Items

Filtering cart items allows you to add filters and manipulate the data in your customer’s cart, for example: set per product discounts. You can add new filter steps to build a more dynamic rules. Once you save filters, they can be use in your Effects with the List Effects feature or within Conditions. 

Follow these steps to Filter Cart Items:
  1. Click on Filter Cart Items, located on the right corner of the Condition panel
  2. Click +Add Filter Step and select a filter for your cart items
  3. Choose one or more Filter Steps depending on your requirements
  4. Name your Filter something obvious (the name will appear as an available attribute when you build conditions or effects)
  5. Save your filtered cart items (e.g., SweaterCartItems) 

Depending on how you would like to use the filtered cart items, you can choose from several Filter Steps. Filter Steps include: 
  • Take the first item: pick the first item in an ordered list
  • Count number of items: to give a discount on a specific number of items.
  • Set a filter condition: select specific items in "Product Category", "Item Category" or "Item SKU" using operators and variables
  • Select an attribute: filter items by specific attribute
  • Sum up a formula: to calculate the total price of items in the list
  • Sort items by attribute: used to sort items by ascending or descending order
  • Check if the filtered cart is empty: check if cart is empty
Only available filter steps will appear. For example, you must first filter for a condition before using the "count" filter. 

In this article you have learned how to build a rule required to activate a campaign in Talon.One. We have also covered a small part of what is possible with Conditions, Effects and Cart Item Filters.

The Talon.One Rule Builder is designed to offer you maximum flexibility when creating promotional campaigns, but the examples given here are only a starting point. This is only a glimpse of the functionality available with the Rule Builder. 

If you have questions about building more complex rules, please get in touch! We are happy to support in creating the right rules for your promotional campaigns.

Next you will want to read: