Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
anmol310196
Explorer

Introduction


SAP Conversational AI is an end-to-end chatbot-building platform that enables people to train, build, connect, and monitor intelligent chatbots fully integrated with SAP products. It helps users efficiently manage business tasks. With enterprise-ready chatbots able to guide users to the right content, answer FAQs, and automate tasks, businesses can transform the experience of customers and employees alike. In this blog, you’ll learn how to build your chatbot, create conversational flows, connect the chatbot to communication channels, and monitor its usage.

How to register at SAP Conversational AI?


Step -1. Create an account on the SAP Conversational  AI Platform. (It's free)

Go to https://cai.tools.sap                                                                Click on SIGN UP


Fill in all the details, accept the terms and conditions and click Register your account will get created. 




 

How to Build Chatbots with SAP Conversational AI?


It’s time to build the chatbot. Click on the button “+ NEW BOT”  as shown below.


This is a 4-Step process.

Step-1: We are going to create a chatbot that retrieves answers using conversational flows. This will save our time and also allow us to create custom skills for the bot.

Step- 2: Choose a unique name for the bot and write description. Also, you can select topics that will help the bot to train. The default language selected for the chatbot is ‘English’. Let’s leave it as it is.

Step -3: For data policy, I am choosing ‘Non-Personal’. You can choose any according to your requirements. As recommended for Store Conservation data, I will also choose 'Store'.Now, choose the end-user type as ‘Non-vulnerable'.

Step -4: I will choose 'Private' as I don't want it should be visible to everyone. Now, Click on 'Create A Bot'.

Bot has been created and is ready to use. There are 4 Phases of Bot building.

  • TRAIN - Make your bot understand the requirements.

  • BUILD - Creating Conversation flows.

  • CONNECT - Deploying the bot on various platforms.

  • MONITOR - It allows the bot to improve from time to time.


TRAIN: We are required to upload a ".csv" file contains pair of questions/answers. Also, we can add language as per our requirements.

Open Notepad, On the left side of ; question has been written and on the right side, an answer, as shown below. Press enter to write another pair of question/answer.

Save this file as 'name.csv'

Click on Upload or simply drag and drop the file to upload.

Once the file is uploaded, the file can be seen as shown below. For any changes in the file, need to enable the Edit mode.

As the Edit mode is enabled, we can see the pair of questions/answers.

BUILD: This option allows us to create some predefined skills like greetings or small talk etc.

Let's click on Small- talk, we can see the predefined answer of 'hello'. We can edit and set as per our requirement, even we can add the same answer of 2 same types of questions.

Once the pair of questions/answers have been uploaded, we can test the bot as shown below.

Working fine.

Connect: We can connect AI chatbot to many different platforms as shown below. In this blog, we will learn how AI Chatbot will get deployed on MS Teams and Telegram.




How to Connect AI Chatbot to MS Teams?


Step 1: Create/ login into Microsoft Azure account.

Step 2: Bot channel registration.

Step 3: Get your Application (Client) ID and secret value.

Step 4: Connect chatbot to Azure.

Step 5: Test bot in Azure Web Chat.

Step 6: Test bot in MS Team.

STEP 1: Create Microsoft Azure account


Go to Microsoft Azure and create a trial account. (If Already have a subscription, then login into the account)

After creating, make sure your subscription is set up properly.

  • Go to the Microsoft Azure portal. (HOME)

  • Click Subscriptions.



  • Click on Subscription name. (Free Trial)

  • Scroll down and click on Resource Providers (menu on the bottom left).

  • Make sure Microsoft.insights is registered.


Step 2: Create Azure bot channel


Once you are logged in, Search for Bot Channels Registration in Marketplace and click on Create.












































Field Name Input Value
Bot Name A unique display name for the bot (which will appear in channels and directories – this can be changed later)
Subscription Your Azure subscription (Trial / Paid)
Resource Group Select a resource group. If don’t have – then create a new one.
Location Choose a location near where your bot is deployed
Pricing Tier F0 (10K Premium Messages)
Messaging endpoint This can be filled out later
Application Insights On
Application Insights Location Choose a location near where your bot is deployed

Select Create. It will validate and you will get the notification of Successful Deployment. (Shown below)

Step 3: Get your app (Client) ID and secret Client Value



  1. Go to Home, click on Resouce Groups, Select the Bot channel you just created

  2. Click Configuration, and select Manage



  1. By clicking Manage, you will be redirected to Certificates & secrets

    • Generate a Client Secret by clicking New Client Secret, then Add.

    • Description and Expiry can be set according to the requirement





Copy the new client secret value. You won't be able to retrieve it after you perform another operation or leave this blade.

Again go to Resource Groups select Bot Channel and click on Overview. Copy the Application (Client) ID


Step 4: Connect bot to Azure



  1. Go back to SAP CAI.

  2. Open your bot, and go to the Connect tab


Click on Microsoft Teams and paste App Client ID and Client secret value below, after filling click on UPDATE CHANNEL, Messaging endpoint will be generated, copy it.


Again come back to AZURE PORTAL click on Resouce Groups, Select the Bot channel  Click Configuration, and paste Messaging endpoint here and click on APPLY

Step 5: Test bot in Azure  Web Chat


Go to Test in Web Chat, here you can test your bot by sending a message as shown below

Step 6: Test bot in Teams


It's time to make a connection with MS Teams, Click on Channels select MS Teams

As shown below, click on Microsoft Teams Commercial and SAVE it.

A connection has been made. You can see Microsoft Teams connected and in a running state.

Click on Microsoft Teams and test it by sending the message.


How to Deploy SAP AI Chatbot on Telegram?


Go to https://cai.tools.sap/ select your Chatbot and go to the Connect option as shown below


Scroll down and click on Telegram, a pop-up will open and ask for a token.


For a token generation, follow the below steps. Open the Telegram App on your mobile phone and search BotFather.


Start Chatting with BotFather by clicking START/ RESTART.

After Clicking START/ RESTART, click on /newbot


Choose a name and a username for your bot, a username must end with 'bot' like testbot, user31bot. It will give you a congratulation message that includes Token.


Copy that token no. and paste to the same pop-up and click UPDATE CHANNEL.


Done.

Click on "t.me/bot name" link on the telegram that has come with a congratulation message, It will take you to the chat.

Start Chatting.



Conclusion


We have successfully deployed SAP AI Chatbot to MS Teams and Telegram. We can also monitor new questions asked by users that have not been set in the training and building phase. After monitoring, we can add those to the bot.


And that’s it! Hope you’ve enjoyed building the Chatbot and its deployment on different platforms.
4 Comments
Labels in this area