# Personalized Offers Object ✨

Early Access

The Personalized Offers feature is in early access. To request access, visit this page in Chargebee Billing (opens new window).

Previous Version

The earlier version of Personalized Offers was delivered via Retention.js, which has since been deprecated. You can still view the documentation (opens new window) for reference.

A Personalized Offers instance can be used to dynamically display eligible offers (opens new window) to the user.

Create a personalizedOffers object using the chargebee object to use the functions listed below.

# Initialize personalized offers

# init()

Initializes the personalized offers experience and displays eligible offers to the user.

Chargebee detects the pages visited by the user and dynamically displays eligible offers that have been pre-configured in the Retention dashboard.

# Example

personalizedOffers.init({
  account: {
    customerId: "16CRibUdE6pV6HoU"
  },
  externalUserId: "jane_doe",
  roles: ['sales-manager'],
  custom: {
    viewCount: 6
  }
});
1
2
3
4
5
6
7
8
9
10

# Parameters

account
Object Required View properties
Details about the customer.
subcription
Object Required if multiple brands are configured in the Growth dashboard. View properties
Details about the specific subscription of the customer for which to display the offer.
firstName
String
The first name of the logged-in user. Ignored if it is not mapped to a field in the Chargebee Retention dashboard.
lastName
String
The last name of the logged-in user. Ignored if it is not mapped to a field in the Chargebee Retention dashboard.
fullName
String
The full name of the logged-in user. Ignored if it is not mapped to a field in the Chargebee Retention dashboard.
email
String
The email address of the logged-in user or the organization's primary contact. Ignored if it is not mapped to a field in the Chargebee Retention dashboard.
externalUserId
String
The logged-in user's unique ID in your system. Ignored if it is not mapped to a field in the Chargebee Retention dashboard.
roles
Array<String>
A list of roles that the logged-in user has in your application. For example: ['admin'], ['sales-rep','sales-manager']. Ignored if it is not mapped to a field in the Chargebee Retention dashboard.
custom
Object
An object containing one or more custom fields defined in the Chargebee Retention dashboard. Ignored if it is not mapped to a field in the Chargebee Retention dashboard.

# Returns

None.