In the first article of this 2-part series, we provided you the steps to connect a Watson Assistant chatbot with the Ramble metaphor. In this second part, we will provide actual code samples and examples to integrate your chatbot further with Ramble. Click on any of the accordion headers to expand that section to learn more.

* Unlike the first article, you do not need to follow this one in article. Use it more as a reference to accomplish only the tasks you need to be productive.

One of the most immediate benefits you'll see from hooking Watson Assistant to Ramble is having an easy to use metaphor for watching Live! bot traffic.

Clicking in to a particular conversation will provide you with insight into further variables you may have included with your engagement window (see the sections below regarding Variables and Personalization), information about where the visitor is located and what kind of device they're using (right panel) and then viewing any data the visitor has provided beyond the conversation (see the section Capturing Visitor Data).

But it even goes one step further. Ramble allows you to immediately "take over" a conversation and start conversing with a visitor that started a conversation with your Watson Assistant bot. While this is extremely valuable when watching in real-time, most of the time you'll not be. That's why the section below entitled Human Routing will be critical for you.

The Ramble + Watson Assistant integration is tightly coupled which means that option lists translate seamlessly to the Ramble engagement window metaphor. Simply use an option list in your node and Ramble will automatically translate it to an attractive, easy-to-select list based on the styling you define in the Ramble theme builder.
Ramble auto-translates your text and options

Visitors using Ramble's in-page chat or Chat from Anywhere engagement window to interact with your Watson Assistant bot are afforded both the option to select from buttons or type their communication in the input area. This affords you the opportunity to take advantage of Watson's world-leading NLU/NLP functionality.

There is nothing special to do to advantage of this functionality. Once Ramble and Watson are connected, the interface just works like it does from the Watson Assistant "Try It" button.

Sending images through the Ramble engagement window is as easy as using the "image" response type and putting in the correct image source. If you want both your text AND the image to show, make sure to set the response variation to "multiline".

Human routing is one of the most important facets of chatbots. Whether it's to close a sale or help a frustrated customer, visitors expect humans on the other end of chat, at least eventually. Ramble makes it possible.

While giving the visitor an option to eventually chat with a human, we also respect the availability of the reps who might answer the chat. We do that by using routing groups which have their own set availability. Availability includes hours of operation as well as timeout (don't ring that group for more than N seconds), Rollover (nobody answered, what next?) and Offhours settings.

There are 3 steps to start ringing your Ramble users from Watson. This assumes you have your teams and routing groups setup.

    1. Find your Routing Group ID. Because of the metadata (availability, etc.) that Ramble needs that is defined with a routing group, there is not an opportunity to send to a member. If you want a single member to ring, simply click that one member in the routing group and include the availability settings.
    1. Next, within Watson Assistant open the node context editor and input the variable $ramble_connect_to_agents = {{Your Routing Group ID}} (In our case 141).
Open the Watson Assistant context editor
  1. Finally, optionally, decide whether the bot should end at the moment routing beings. Note: Once a Ramble user picks up the chat it will automatically end the bot conversation (you can't have the bot interjecting a human-to-human conversation). If you would like the bot to end, include another context variable $ramble_connect_to_agents_end and set the value to true.

You can add one or more tags to a conversation in any dialog node. Be sure your tag already exists in Ramble and that the name that you use in Watson Assistant matches exactly! When it comes to applying tags, there are two approaches:

    • Option 1 is for adding one or more tag(s) in a single node. In the node you want to apply the tag, open the context editor and add the variable $ramble_tags with a value "[ '{{Your Tag Name}}', '{{Your 2nd Tag Name' ]".
Open the Watson Assistant context editor
  • Option 2 is a little more complicated but it allows you to add tags anywhere throughout the bot dialog. In this approach you'll initialize the $ramble_tags context variable at the beginning of your bot as an array. Use [] as the value for $ramble_tags in its initialization. To make sure this happens before your tags are to be applied, we recommend doing it in the Welcome node. Then, in the node that you want to add the tag, again set the $ramble_tags context variable, but this time use a Watson Assistant formula in the value that looks like this "<? $ramble_tags.append('Testing') ?>"

Note: Once a tag is applied, you cannot remove it using the Watson Assistant integration.

Note: A tag cannot be applied until AFTER the welcome node is shown.

Refer to the following help article for instructions on how to get your Watson Assistant External APIs working.