Documentation/GWC/9.0Draft/WidgetsAPI/CustomEmoji
Customizable Emoji Menu
Introduction
WebChat offers a new v2 emoji menu that lets you choose emoji you want to offer.
Differences between v1 and v2
- v1 shows as a tooltip-style overlay. v2 shows as a new block between the transcript and the message input
- v1 closes when you select an emoji or click outside the menu. v2 lets you choose multiple emoji and only closes if you click the emoji menu button again.
- v1 has 3 fixed emoji to choose from. v2 can show hundreds of customizable emoji in a grid layout
- v1 menu appears in mobile mode. v2 menu is not available in mobile mode (when v2 is configured, no emoji menu button is present in mobile mode).
- v1 menu has default emoji. v2 menu does not have default emoji. It must be explicitly configured with a list of emoji.
Usage
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 dependent on the number of emoji configured.
- When 1-8 emoji are configured, the menu is one row tall, no scrollbar appears.
- When 9-16 emoji are configured, the menu is two rows tall, no scrollbar appears.
- When 17-24 emoji are configured, the menu is three rows tall, no scrollbar appears.
- When 25 or more emoji are configured, the menu is three rows tall and a scrollbar appears.
Configuring
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 = "๐คฉ๐คช๐คญ๐คซ๐คจโฟ๐คฎ๐คฏ๐ง๐คฌ๐งก๐ค๐คฒ๐ง ๐ง๐ง๐ง๐ง๐ง๐คฑโฟ๐ง๐ง๐ง๐ง๐ง๐ง๐ง๐ง๐ง๐ง๐ฆ๐ฆ๐ฆ๐ฆ๐ฆ๐ฆ๐ฅฅ๐ฅฆ๐ฅจ๐ฅฉ๐ฆ๐บ๐ซ๐ท๐๐๐จ๐ฆ๐ง๐ท๐๐
๐ฒ๐ฝ๐ฏ๐จ๐ณ๐ฐ๐ฅ๐๐จ๐ช๐๐ฅ๐๐๐๐๐บ๐ธ๐ฉ๐๐๐ณ๏ธโ๐๐โช๐ฑโโ๐๐ฆ๐๐ฐโ๐ฟโฝ๐";Emoji Display Names
You can also add names to emoji so their name will appear when you hover over them. To add names to emojis, you simple add a colon and a name, and separate each instance with semicolons.
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 = "๐คฉ:Star-Struck;๐คช:Zany Face;๐คญ:Face With Hand Over Mouth;๐คซ:Shushing Face;๐คจ:Face With Raised Eyebrow;โฟ:Bitcoin;๐คฎ:Face Vomiting;๐คฏ:Exploding Head;๐ง:Face With Monocle;๐คฌ:Face With Symbols on Mouth;๐งก:Orange Heart;๐ค:Love-You Gesture;๐คฒ:Palms Up Together;๐ง :Brain;๐ง:Child;๐ง:Person;๐ง:Man: Beard;๐ง:Older Person;๐ง:Woman With Headscarf;๐คฑ:Breast-Feeding;โฟ:Bitcoin;๐ง:Mage;๐ง:Fairy;๐ง:Vampire;๐ง:Merperson;๐ง:Elf;๐ง:Genie;๐ง:Zombie;๐ง:Person in Steamy Room;๐ง:Person Climbing;๐ง:Person in Lotus Position;๐ฆ:Zebra;๐ฆ:Giraffe;๐ฆ:Hedgehog;๐ฆ:Sauropod;๐ฆ:T-Rex;๐ฆ:Cricket;๐ฅฅ:Coconut;๐ฅฆ:Broccoli;๐ฅจ:Pretzel;๐ฅฉ:Cut of Meat;๐ฆ๐บ:Australia Day;๐ซ๐ท:Bastille Day;๐:Birthday;๐:Black Friday;๐จ๐ฆ:Canada Day;๐ง๐ท:Carnaval;๐:Chinese New Year;๐
:Christmas;๐ฒ๐ฝ:Cinco de Mayo;๐ฏ:Diwali;๐จ๐ณ:Dragon Boat Festival;๐ฐ:Easter;๐ฅ:Emoji Movie;๐:Fall / Autumn;๐จ:Fatherโs Day;๐ช:Festivus;๐:Graduation;๐ฅ:Guy Fawkes;๐:Halloween;๐:Hanukkah;๐:Hearts;๐:Holi;๐บ๐ธ:Independence Day;๐ฉ:Motherโs Day;๐:New Yearโs Eve;๐:Olympics;๐ณ๏ธโ๐:Pride;๐:Queenโs Birthday;โช:Ramadan;๐ฑ:Spring;โ:St Patrickโs Day;โ:Summer;๐:Super Bowl;๐ฆ:Thanksgiving;๐:Valentineโs Day;๐ฐ:Wedding / Marriage;โ:Winter;๐ฟ:Winter Olympics;โฝ:World Cup;๐:World Emoji Day;";Partially Named Lists
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 = "๐คฉ๐คช๐คญ๐คซ๐คจโฟ๐คฎ๐คฏ๐ง๐คฌ๐งก๐ค;๐คฒ:Palms Up Together;๐ง ๐ง๐ง๐ง๐ง๐ง๐คฑโฟ๐ง๐ง๐ง๐ง๐ง๐ง๐ง๐ง๐ง๐ง๐ฆ๐ฆ๐ฆ๐ฆ๐ฆ๐ฆ๐ฅฅ๐ฅฆ๐ฅจ๐ฅฉ๐ฆ๐บ๐ซ๐ท๐;๐:Black Friday;๐จ๐ฆ๐ง๐ท๐๐
๐ฒ๐ฝ๐ฏ๐จ๐ณ๐ฐ๐ฅ๐๐จ๐ช๐๐ฅ๐๐๐๐๐บ๐ธ๐ฉ๐๐๐ณ๏ธโ๐๐โช๐ฑโโ๐๐ฆ๐๐ฐ;โ:Snowman;๐ฟโฝ๐";
Localization
Emoji can be localized so that each language has a preferred set of emoji and emoji titles.
The key name for defining an emoji list is "EmojiList".
Example:
{
"en": {
"webchat": {
"EmojiList": "๐คฉ:Star-Struck;๐คช:Zany Face;๐คญ:Face With Hand Over Mouth;๐คซ:Shushing Face;"
}
}
}Emoji lists are defined in a localization file using the same syntax as the WebChat configuration.


