cello.boot(options)
Initializes Cello Referral Component in your product.
Returns a promise that is resolved once the whole initialization process is finished or rejected if the boot command failed.
window.cello object to avoid that particular race condition.
For any other commands, or when you are sure that the command is called after the library has finished loading, you can opt to use the regular command syntax:
Accepts
object
required
The initialization options object:
Example
changeLanguage(language)
Changes the Referral Component language at runtime without re-initializing it.
Accepts
string
required
The language string in ISO 639-1
setThemeMode(theme)
Changes the Referral Component theme at runtime without re-initializing it.
Accepts
string
The theme mode to apply. Accepted values are
light or dark. close()
Closes Referral Component.
getActiveUcc()
Returns active ucc and invite link for the currently logged-in user.
Returns
object
The active ucc object:
getCampaignConfig()
Returns campaign config values for the currently logged-in user.
Returns
object
The campaign config object:
getLabels()
Returns select labels used in our Referral Component.
Returns
object
The labels object:
hide()
Hides the Cello button or bookmark that launches the Referral Component.
open(destination)
Opens Referral Component.
Accepts
string
Optional destination string to open Referral Component on a specific tab or page:
"rewards"- open Referral Component on the rewards tab"edit-payments"- open Referral Component on the payment details page
show()
Shows the Cello button or bookmark that launches the Referral Component.
showAnnouncement(announcement)
Triggers an announcement.
Accepts
string
required
Example
Example below triggers a default welcome announcement:shutdown()
Shuts down connection to Cello and unmounts the Referral Component.
updateProductUserDetails(productUserDetails)
Updates user details at runtime without re-initializing the Referral Component.
Accepts
object
required
The product user details object