Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • lumaChatContainer
  • lumaChatHeaderContainer
  • lumaTextBot
  • lumaTextUser
  • lumaTextAgent
  • messageInfoBot
  • messageInfoUser
  • botFaceIcon
  • agentIcon
  • welcomeContainer
  • welcomeImage
  • brokenBot
  • downloadLink
  • chatInput
  • attachFile
  • connectionStart
  • cardText
  • cardTitle
  • cardSubTitle
  • cardButton
  • quickReplyTitle
  • quickReplySubTitle
  • quickReplyButton

Enable Call-back on Web Widget

You can allow call-back on the Web Widget embedded on your Website. This enables the bot to perform an action on your webpage such as browsing to a new tab, navigating to a section in the page, redirecting to a new webpage or assigning value to an attribute without displaying the information to the end-user.

Following is the sample code to enable call-back on the Web Widget. The end-users are redirected to the Contacts page on the Website when the skill Customer Support Queries (Skill identifier: customer_support_queries) is requested. You may customize the code and add it to the Body code on the index.html file to change the behavior as required.

Code Block
languagexml
titleBody Code Sample
linenumberstrue
<script>
    LumaBot({
      botName: "LumaChatBot",
      user: {
        clientUserId: '<USER ID>',
        additionalProperties: {
        }
      },
      secretkey: '<YOUR SECRET KEY>',
      domain: "<YOUR DOMAIN>",
      styleOptions: {
        lumaChatContainer: {
          width: '400px'
        }
      }
    },
      document.getElementById("botHere"));
    function toggleChatWidget() {
      LumaBot.toggleChatWidget();
    }
    LumaBot.getIncomingMessages(callback);
    function callback(data) {
      console.log(data);
      if (data) {
        if (data && data.conversationContext && data.conversationContext.conversationAttributes.skillIdentifier === 'customer_support_queries') {
          console.log("moving to another page");
          window.location.href = "./contact/index.html";
        }
        if (data && data.conversationContext && data.conversationContext.conversationAttributes.skillIdentifier === 'corporate_office_location') {
          console.log("moving to another page");
          window.location.href = "./customer-support/index.html";
        }
      }
    }
  </script>

Chat with the Bot

Once the service is running you can send and receive messages from your bot.

In case of any issues with the configuration, please contact the Serviceaide Support team.

Additional Information

Following is the list of additional information while using the web widget:

...