# 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'],
locale: "fr-FR",
custom: {
viewCount: 6
}
});
2
3
4
5
6
7
8
9
10
11
# Parameters
['admin'], ['sales-rep','sales-manager']. Ignored if it is not mapped to a field in the Chargebee Retention dashboard.The user's locale (for example, en-US, fr-FR). Chargebee matches this value against the language matching rules configured in the Chargebee Growth dashboard and displays the offer in the matching language. If you omit this parameter, Chargebee matches the browser language instead. If no rule matches, Chargebee displays the offer in your site's primary language, which is English.
Requires multi-language support; contact the Chargebee Support to enable it for your site. Until then, Chargebee ignores this parameter. To configure languages, add each language and its matching rules under Settings > Languages in the Chargebee Growth dashboard, then add the translations for each language while setting up offers.
# Returns
None.