Incentivizing sharing of product links
Customers often share links to promoted products with their friends. When such a referral converts into a new sale, the customer and their friend receive benefits.
Let's imagine the products we're promoting are a black leather jacket, a red hat, and a blue tie. Let's also imagine the customer shares the product link by clicking a Share button on the ecommerce website.
We can create a standard campaign and build promotion rules in such a way that:
- When the customer shares any of the promoted products, we generate a referral code.
- When the customer's friend redeems the referral code on their first purchase:
- They receive a 10% discount on their total cart value.
- We generate a coupon code for the customer.
- When the customer redeems it on their next purchase, they also receive a 10% discount on their total cart value.
The Referrals and Coupons features must be enabled.
To achieve this, let's create the following:
- A custom event to capture the sharing of the product link.
- A promotion rule to generate the referral code.
- A promotion rule to redeem the referral code.
- A promotion rule to redeem the coupon code from the referral.
Sharing the product link
All incoming data in Talon.One is connected to an event. Talon.One provides default events to capture customer profile and session updates.
In our case, we want to capture the action of a customer sharing a product link when they click a Share button on the ecommerce website. Because this action is not related to a customer session or profile, we cannot use a default event to capture this action.
Let's create a custom event instead.
- Associated entity:
Event
- Event type:
URL Share
- Attribute type:
String
- API name:
url_share
- Rule Builder name:
Sharing of Product Link
- Rule Builder description:
This event records the sharing of a product link by a customer.
- Available in our Application.
When the customer clicks Share on the leather jacket, the website sends a request to the Track event V2 endpoint with the following payload:
{
"profileId": "{{Integration_id}}",
"type": "URL Share",
"attributes": {
"url_share": "jacket012345" // the SKU of the product that was just shared
},
"responseContent": [
"triggeredCampaigns",
"customerProfile"
]
}
Generating a referral code
Let's open the Rule Builder to build our first rule. In the Rule Builder, we can do the following:
-
List the SKUs of the promoted products by creating a collection and naming it
promoted_sku_list
. -
Create a rule so that Talon.One generates a referral code only when the link shared by the customer belongs to one of our promoted products.
- The generated referral code has a redemption limit of
1000
. - Name the rule
Generate referral code on product share
. It has one condition and one effect.
- The generated referral code has a redemption limit of
Rule 1: Condition
Check for event types and custom event values: Event type is url_share
and Sharing of Product Link
is in collection "promoted_sku_list"
.
Rule 1: Effects
- Create referral code:
In the current campaign
and Redemption limit is1000
. - Display an Info notification to your user, with the title: Type is
Info
, Title isYour referral code!
and Message isThe referral code for your friend is [GeneratedReferral]
.
Redeeming the referral code
To find potentially discounted products by their SKU, let's
apply a cart item filter
on the received sessions.
This step ensures that the referral works only for our promoted products.
Let's name the filter promoted_products
.
- Customer's cart items (Current Session): Condition is
SKU of item (Item)
and is in collection ispromoted_sku_list
.
We can now build our second rule, which applies to the friend redeeming the referral code. It checks if the code is valid and if the friend has made any previous purchases. We want the referral offer to apply only to new customers who are making their first purchase.
Let's name the rule Redeem the referral code
. It has two conditions and two effects.
Rule 2: Conditions
- Referral code is valid
- Check attribute value:
Closed sessions (Customer Profile)
is equal to0
Rule 2: Effects
- Discount individual items: Pick a list of items is
promoted_products
, Discount name is10% off per promoted product
and Discount Value is([Item.Quantity] * [Item.Price]) * 10%
. - Create coupon code:
In the current campaign
, Recipient isAdvocate
and Redemption Limit is1
.
Redeeming the coupon code from the referral
Our third rule applies to the customer, who redeems the coupon code from the referral.
Let's name the rule Redeem coupon code from referral
. It has one condition and one effect.
Rule 3: Condition
Coupon code is valid.
Rule 3: Effect
Discount session total: Discount name is "10% off" and Discount Value is
[Session.Total] * 10%
.