In this article you will learn how to set up an effect which will always return a dynamic discount which will transform the price of an item or the total of the cart to the same amount. 

For example, if you have 10 products in a category with a price range from 12€ to 25€. To promote this category you want to sell all products in this category for 10€ no matter what the base price is. To simplify the example were allowing only one item per purchase. 

Summary: 
  • Session total is a value from 12€ to 25€
  • Expected price the customer needs to pay: 10€

Since Talon.One will always only return the discount value you need to subtract the expected cart total from the actual total of the session.

For the use-case above the effect would look like this:

If the total of the session is 14€ for example, this formula would look like: 14 - 10, which means: we are returning 4(€) as the value of a discount effect. 

During the integration phase, you implemented a function which is subtracting the Talon.One discounts from the total of the customer cart. In our case: the total of the cart (14) - discount form Talon.one (4) = 10€.

Now you have an effect which will transform the total of each customers cart to 10€.