# Personalized Offers Object ✨

Early Access

The Personalized Offers feature is in early access. To request access, write to eap@chargebee.com.

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.

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.

# 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 or user account.
subcription
Object View properties
Details about the subscription.
firstName
String
The first name of the customer or user.
lastName
String
The last name of the customer or user.
fullName
String
The full name of the customer or user.
email
String
The email address of the customer or user.
externalUserId
String
The customer's or user's unique ID in your system.
roles
Array<String>
A list of roles that the customer or user has in your application. For example: ['admin'], ['sales-rep','sales-manager'].
custom
Object
An object containing one or more custom fields defined in the Chargebee Retention dashboard.

# Returns

None.