Settings
Settings are set in advanced for each appkey, and can be overridden in runtime using the appendSettings API.
Name | Type | Description | Default |
---|---|---|---|
plugins | Plugins | allow to extend or override timeline items | [] |
theme | Theme | allow overriding the theme - such as colors, texts, etc | default theme |
expertise | string[] | allow override the session required expertise | the expertise attached to the app key |
expertiseByTag | Record<string, string[]> | allow tagging the overridden expertise, so for the next override it will be possible to change only part of them. see the example below | { } |
messagingPool | string | allow overriding the session pool | the pool attached to the app key |
isDrawerEnabled | boolean | allow use the floating drawer experience (for mobile browsers only) | false |
containerElementId | string | allowing stretch the SDK on a page element instead of a floating chat | null |
isHidden | boolean | indicating if the SDK is presented or screen or not | false |
language | string | allows to change the language - contact the SDK team to enable this feature | en |
experienceTypeMobile | 'pill'/'drawer'/'fabio' | allows to change the fab mobile experience | the experience attached to the app key |
experienceTypeDesktop | 'pill'/'fabio' | allows to change the fab desktop experience | the experience attached to the app key |
isMessagingOverlayExpanded | boolean | allows to expand or collapse the fab messaging overlay |
expertiseByTag
Let's take an example where we want to add Italian language expertise to a base expertise array of ['general-conversation']
.
With the basic expertise, adding "language-it-it"
to the previous expertise:
window.AE_SDK((thrownError, AE_SDK) => {
AE_SDK.appendSettings(settings => {
settings.expertise = [...settings.expertise, "language-it-it"];
return settings;
});
});
now, saying we then need to change the language expertise again, to French.
We could look for the Italian expertise in the array and replace it, but there are cases where we don't know which one to look for.
At this use-case, tagging the language expertise can be useful, for example:
window.AE_SDK((thrownError, AE_SDK) => {
AE_SDK.appendSettings(settings => {
settings.expertiseByTag = {
...settings.expertiseByTag,
language: ["language-fr-ca"],
};
return settings;
});
});
In this example, we only switch a specific group of expertise which we marked with a tag of language without affecting the base expertise of [general-conversation]
.
Language isn't a keyword. expertiseByTag can have any arbitrary tag. The SDK will group all the expertise and tagged expertise into 1 array of strings.