Skip to Content
Technical Articles

Build Your First Chatbot with SAP Conversational AI

SAP Conversational AI provides a powerful building platform that allows the building of end-to-end chatbots as well as the customization of our digital assistant. Through this platform, we can build or adapt chatbots easily, in days and in full SAP integration. You can also use the platform to create AI chatbots from scratch to automate your customer support, IT service or buying journey.

It provides end-to-end bot-building platform as follow-

  • TRAIN- Train your bot with intents to understand human language.
  • BUILD-  Build complex conversations, skills and powerful logic.
  • INTEGRATE- Integrate your bot with data providing systems.
  • CONNECT- Connect your bot to multiple messaging or fallback channels.
  • MONITOR- Monitor through logs and usage analytics to improve your bot .

In this blog post, I’m going to help you build your first bot on SAP Conversational AI.

Suppose we have the following usecase-

First understand some basics of chat bot-

A chat bot is consist of two main elements: skills and a training and data set.

  • A skill is a block of conversation that has a clear purpose of achieving a goal.

  • A training dataset is composed of many sentences organized into intents that represents what users say to your chat-bot. In our use-case Reset password is our training dataset.
  • An intent is a box of expressions that mean the same thing but constructed in different ways.
  • An expression is a sentence that your bot can understand.
  • An entity is a keyword that is extracted from an expression.

Triggers: Conditions that determine weather the bot should execute the current skill or not. If the trigger condition is validated, the bot will executed it over other skills.

Requirements: Intents or entities that your skill need to retrieve before executing actions.

Action: Something that your bot executes at a specific point when executing a skill.

Let’s start to develop Reset Password chatbot

First understand the usecase. This bot will respond to greetings and reset password request. This simple usecase will prove very useful in beginning our journey with SAP CAI .

Step 1.  To begin, create an account on SAP Conversational AI! It’s free.

Step 2.  After logging into your newly created account, click on +NEWBOT

Step 3. Choose Perform Actions. Then choose predefined skills. You can choose one or more predefined skills for you bot. Just select Greetings and small talk for now, but I encourage you to check out the others later.

Step 4. Enter bot name as reset-password

Step 5. Select Data policy and visibility. Depending on how to the data will be used, choose the appropriate Data Policy option. You can keep your bot public since there’s no private info involved, but you can change this setting later.

After you’ve created your bot, you’ll be welcomed by a screen similar to below. Based on the settings you choose while creating bot a few elements like Intents can vary, but we do not need to worry about that now.

Step 6. Create a new intent ‘reset-password’.

Step 7. Add Expressions for your newly created intent

Step 8. Similarly create one more intent ‘user-system’ for selecting the system for password change. And add some expressions for that intent.

Step 9. Create custom entity

Step 10. In the expressions containing a system name, click the expression to make sure the corresponding entity is recognized (or tagged). If the bot doesn’t recognize the entity automatically, you can highlight the system name and select the #SYSTEM-NAME entity. This is pure training.

Step 11.  Now it’s time to create a skill.

Step 12. Add triggers to the Skill.

Step 13. Add requirements. In this usecase I have added two requirements.

Now the bot has to ask user about the system, so expand the reset-password requirement and click on NEW REPLIES. I had already create reply that’s why it is showing EDIT REPLIES.

After that, type your message and give options in add quick reply.

Step 14. Add actions for your Skill. Open the Skill on the Build tab, and then open the Actions sub tab and click ADD NEW MESSAGE GROUP

After this, select send message. Then select Card.

 

Give a image url of some image. Give title, subtitle, Button title and a web_url on which you want to redirect user for resetting the password.

Step 15. Now its time to test your BOT. Click on CHAT WITH YOUR BOT button on the bottom right side of the screen and test your bot with various expressions.

Now Your bot is ready to connect with various platforms. SAP CAI has provide various platforms.

I hope that this blog post provided some clarity on how you can develop your first chat bot. Please let me know your thoughts, doubts in the comment section below.

Happy Bot Building!

 

 

 

4 Comments
You must be Logged on to comment or reply to a post.
  • Nice blog.

    However, the bot doesn’t exactly work for me.

    • If I choose from the quick replies any of the choices, they are not recognized as @user-system.
    • I can select texts within expressions in the @user-system intent, and it will let me say this are system-name entities, but when I go back into the entities they do not appear there — and the test does not recognize them as entity.
    • S/4HANA is assigned to the entity Person.
    • There exists a @reset intent in the small talk and sometimes this interferes with the bot understanding I want to reset password.

    I did some monitoring and setting stuff to the right intent but the whole thing did not work smoothly. Why not make requirement the entity and then have a reply if it is missing?

     

    • Hello Daniel Wroblewski

      • You can find your entities in entities-> #SYSTEM-NAME -> tagged values

      • Yeah we can make requirement the entity and then have a reply if it is missing. Though this bot replies with system-name options if the requirement @reset-password is complete. And we have to give both intents @reset-password and @user-system in the requirement.
      • Right, there exists a @reset intent in the small talk but it’s for restarting the flow that’s why i had make another intent @reset-password and make a entity #reset for recognizing .

      Hopefully it will help in resolving your issue, if not then please share the screenshot of requirement page of the bot. So that the issue could be resolved.

      /