Purpose IBM offers a wide range of artificial intelligence services. In principle, these services can be called from the IBM Cloud and can therefore also be used in conjunction with GuiXT and an SAP transaction. Example: We integrate the IBM Watson Assistant into an SAP transaction, thereby enabling the user to request help on the current process using natural language or ask to create a new standard order. |
Solution 1 - Embed as HTML The first possibility is to embed the Assistant in an HTML file and display it in the SAP transaction using GuiXT Controls: ![]() |
Solution 2 - Using the Watson SDK There are a number of interfaces for Watson and we can use the .NET interface with GuiXT. That means we can create a library that we can call via callVB in an InputScript. To allow the user to interact with the chatbot, we use GuiXT to create input fields in the SAP easy access menu. ![]() The Chatbot understands the intention and creates an InputScript, so that transaction VA01 is automatically opened, the value OR (standard order) is set as order type and enter is triggered. ![]() |
Requirements IBM Watson Assistant is a cloud service that is free with moderate usage. However, you need to initiate this service yourself in the IBM Cloud to get an API key. You can find more information at IBM Watson Assistant Catalog |
Implementation of Solution 1 - Embed as HTML Integrating HTML files is usually done with GuiXT using the following command: GuiXT
At the present time the current version 2021 Q3 1 of GuiXT does only support the Internet Explorer Control. The Watson Assistant however requires the Chromium based rendering engine. It is possible to create a small library that can render webpages with this new engine, called WebView2. We therefore refer you to the following article which describes exactly how you can use the control. You can also download it directly there: Use WebView2 (Chromium) The HTML code to embed your created Watson Asisstant can be found in the Cloud cockpit: ![]() GuiXT
This only embeds the chatbot in the SAP GUI transaction. You can also use the -floating option if you want to have a seperate window. To interact with the Watson Assistant, for example send or recieve messages, you can use the JavaScript API: Web chat from Watson Assistant |
Implementation of Solution 2 - Using the Watson SDK IBM offers ready-to-use libraries for the .NET framework that you can use to interact with Watson Services (SDK). Essentially, you need to create a new .NET project, install the libraries, and compile the project as a class library. Then you can call them directly via GuiXT. A detailed description of the .NET interfaces can be found here: IBM Cloud API Docs Watson Assistant v2 (You can download the C# project at the bottom of this page) Since there is no web interface in this case, we use a simple GuiXT script that allows the user to enter data. GuiXT
In the InputScript we then call the created .NET library. In our example the Watson Assistant itself can again provide an InputScript, which is then saved and executed immediately: GuiXT
The content for the InputScript can be defined in the Watson Assistant Cloud. In our example,
the wizard
is able to detect the user's intention to create a new order. Therefore, a script is generated
that
triggers a redirect to transaction VA01 and sets the order type to 'OR' (standard order):
![]() |
Example Use Case - Generate infos for Support
A good combination of the chatbot with GuiXT is to send the status information of the current transaction, e.g. username, field names and user input or even error messages. This information can then be evaluated by machine or also by a human employee and thus assistance can be carried out far more effectively. ![]() This following InputScript will read some of the available data and saves it into a variable so it can be shown in a Textbox. It also puts the text into the clipboard so the user can paste it into the chatbot-window at once: GuiXT
|
Video - user perspective |
Downloads
You can find all files in this .zip archieve: watson_assistant.zip |
Components |