Technical Articles
SAP Conversational AI with SAP Solution Manager – ITSM
What is Conversational AI?
People today expect 24×7 access to online stores, along with personalized customer support available instantly and on demand. Fortunately, advances in Natural Language Understanding and other artificial intelligence (AI) technologies like machine learning are creating digital opportunities to do just that.
With SAP Conversational AI, you can:
- Increase sales across digital commerce channels with personalized, 24×7 human-like “bots”
- Lower costs of customer service, and improve customer satisfaction and loyalty
- Increase employee productivity and satisfaction by automating high frequency and routine service desk interactions
In short, with Conversational AI, you can boost your revenue streams, improve the customer experience on desktop and mobile devices and enhance operating margins company-wide.
What is possible with SAP Solution Manager?
- “Alexa,ask solman, How many open changes do we have? “
- “Alexa, ask solman, How many defects do we have?”
We can also use Conversational AI with other Technology like (Slack, Facebook Messanger or direct on a Webpage)
Youtube – Alexa in action
Prerequisites
Amazon Developer Account – https://developer.amazon.com/home.html
SAP Cloud Platform – https://cloudplatform.sap.com/index.html
If necessary:
SAP Conversational AI – https://cai.tools.sap/
Getting Started with SAP Cloud Platform
Process Flow with SAP API Management
Why we need SAP API Management?
The Endpoint (SAP Solution Manager) will receive POST requests when a user interacts with your Alexa Skill. The request body contains parameters that your service can use to perform logic and generate a JSON-formatted response. SAP standard OData Services response in a XML- formatted response.
So we need SAP API Management to get a public URL and it’s possible to manipulate the response from the Backend (SAP Solution Manager).
First of all, we need a API Provider. We take the SAP Cloud Connector for the Backend connection.
API Provider use SAP Cloud Connector.
Define Backend OData Catalog.
Next Step is to import the OData Service from SAP Solution Manager.
Detail view:
API Proxy URL: We need this URL for the ALEXA Skill Endpoint
We need the resources to get Information from Alexa. “GET” is to get Informations like (How many Incidents do we have?) With the “POST” we can push Information from Alexa to SAP Backend
The API to call the SAP Backend (Solman) with a public URL is now available. So we need to manipulate the response of the OData call into a JSON format.
So the next Step is to define a policy for this API.
In the policy Designer we can manipulate the Flow to call the Backend and the response from the Backend. I used Basic Authentication to call the API. To convert the response from XML to JASON I created a flow scipt. Let’s take a look.
So I choosed a “PreFlow” from the Proxy Endpoint (Solman Backend) to convert the XML into JSON.
To call the Proxy Endpoint I choosed Basic authentication. Here you see the scipt to assign a SAP User for this call.
I assigned a User and password to call the Backend. Here you see the variable for this assignment.
So here you see the response call via SAP API Management. For our Skill we need the “COUNT” Number (2) And you see here that we are calling the Odata Service with “MessageResultSet”
My next To Do’s in the next Blog post:
- Single Sign On. Currently is running on my SAP User with Basic Authentication
- Add German as a second language
- Integration into SAP Solution Manager Focused Build – https://support.sap.com/en/alm/focused-solutions/focused-build.html
Hi Tom,
Thank you for this good article. I am trying the configuration. Everything is already setup. However, when I was trying to access the API Proxy URL, it doesn't work and giving INVALID URL or "Site can't be reached". Although my connection from backend and cloud connector is working, the API Proxy URL is not. Have you ever encounter this problem?
Regards,
Florence
Hi Florence,
wich version do you use? Your trial Account or a Company Account?
There are diffrent’s how to set it up.
Maybe this helps:
https://help.sap.com/viewer/66d066d903c2473f81ec33acfe2ccdb4/Cloud/en-US
Regards
Tom
Hi Tom,
I am using a company account. I also noticed that when you tested your API, the link is not the Host Alias that you created in the API Provider. When I'm testing the API Policy, it is always directing to the Host Alias of the API Provider. But when I tested with the backend server, i didn't get any error.
Regards,
Florence
Hi Florence,
When I test the Call you can see in the URL header that the URL comes from the API Managment and not from my backend.
I think you need to write a question in the API Management section.
Regards
Tom
Hi Tom,
Do you have steps-by-steps documentation on how to create skills in Amazon Alexa and how you connected it to Amazon?
Regards,
Florence
Hi Florence,
https://developer.amazon.com/de/documentation/
Here you can find out how you create a alexa skill.
Regards
Tom
Hi Tom,
can you help me undersand how to use memory variables in GET method when calling external API? (not webhook)
I was expecting to write in the url field something like this https://my-machine/odata/SAP/ZINN_SALESBOT_DEMO_SRV/SalesOrderSet(‘{{memory.salesorder-number}}’) but i found out that putting the symbol “{” in the textfield make the entire web-page to freeze forever!
Am i missing something? What’s the correct way to specify a key of an entityset via memory variable for a get_entity to external API?
Thx a lot for your support,
Valerio