Enterprise Resource Planning Blogs by Members
Gain new perspectives and knowledge about enterprise resource planning in blog posts from community members. Share your own comments and ERP insights today!
Showing results for 
Search instead for 
Did you mean: 
IBM Watson Assistant is an AI-powered virtual agent that provides fast, consistent, and accurate answers across any messaging platform, application, device, or channel. Using AI and natural language processing, Watson Assistant learns from customer conversations, improving its ability to resolve issues the first time while removing the frustration of long wait times, tedious searches, and unhelpful chatbots. With Watson Assistant, you can build conversational interfaces into any application, device, or channel.

As shown in the SAP Discover Center, SAP Conversational AI is scheduled to be removed from the list of Eligible Cloud Services on 31 July 2023.

SAP recently announced that they are embedding IBM Watson AI into their solutions. You can read more about this in SAP to Embed IBM Watson Artificial Intelligence into SAP Solutions.

This tutorial is the first in a series of tutorials that will show how to use IBM Watson Assistant along with SAP Systems (S/4HANA, Ariba, and so on). The tutorial is for anyone new to these processes, and explains how to get an IBM Cloud account, set up your first chatbot, and connect the chatbot through an IBM Cloud Function with a publicly available odata service.

A short experiment: SAP Conversational AI to IBM Watson Assistant migration

The chatbot that is described in this tutorial was built as an entry-level demo using SAP’s Conversational AI (CAI) to see what could be reused from the exported CAI data.

With Watson Assistant, the data export generates a single JSON file as a project file. In comparison, SAP CAI generates seven downloaded directories, each having a JSON file with project information.

I was able to use the same IBM Cloud Function for both the Watson Assistant and the SAP CAI chatbots. For other variables and functions, I found that:

  1. Details available from SAP CAI JSON files that can be mapped to Watson Assistant are:

    • Webhook URL

    • Intents

    • Intent examples

    • Entity names (There are many gold pack entities by default.)

    • Skill information

  2. Details that cannot be directly converted are:

    • Entity synonyms

    • Use of variables

Therefore, a semi-automated converter can be created to load intents, entities, webhooks, and, to some extent, dialogs for the routine. This eliminates the need to create them from scratch in Watson Assistant, saving you time.


To follow this tutorial, you need:

Estimated time

It should take you approximately 45-60 minutes to complete the tutorial.


Build an easy IBM Watson chatbot

  1. Log in with your IBMid.

  2. After creating your account, you can call Watson Assistant to create the chatbot in your IBM Cloud account. Or, you can use the following steps to create the chatbot.

The following step-by-step approach shows how to create the chatbot, but does not explain the context of the task in detail. In this use case, the user would like to know the name of an airline based on a known shortcut (for example, AA for American Airlines). The odata service that is used is publicly available and was the driver for the use case.

The demo starts with the creation of an IBM Cloud Function. In this case, IBM Cloud Functions are used to call an odata service and to store the result in a variable that is known to the chatbot. To get started:

  1. Set up your IBM Cloud Function in IBM cloud (you must be logged in). In the Search resources and products bar, search for functions.

  2. Click Start creating, and select Action.

  3. Choose a name for your Action (for example, type Airline_odata in the Action Name field), and ensure that Runtime is set at Node.js. Then, click Create, as shown in the following image.Actions

  4. Paste and save the following code in the Code Section (by replacing the example).

    const request = require('request-promise');

    function main(params) {

    const iata_code = params.iata_code;

    const url = `https://services.odata.org/TripPinRESTierService/Airlines('${iata_code}')?$select=Name`;

    return request(url)

    .then(response => {

    const airline = JSON.parse(response);

    return {airlineName: airline.Name} ;


    .catch(error => {


    return { error: error };



  1. You can test the action by clicking Invoke with Parameters.

  2. Add the following "iata_code": "AA". Then, click Invoke. It takes approximately 10 seconds to get the result, which should be “airlineName”: “American Airlines".

  3. Go to Endpoints, and select Enable as Web Action. Copy and save the first URL because you need it later in the tutorial.Endpoint selectionNow, you've set up the function and Watson Assistant.

  4. Go back to the IBM Cloud starting page, and type Watson Assistant in the search bar.

  5. Select Lite as the pricing plan, confirm the license agreements in the lower-right, and click Create.

  6. Click Launch Watson Assistant, and log in again.

  7. Specify the name and other options during the creation process. The option must be filled, but does not affect the functions of the chatbot. You can choose the options that you want.

  8. After creating the chatbot, go to the Assistant settings, which can be found at the left in the sidebar. Click Activate Dialog.Assistant settings

  9. Select Dialog by using the sidebar at the left.

  10. Set up your webhook by selecting Options -> Webhooks in the Dialog menu.

  11. Paste the URL of the Cloud Function Action that you created into the URL field, and add “.json” at the end.

  12. Click Intent by using the sidebar to the left.

  13. Create an intent with the name get_longname and a sentence in the User example, for example, “I want to get the long name of an airline.” Click Create.

  14. Go back and chose My Entities to create an entity with the name iata_code. Note: Don’t delete the @ symbol. Add three values: AA, FM, and MU. Click Add Value after each value.

  15. Go to Dialog (located under the Entities), and click Create Dialog.

  16. Click Add node.

  17. Click the If assistant recognizes field, and select the intent that you created.

  18. Add a question like, For which airline do you want to know the long name? in the Assistant responds text field.Dialog administration

  19. Select the node that you created, and click Add child node.

  20. Fill the If assistant recognizes field with @iata_code.

  21. Open the Customize menu (on the right).

  22. Switch Slots and Callout to webhooks to "on", and make sure to select Call a webhook instead of Call an action.Webhook administration

  23. Complete the text fields as shown in the following image.

    • Enter @iata_code in the Check for field.

    • Enter $iata_data in the Save it as field.

    • Enter iata_code in the Key field.

    • Enter "$iata_code" in the Value field.Checking fields

  24. In the Assistant responds section, enter The long name of the airline $iata_code is $webhook_result_1.airlineName in the Respond with field.Assistant reponds

  25. Click Try it in the upper-right, and have fun.


You can use IBM Watson Assistant as a replacement for SAP’s Conversational AI. With the easy-to-use administration tools, you can quickly create a simple chatbot. For larger systems, there are additional frameworks and assets that are available that reduce configuration and maintenance efforts. In combination with other AI tools like IBM Watson Discovery, your chatbot’s capabilities can be enhanced.

The next post in the series will explain how to use the assistant in a FIORI app. Later blogs will cover different options for connecting SAP modules and IBM Watson Assistant.

1 Comment
Labels in this area