The Chatbot Web SDK now supports game integration to enhance user experience during human escalation scenarios. When a conversation is escalated to a human operator and the user enters a waiting state, interactive games can be automatically launched to keep users engaged while they await assistance.
Supported Games
1. Emoji Riddle Game
An engaging puzzle game where users solve riddles using emoji clues. Perfect for quick mental exercises while waiting.
2. Flappy Bird
A classic arcade-style game that provides entertainment and helps pass time during operator assignment delays.
Widget Settings Configuration
To enable gamification in your chatbot:
- Go to widget settings → branding section
- Paste your desired game integration code in the branding section
Game Launch on Human Escalation
Use the following event listeners to automatically trigger games when human escalation occurs:
Emoji Riddle Integration
To add Emoji Riddle integration to your chatbot, use the following code:
$yourgptChatbot.on("escalatedToHuman", function() { $yourgptChatbot.execute("game:start", {id:"emojiRiddle"});});
Flappy Bird Integration
To add Flappy Bird integration to your chatbot, use the following code:
$yourgptChatbot.on("escalatedToHuman", function() { $yourgptChatbot.execute("game:start", {id:"flappyBird"});});
iFrame Integration
$yourgptChatbot.on("escalatedToHuman", function() { // Open an iframe when escalated to human $yourgptChatbot.execute("bottomSheet:open", { url: "https://simple-iframe-demo.glitch.me/" });});