Skip to main content

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:

  1. When the customer shares any of the promoted products, we generate a referral code.
  2. When the customer's friend redeems the referral code on their first purchase:
    1. They receive a 10% discount on their total cart value.
    2. We generate a coupon code for the customer.
  3. When the customer redeems it on their next purchase, they also receive a 10% discount on their total cart value.
note

The Referrals and Coupons features must be enabled.

To achieve this, let's create the following:

  1. A custom event to capture the sharing of the product link.
  2. A promotion rule to generate the referral code.
  3. A promotion rule to redeem the referral code.
  4. A promotion rule to redeem the coupon code from the referral.

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:

  1. List the SKUs of the promoted products by creating a collection and naming it promoted_sku_list.

  2. 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 1 condition and 1 effect.

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 is 1000.
  • Display an Info notification to your user, with the title: Type is Info, Title is Your referral code! and Message is The 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 is promoted_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 2 conditions and 2 effects.

Rule 2: Conditions

  • Referral code is valid
  • Check attribute value: Closed sessions (Customer Profile) is equal to 0

Rule 2: Effects

  • Discount individual items: Pick a list of items is promoted_products, Discount name is 10% off per promoted product and Discount Value is ([Item.Quantity] * [Item.Price]) * 10%.
  • Create coupon code: In the current campaign, Recipient is Advocate and Redemption Limit is 1.

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 1 condition and 1 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%.