Using Scripted Chatbot with Web Conversations

📘

Disclaimer

At the moment Web Conversations projects are coupled to Conversational AI Cloud projects. Normally, each client gets a clients account which contains a number of projects. To prevent the creation of many unused Conversational AI Cloud clients there is currently one single client made to facilitate using Web Conversations in combination with Scripted Chatbot: Web Conversations Scripted Chatbot (key: WebConversationsScriptedChatbot).

When wanting to onboard a new client on this setup one has to create a new project connected to the generic client account. This is done by Dennis van Oosterhout. If he's not available, Rutger de Ruijter can be contacted.

Only CM employees will be added to these projects, excluding clients to inspect and use them directly. This will be the way of working until Web Conversations projects can be provisioned without the need for a Conversational AI Cloud project.

Once the Scripted Chatbot has been provisioned and you have access to a new client project in Conversational AI Cloud (as described in above disclaimer) you can follow these steps to set up a Scripted Chatbot accessible via a Web Conversations project:

  1. Browse to the Scripted Chatbot instance (https://www.cm.com/en-gb/app/scripted-chatbot).

  2. Open the Router tab.

  3. Create a ruleset or adapt an existing one.

    1. Scripted Chatbot points to a TwoWay adapter representing Web Conversations and vice versa. The TwoWay adapter configuration is described here. Use following values:

      1. Message endpoint URL: https://cxcomlive-webconvwa-weu.azurewebsites.net/botRouter.
      2. Handover endpoint URL: https://cm.com.
    2. If you also want to facilitate a handover from the Scripted Chatbot to Mobile Service Cloud two more adapters need to be added.

      1. Conversation History
      2. Robin
        1. API key: the MSC project key

      Recreate the links in below ruleset.

332332

Web Conversations + Scripted Chatbot + Mobile Service Cloud ruleset.

  1. Browse to https://webconversations.digitalcx.com/.
  2. Click on the plus sign to create a configuration, then fill out the fields:
    1. Title: name of the Web Conversations configuration, chosen by you.
    2. Type: choose Web Chat.
    3. Project: the name of the Conversational AI Cloud project created specifically for this client.
    4. Culture: not relevant when using Scripted Chatbot, choose any of the available options.
  3. When the configuration is created it is automatically opened, after which we need to set some values to connect the configuration to the CM.com platform account the Conversational Router belongs to.
    1. Product token: the product token belonging to the logical account.
    2. Account ID: the technical link id of the Conversational Router. (One way to retrieve this is using a Copy Outbound Url button in the Conversational Router and taking the first id, right after accounts/.)
    3. Web Conversations: the adapter id of the TwoWay adapter configured to connect to Web Conversations. (One way to retrieve this is using the Copy Outbound Url button of the corresponding adapter in the Conversational Router and taking the last id, right after adapters/.)
19161916

Fill out the indicated fields.

  1. Copy the id of the Web Conversations configuration from the URL, https://webconversations.digitalcx.com/config/chat/{id}.
  2. Browse back to the Scripted Chatbot instance (https://www.cm.com/en-gb/app/scripted-chatbot).
  3. Add a conversation owner with these settings:
    1. Channel: CXWebConversations
    2. Conversation Owner: the id of the Web Conversations configuration you copied beforehand.
  4. In case a handover is desired a few more configurations need to be done.
    1. Within the Scripted Chatbot there will be a moment where you want to start the handover. This is done by adding a Hand Over step. The mandatory fields:
      1. Mutation Type: Disable Component
      2. Component: Scripted Chatbot
      3. Context key: WebstoreReferrer, context value: discuss with your MSC technical contact.
      4. Context key: RoutingKeywords, context value: discuss with your MSC technical contact.
366366

An example of the Hand Over step configuration.

  1. Continuing...
    1. In the Command Center of Mobile Service Cloud you need to define a messaging channel. This will allow messages from the created Web Conversations configuration to enter the MSC dashboard and send messages back to it. The fields that need to be filled out:
      1. External Identifier: the id of the Web Conversations configuration you copied beforehand.
      2. Channel: WebChat
      3. Provider: CXWebConversations
      4. Webhook URL: the outbound URL for the Robin adapter in the Conversational Router. (One way to retrieve this is using the Copy Outbound Url button belonging to the Robin adapter in the Conversational Router.)
      5. External Authentication: the product token belonging to the logical account used for the Scripted Chatbot and Conversational Router.
860860

An example of the messaging channel configuration in Command Center.

After going through the above steps you can test whether everything works from the Web Conversations frontend. When that is the case the client can put the Web Conversations configuration on their website, enabling their customers to interact with it.


Did this page help you?