Telecommunication

This guide is for businesses in the telecommunications area. It shows how Talon.One can be used to provide loyalty programs and discounts. There are two steps to using Talon.One:

  1. Notify our API of assorted customer activities.

  2. Handle the effects returned by our API.

The decision of which effects to return for a given customer activity is controlled by the Talon.One rule engine.

#1. Send activity notifications

The easiest way to get started is with our SDKs. After the SDK has been installed & configured you will use the following API calls:

Below we show example API calls for different customer activities: viewing products, updating an order, and entering a promotional code.

#1.1. User views products on a category page.

Track a custom viewedCategory event with a category and planDuration attribute whenever a user visits a category page:

talon.trackEvent("session1234", "viewedCategory", { category: `bundles`, planDuration: `24` })

This allows campaigns to offer promotions specific to the category and/or the products the user is currently viewing. For example, a response may contain the following effect:

["offerDiscount", "Now 10% on all 24 month plans!"]

#1.2. User updates an order

Send a session update with the current items whenever a user updates their order:

talon.updateCustomerSession("session1234", {
  attributes: {
    ShopId: 53
  },
  cartItems: [{
    sku: "SKU378312",
    name: "24 Month & iPhone 7",
    quantity: 1,
    cost: 499.99,
    attributes: {
      planDuration: 24,
      category: "bundles"
    }
  }]
})

This allows campaigns in the rule engine to trigger effects based on the cart contents. E.g. we could create a campaign that gives a 10% discount when the category is bundles and the planDurationis 24 ( 24 months):

["setNewQuote", "Bundle Special", 49.99]

#1.3. User enters a promo code

Send a session update whenever a user enters a promo code:

talon.updateCustomerSession("session-1234", { coupon: "Christmas Special" })

The Talon.One rule engine will validate the code, and return either an acceptCoupon effect (and any other effects that were triggered), or a rejectCoupon effect indicating that the coupon was not valid.

Successful validation:

["acceptCoupon", "Christmas Special"]
["setDiscount", "$20 on all 24 month plans", 20]

Unsuccessful validation:

["rejectCoupon", "Christmas Special"]

#2. Handle effects

The rule engine will send back discounts and other actions to take in the form of effects. These are handled in your integration by registering effect handlers:

talon.handleEffect('setDiscount', function (context, label, amount) {
   context.order.addOrReplaceDiscount(label, amount)
})

#3. References

  • See Handling effects for more information on the types of effects the Rule Engine might return and their arguments.

  • See Data Model overview for more information on what information you can use in your campaigns to conditionally trigger effects.