Using effects
Using discount effects
Discounting session total
It allows you to apply a discount to the total value of a customer session. For example, use it to offer a discount when customers reach a certain minimum amount or redeem a coupon.
- Open the Rule Builder for your campaign.
- Click Create Rule.
- In Effects, click Add Effect.
- In Discount, click Discount session total.
- In Discount name, type a suitable name for your effect.
- In Discount value, enter the value of the discount. It can be a number or a formula including attributes from the Attribute Selector such as the total value of the session.
- (Optional) In Advanced Settings > Allow lower discount value if budget is insufficient,
select:
- Application Default Settings
- Yes
- No
- Click Done.
This effect returns the setDiscount API effect.
Discounting individual items
It allows you to apply a discount to certain items in the cart or to any additional costs applied to them. For example, use it to run a promotion on some specific item categories or have part of your catalog on sale.
With cart item flattening, identical products are viewed as single items in the cart. This allows us to discount individual items rather than total quantities of a product.
Before you start, you can create a cart item filter or a bundle definition to set which items you want to apply the discount to. Otherwise, the only list available includes all the items in the customer's cart and any Application cart item filters you created.
You can then discount individual items in your rule:
- Open the Rule Builder for your campaign.
- Click Create Rule.
- In Effects, click Add Effect.
- In Discount, click Discount individual items.
- In List of items, select a list of cart items. The list can be a bundle definition.
- In Discount name, type a suitable name for your effect.
- In Discount value, enter the value of the discount. It can be a number or a formula including attributes from the Attribute Selector such as the value of the item.
- (Optional) In Discount scope, select where you want the discount effect to be applied:
- Price (default): The price of the item without taking into account additional costs.
- Additional costs: The total value of any additional costs applied to the item.
- Item total: The price of the item together with any additional costs.
- (Optional) In Advanced Settings > Allow lower discount value if budget is insufficient,
select:
- Application Default Settings
- Yes
- No
- Click Done.
This effect returns the setDiscountPerItem API effect.
Discounting individual items pro rata
It allows you to apply a pro rata discount to certain items in the cart. The value of the discount is divided among the eligible items in direct proportion to the price of each of them.
Prorated discounts are rounded to the nearest hundredth. If the sum of all rounded individual discounts does not equal the total discount, the difference is subtracted or added to the values of the largest individual discounts. For example, a €20 discount spread evenly across six items will have a deficit discount value of €0.02. The deficit value will be added to two items.
Try creating a pro rata discount campaign for better understanding.
Before you start, you can create a cart item filter to set which items you want to apply the discount to. Otherwise, the only list available includes all the items in the customer's cart and any Application cart item filters you created.
With cart item flattening, identical products are viewed as single items in the cart and are discounted individually.
You can then discount individual items in your rule:
- Open the Rule Builder for your campaign.
- Click Create Rule.
- In Effects, click Add Effect.
- In Discount, click Discount individual items pro rata.
- In List of items, select a list of cart items.
- In Discount name, type a suitable name for your effect.
- In Discount value, enter the value of the discount. It can be a number or a formula including attributes from the Attribute Selector such as the value of the item.
- (Optional) In Advanced Settings > Allow lower discount value if budget is insufficient,
select:
- Application Default Settings
- Yes
- No
- Click Done.
This effect returns the setDiscountPerItem API effect.
Discounting bundles pro rata
It allows you to apply a pro rata discount to the items in one or more item bundles. The discount value is applied to each of the bundles formed from the same bundle definition and is divided among the items in those bundles in direct proportion to their individual prices.
Prorated discounts are rounded to the nearest hundredth. If the sum of all rounded individual discounts does not equal the total discount, the difference is subtracted or added to the values of the largest individual discounts. For example, a €20 discount spread evenly across six items will have a deficit discount value of €0.02. The deficit value will be added to two items.
Try creating a pro rata discount campaign for better understanding.
Before using this effect, create a bundle definition to set which items you want to apply the discount to.
You can then create the rule to discount the items in the bundles created from that bundle definition:
- Open the Rule Builder for your campaign.
- Click Create Rule.
- In Effects, click Add Effect.
- In Discount, click Discount bundles pro rata.
- In Bundle definition, select a bundle definition that you have created.
- In Discount name, type a suitable name for your effect.
- In Discount value for each bundle, enter the value of the discount. It can be a number or a formula including attributes from the Attribute Selector such as the value of the item.
- (Optional) In Advanced Settings > Allow lower discount value if budget is insufficient,
select:
- Application Default Settings
- Yes
- No
- Click Done.
This effect returns the setDiscountPerItem API effect.
Discounting individual item in bundles pro rata
It allows you to discount a specific item in one or more item bundles. The discount value is applied pro rata: It is determined by the individual item, but it is divided among the items in those bundles in direct proportion to their individual prices.
The discount value is applied to each of the bundles formed from the same bundle definition.
Prorated discounts are rounded to the nearest hundredth. If the sum of all rounded individual discounts does not equal the total discount, the difference is subtracted or added to the values of the largest individual discounts. For example, a €20 discount spread evenly across six items will have a deficit discount value of €0.02. The deficit value will be added to two items.
Try creating a pro rata discount campaign for better understanding.
Before using this effect, create a cart item filter and a bundle definition.
You can then create the rule to discount a specific item in the bundles created from the bundle definition:
- Open the Rule Builder for your campaign.
- Click Create Rule.
- In Effects, click Add Effect.
- In Discount, click Discount individual item in bundles pro rata.
- In Bundle definition, select a bundle definition that you have created.
- In Discounted cart item, select the cart item you want to discount.
- In Discount name, type a suitable name for your effect.
- In Discount value, enter the value of the discount for each bundle. It can be a number or a formula, including attributes from the Attribute Selector, such as the value of the item.
- (Optional) In Advanced Settings > Allow lower discount value if budget is insufficient,
select:
- Application Default Settings
- Yes
- No
- Click Done.
This effect returns the setDiscountPerItem API effect.
Discounting additional costs
It allows you to discount additional costs applied to the entire customer session. Additional costs are extra costs such as shipping costs or other additional fees that you want to charge to customers.
With cart item flattening, identical products are viewed as single items in the cart and are discounted individually.
Before you start, create one or more additional costs per cart (session).
You can then discount an additional cost in your rule:
- Open the Rule Builder for your campaign.
- Click Create Rule.
- In Effects, click Add Effect.
- In Discount, click Discount additional cost.
- In Select additional cost, choose the cost you want to discount.
- In Discount name, type a suitable name for your effect.
- In Discount value, enter the value of the discount. It can be a number or a formula including attributes from the Attribute Selector such as the value of the additional cost.
- (Optional) In Advanced Settings > Allow lower discount value if budget is insufficient,
select:
- Application Default Settings
- Yes
- No
- Click Done.
This effect returns the setDiscountPerAdditionalCost API effect.
Discounting additional costs per item
It allows you to discount additional costs applied to individual cart items. Additional costs are extra costs such as shipping costs or other additional fees that you want to charge to customers.
Before you start, create one or more additional costs per item.
You can also create a cart item filter to define which items you want to apply the discount to. Otherwise, the only list available includes all the items in the cart and any Application cart item filters you created.
You can then discount an additional cost in your rule:
- Open the Rule Builder for your campaign.
- Click Create Rule.
- In Effects, click Add Effect.
- In Discount, click Discount additional cost per item.
- In Select additional cost, choose the cost you want to discount.
- In Pick a list of items, select a list.
- In Discount name, type a suitable name for your effect.
- In Discount value, enter the value of the discount. It can be a number or a formula including attributes from the Attribute Selector such as the value of the additional cost.
- (Optional) In Advanced Settings > Allow lower discount value if budget is insufficient,
select:
- Application Default Settings
- Yes
- No
- Click Done.
This effect returns the setDiscountPerAdditionalCostPerItem API effect.
Using reward effects
Adding a free item
It allows you to add a free item to the customer's session. For example, if customers purchase a certain number of items, such as in Buy two Get One Free promotions.
- Open the Rule Builder for your campaign.
- Click Create Rule.
- In Effects, click Add Effect.
- In Reward, click Add a free item.
- In SKU, enter the SKU of the item you want your customer to receive.
- In Discount name, type a suitable name for your effect.
- In Quantity, enter the number of free items. You can use the + symbol to the right to create a formula including attributes from the Attribute Selector.
- Click Done.
This effect returns the addFreeItem API effect.
Adding loyalty points
It allows you to reward your customers with points that they can later exchange for different items or use in future purchases. Points are added for the session total.
Before you start, ensure you have:
- Enabled the loyalty feature in your campaign.
- Created a profile-based loyalty program.
You can then add loyalty points in your rule:
-
Open the Rule Builder for your campaign.
-
Click Create Rule.
-
In Effects, click Add Effect.
-
In Reward, click Add Loyalty points.
-
In Select loyalty program, choose the loyalty program.
noteIf you select a loyalty program where you enabled subledgers, type in Subledger the name of the subledger where you want to add the points.
To add points to a subledger defined in a different campaign or Application, use its name. In case you use a different name that hasn't been used before, a new subledger is automatically created.
-
In Recipient, select where the points are added:
- For profile-based loyalty programs, your current customer is the default recipient.
If the Referrals feature is active
in your campaign, you can choose:
- Current Customer (Friend)
- Advocate
- For card-based loyalty programs, the default recipient is Loyalty card.
- For profile-based loyalty programs, your current customer is the default recipient.
If the Referrals feature is active
in your campaign, you can choose:
-
In Reason, type a description for this effect.
-
In Amount of points, set the value of the reward.
-
(Optional) Click Reward Settings to set start and expiration dates for the reward:
-
In Reward start date, select whether your rewards become active immediately, on an absolute date, or on a date relative to the customer session.
Examples: Relative reward start
For all the examples mentioned in this table, we assume that the customer session closes on
12 October 2024, 07:20:50
.Relative reward start date Points become active on 10
minute(s) after the session12 October 2024, 07:30:50
1
hour(s) after the session12 October 2024, 08:20:50
5
day(s) after the session17 October 2023, 07:20:50
5
day(s) after the session, start of the day17 October 2024, 00:00:00
5
day(s) after the session, end of the day17 October 2024, 23:59:59
1
week(s) after the session19 October 2024, 07:20:50
1
week(s) after the session, on the last Sunday20 October 2024, 23:59:59
1
month(s) after the session12 November 2024, 07:20:50
1
month(s) after the session, on the last day of the month30 November 2024, 23:59:59
-
In Reward expiration, select whether your rewards have an unlimited validity, expire on an absolute date, or expire on a date relative to the session.
notePoints added via the Add loyalty points effect do not follow the reward start and expiration dates of the loyalty program.
Examples: Relative reward expiration
For all the examples mentioned in this table, we assume:
- The customer session closes on
12 October 2024, 07:20:50
. - The rewarded loyalty points are active immediately.
Reward expiration Points expire on 10
minute(s) after the session12 October 2024, 07:30:50
1
hour(s) after the session12 October 2024, 08:20:50
5
day(s) after the session17 October 2023, 07:20:50
5
day(s) after the session, start of the day17 October 2024, 00:00:00
5
day(s) after the session, end of the day17 October 2024, 23:59:59
1
week(s) after the session19 October 2024, 07:20:50
1
week(s) after the session, on the last Sunday20 October 2024, 23:59:59
1
month(s) after the session12 November 2024, 07:20:50
1
month(s) after the session, on the last day of the month30 November 2024, 23:59:59
- The customer session closes on
-
-
(Optional) In Allow lower amount of points if budget is insufficient, select:
- Application Default Settings
- Yes
- No
-
Click Done.
Awarded points are displayed in the loyalty dashboard.
-
This effect returns the addLoyaltyPoints API effect.
-
When this effect results in the upgrade of a customer's tier, it also returns the changeLoyaltyTierLevel API effect.
Adding loyalty points per cart item
It allows you to reward your customers with points that they can later exchange for different items or use in future purchases. Points are added for individual cart items.
The awarded loyalty points are revoked if the item that triggered the effect is returned.
Before you start, ensure you have:
- Enabled the loyalty feature in your campaign.
- Created a profile-based loyalty program.
You can create a cart item filter to define which items you want to give loyalty points for. Otherwise, the only list available includes all the items in the cart and any Application cart item filters you created.
You can then add loyalty points in your rule:
-
Open the Rule Builder for your campaign.
-
Click Create Rule.
-
In Effects, click Add Effect.
-
In Reward, click Add loyalty points per item.
-
In Cart items filter, select a list of cart items. The list can be a bundle definition.
-
In Select loyalty program, choose the loyalty program.
noteIf you select a loyalty program where you enabled subledgers, type in Subledger the name of the subledger where you want to add the points.
To add points to a subledger defined in a different campaign or Application, use its name. In case you use a different name that hasn't been used before, a new subledger is automatically created.
-
In Recipient, select where the points are added:
- For profile-based loyalty programs, your current customer is the default recipient.
If the Referrals feature is active
in your campaign, you can choose:
- Current Customer (Friend)
- Advocate
- For card-based loyalty programs, the default recipient is Loyalty card.
- For profile-based loyalty programs, your current customer is the default recipient.
If the Referrals feature is active
in your campaign, you can choose:
-
In Reason, type a description for this effect.
-
In Amount of points, set the value of the reward.
-
(Optional) Click Reward Settings to set start and expiration dates for the reward:
-
In Reward start date, select whether your rewards become active immediately, on an absolute date, or on a date relative to the customer session.
Examples: Relative reward start
For all the examples mentioned in this table, we assume that the customer session closes on
12 October 2024, 07:20:50
.Relative reward start date Points become active on 10
minute(s) after the session12 October 2024, 07:30:50
1
hour(s) after the session12 October 2024, 08:20:50
5
day(s) after the session17 October 2023, 07:20:50
5
day(s) after the session, start of the day17 October 2024, 00:00:00
5
day(s) after the session, end of the day17 October 2024, 23:59:59
1
week(s) after the session19 October 2024, 07:20:50
1
week(s) after the session, on the last Sunday20 October 2024, 23:59:59
1
month(s) after the session12 November 2024, 07:20:50
1
month(s) after the session, on the last day of the month30 November 2024, 23:59:59
-
In Reward expiration, select whether your rewards have an unlimited validity, expire on an absolute date, or expire on a date relative to the session.
notePoints added via the Add loyalty points per item effect do not follow the reward start and expiration dates of the loyalty program.
Examples: Relative reward expiration
For all the examples mentioned in this table, we assume:
- The customer session closes on
12 October 2024, 07:20:50
. - The rewarded loyalty points are active immediately.
Reward expiration Points expire on 10
minute(s) after the session12 October 2024, 07:30:50
1
hour(s) after the session12 October 2024, 08:20:50
5
day(s) after the session17 October 2023, 07:20:50
5
day(s) after the session, start of the day17 October 2024, 00:00:00
5
day(s) after the session, end of the day17 October 2024, 23:59:59
1
week(s) after the session19 October 2024, 07:20:50
1
week(s) after the session, on the last Sunday20 October 2024, 23:59:59
1
month(s) after the session12 November 2024, 07:20:50
1
month(s) after the session, on the last day of the month30 November 2024, 23:59:59
- The customer session closes on
-
-
(Optional) In Allow lower amount of points if budget is insufficient, select:
- Application Default Settings
- Yes
- No
-
Click Done.
Awarded points are displayed in the loyalty dashboard.
-
This effect returns the addLoyaltyPoints API effect.
-
When this effect results in the upgrade of a customer's tier, it also returns the changeLoyaltyTierLevel API effect.
Redeeming loyalty points
It allows your customers to use their loyalty points in different ways, such as direct discounts.
Before you start, ensure you have:
- Enabled the loyalty feature in your campaign.
- Created a profile-based loyalty program.
You can then deduct loyalty points in your rule:
-
Open the Rule Builder for your campaign.
-
Click Create Rule.
-
In Effects, click Add Effect.
-
In Reward, click Redeem Loyalty points.
-
In Select loyalty program, choose the loyalty program from which you want to redeem points.
noteIf you select a loyalty program where you enabled subledgers, type in Subledger the name of the subledger where you want to add the points.
You can redeem points from any subledger, even if it was defined in a different campaign or Application. Just type the same name you assigned to the subledger when creating it.
-
In Reason, type a description for this effect.
-
In Amount of points, set the number of points to redeem.
-
Click Done.
This effect returns the deductLoyaltyPoints API effect.
Awarding a giveaway
It allows you to offer direct rewards to your customers. For example, you can grant them vouchers generated outside of Talon.One, such as Amazon gift cards.
Before you start, ensure you have:
- Created a giveaway pool and connected it to the Application containing your campaign.
- Imported codes into the pool.
- Enabled the giveaway feature in your campaign.
You can then award a giveaway in your rule:
-
Open the Rule Builder for your campaign.
-
Click Create Rule.
-
In Effects, click Add Effect.
-
In Reward, click Award giveaway.
-
In Giveaway pool, select the giveaway pool.
-
In Recipient, select who will receive the giveaway. Your current customer is the default option. If the Referrals feature is active in your campaign, you can choose:
- Current customer (friend)
- Advocate
noteTo give a reward to both of them, create a second Award giveaway effect.
-
Click Done.
This effect returns the awardGiveaway API effect.
Using creation effects
Creating a notification
It enables you to trigger a message that is intended to be displayed to the customer. It can be a rule effect or a failure effect.
For example, use this effect to inform a customer about a special discount when they are close to reaching the minimum amount necessary to obtain it or to debug a rule during the testing phase.
To create a notification as a rule effect:
- Open the Rule Builder for your campaign.
- Click Create Rule.
- In Effects, click Add Effect.
- In Create, click Create Notification.
- In Type, select the kind of notification you want to display.
- In Title, type a name for the notification.
- In Message, type what your customer will read. You can include attributes from the Attribute Selector such as coupons in the message.
- Click Done.
To learn how to create a notification as a failure effect, read Adding a failure effect to a condition.
This effect returns the showNotification API effect.
Creating a referral code
It allows you to grant your customers referral codes that they can give to their friends so that they too become customers.
The code is stored in the session and you can use it in another effect, such as Create notification, by selecting the Generated Referral in Session attribute in the Attribute Selector.
Before you start, ensure you have enabled the referrals feature in your campaign. You can then create a referral code in your rule:
-
Open the Rule Builder for your campaign.
-
Click Create Rule.
-
In Effects, click Add Effect.
-
In Create, click Create referral code.
-
Choose where you want to create a referral code:
- In the current Campaign.
- In a specific Campaign. If you choose this option, select the campaign in the drop-down menu.
-
In Redemption limit, set how many times the code can be used. Set it as
0
for unlimited redemptions. -
In Code pattern, define the characteristics of the coupon code:
- Use campaign settings code pattern.
- Use custom code pattern allows you to define a specific code length, the characters appearing in the code, a prefix and a suffix.
-
(Optional) In Set start time and end time, define start and expiration dates for your coupons.
noteTo specify a relative time, click Select a relative date. For days after the session,
- start of the day represents
00:00:00 hours
in the Application time zone. - end of the day represents
23:59:59 hours
in the Application time zone.
- start of the day represents
-
(Optional) In Referral attributes, define the value for any available referral attributes.
-
Click Done.
This effect returns the referralCreated API effect.
Creating a coupon code
It allows you to generate a coupon code or a gift card. The code can be generated for the campaign of your choice in the current Application, as long as they have the coupons feature enabled.
The code is stored in the session and you can use it in another effect, such as Create notification, by selecting the Generated Coupon in Session attribute in the Attribute Selector.
Before you start, ensure you have enabled the coupons feature in your campaign. You can then create a coupon code in your rule:
-
Open the Rule Builder for your campaign.
-
Click Create Rule.
-
In Effects, click Add Effect.
-
In Create, click Create coupon code.
-
Choose where you want to create a coupon code:
- In the current Campaign.
- In a specific Campaign. If you choose this option, select the campaign in the drop-down menu.
-
Set the details of your coupon code:
- Recipient: The customer that should receive the code.
- Redemption limit: How many times the code can be used. Set it as
0
for unlimited redemptions. - Discount limit: The maximum total discount given by the coupon.
- Code pattern: The specific code length, the characters appearing in the code and any prefix and suffix.
- Set start time and end time: Start and expiration dates.
noteTo specify a relative time, click Select a relative date. For days after the session,
- start of the day represents
00:00:00 hours
in the Application time zone. - end of the day represents
23:59:59 hours
in the Application time zone.
- Coupon attributes: The value for any available coupon attributes.
-
Click Done.
This effect returns the couponCreated API effect.
Reserving a coupon code
The Create coupon code reservation effect allows you to reserve the coupon codes of the current session for the customer profile of the session. This is useful, for example, to make a coupon redeemable only by a particular group of customers. For a sample scenario, see our Braze tutorial.
Talon.One provides soft and hard reservations. The type of reservation depends on the coupon code's properties:
- If the Reservation mandatory option was selected when the coupon code was created, the effect creates a hard reservation, meaning only users who have this coupon code reserved can redeem it.
- Otherwise, the effect creates a soft reservation, meaning the coupon will be associated with the customer profile (it shows up when using the List customer data endpoint), but any user can redeem it. This can be useful, for example, to display a coupon wallet for customers when they visit your store.
- You cannot use the Coupon code is valid or Coupon code is valid (without redemption) conditions in the same rule as the Create coupon code reservation effect.
- Contrary to most effects, this effect is applied when the session state is either
open
orclosed
. - You can also reserve coupon codes using the Create coupon reservation endpoint of the Integration API.
Before you start:
- Ensure you have enabled the coupons feature in your campaign.
- Create at least one coupon code.
To create a coupon reservation in your rule:
- Open the Rule Builder for your campaign.
- Click Create Rule.
- In Effects, click Add Effect.
- In Create, click Create coupon code reservation.
This effect returns the reserveCoupon API effect.
Using update effects
Updating an attribute value
It allows you to set a new value for a custom attribute.
Before you start, ensure you have defined one or more custom attributes. You can then update them in your rule:
- Open the Rule Builder for your campaign.
- Click Create Rule.
- In Effects, click Add Effect.
- In Update, click Update attribute value.
- In Set attribute, select a custom attribute from the Attribute Selector.
- In To new value, type a value or select an attribute from the Attribute Selector to define yours.
- Click Done.
This effect returns the updateAttribute API effect.
Updating a cart item attribute value
It allows you to set a new value for a custom attribute affecting only certain items in the customer's cart. Use the Integration API to set a cart item custom attribute.
Before you start, ensure you have:
- Defined one or more custom attributes.
- Created a cart item filter to define the items whose attribute value you want to update. Otherwise, the only list available includes all the items in the customer's cart and any Application cart item filters you created.
You can then update them in your rule:
- Open the Rule Builder for your campaign.
- Click Create Rule.
- In Effects, click Add Effect.
- In Update, click Update cart item attribute value.
- In Pick a list of items, select a list.
- In Set attribute, select a custom attribute from the Attribute Selector.
- In To new value, type a value or select an attribute from the Attribute Selector to define yours.
- Click Done.
This effect returns the updateAttribute API effect.
Updating an audience
It allows you to add a customer to or remove them from an audience. For example, you can add the customer of the current customer session to a Recurring customers audience and give them a 20% discount in the same campaign.
All the effects of a rule are applied before evaluating the next rule. To ensure the Update audience effect is applied before a discount is given, for example, ensure the rule that contains this effect is on top.
Before you start, ensure you have created an audience whose environment matches the environment of the Application you want to use it in.
You can then update an audience in your rule:
- Open the Rule Builder for your campaign.
- Click Create Rule.
- In Effects, click Add Effect.
- In Update, click Update audience.
- Choose whether you want to:
- Add a customer to an audience.
- Remove a customer from an audience.
- From the Audience dropdown, select the audience you want to update.
- From the Integration ID dropdown, choose the customer that should be added to or removed from the audience.
- Click Done.
This effect returns the following API effects:
- addToAudience when you add a customer to an audience.
- removeFromAudience when you remove a customer from an audience.
Using achievement effects
Updating customer progress
It allows you to update the progress of the customer in a particular achievement. Before you start, ensure you have created an achievement in your campaign.
- Open the Rule Builder for your campaign.
- Click Create Rule.
- In Effects, click Add Effect.
- In Achievements, click Update customer progress.
- In Achievement name, select or enter the name of the achievement in which you want to update the customer's progress.
- In Update progress by, set the value by which you want the customer's progress in the achievement to increase.
- Click Done.
This effect returns the increaseAchievementProgress API effect.
Using webhooks
Use webhooks to send information from Talon.One to external tools that use APIs. For example, you can create a webhook that triggers an email to a customer when their friend redeems a referral code. You can also define your own webhooks and use them as effects.
Learn more about webhooks in the Developer docs and learn how to use them in this tutorial.
This effect returns the triggerWebhook API effect.
Related pages
- See some examples of rules with effects in our tutorials:
- Cart item filters
- Application cart item filters
- API effects
- Exporting triggered effects
- Creating and managing item bundles
- Managing webhooks