This page was last edited on April 1, 2020, at 00:09.
Comments or questions about this documentation? Contact us for support!
WebChat offers a new v2 emoji menu that lets you choose emojis you want to offer.
Clicking the Emoji menu icon at the bottom-left corner of the WebChat UI will open the v2 emoji menu. The transcript will be resized to fit the emoji menu, which can vary in height depending on the number of emojis configured.
The v2 emoji menu can be configured by passing a string containing emoji into the WebChat configuration or through localization.
You configure the emoji list by specifying a string of emoji characters, like "😀😑😕😗". WebChat will parse this string and arrange them into the emoji menu.
// Configure a flat list of emoji characters
_genesys.widgets.webchat.emojiList = "😀😑😕😗😙😛😟😦😧😬😮😯😴";
You can also add names to emojis so their name will appear when you hover over them. To add names to emojis, you simply add a colon and a name, and separate each instance with a semicolon.
The format is ;😀:name;
You can only add one name to an emoji. Each emoji:name pair must be separated by a semicolon at each end to separate it from the others. A colon must be used to link the title to the emoji.
// Configure an emoji list with emoji names
_genesys.widgets.webchat.emojiList = "😀:grinning;😑:expressionles;😕:confuse;😗:kissing;😙:kissing_smiling_eyes;😛:stuck_out_tongue;😟:worried;😦:frowning;😧:anguished;😬:grimacing;😮:open_mouth;😯:hushed;😴:sleeping;";
You don't have to add names for every emoji. You can add titles to only a select few.
// Configure an emoji list with only a few emoji names
_genesys.widgets.webchat.emojiList = "😀😑;😕:confuse;😗😙;😛:stuck_out_tongue;😟😦😧😬😮;😯:hushed;😴:sleeping;";
Emojis can be localized so that each language has a preferred set of emojis and emoji titles.
The key name for defining an emoji list is "EmojiList".
Example:
{
"en": {
"webchat": {
"EmojiList": "😀:grinning;😑:expressionles;😕:confuse;😗:kissing;😙:kissing_smiling_eyes;😛:stuck_out_tongue;😟:worried;😦:frowning;😧:anguished;😬:grimacing;😮:open_mouth;😯:hushed;😴:sleeping;"
}
}
}
Emoji lists are defined in a localization file using the same syntax as the WebChat configuration.