This blog post is part of the SAP Conversational AI Tutorial Challenge 2021 and I would like to share my use case “Indian Online Shopping Assistant Bot” with you. Using this bot, I will assist online users to get them know how much cashback amount will they receive when they purchase products in online through this bot.
What is the use case about?
Myself, I am Anand, SAP Fiori Developer. Due to my own interest in AI, I have explored SAP CAI and created a few bots. Today, I would like to share a use case where I have used this AI technology to fulfill one of my own requirement.
While learning CAI by going through the tutorials provided by team, I’ve found it interesting and exciting. During this process, I have got acquainted with Telegram bots and cloud foundry. While learning React.Js, I have come across robots.txt file and learned about web scraping concept. After knowing that it is legal to do scraping of any website over internet, I would like to use all these concepts( SAP CAI + Node Js + Cloud Foundry + Telegram ) to create a bot which will help online shopping users to check additional cashback amount they may get while place an order.
Use Case: – Shopping Assistant
Customers want to check how much cashback amount that they might get receive if they place an order using this bot.
Indian Online Shopping Assistant bot helps users to identify the suprise cashback amount that they may receive if they place an order through this bot. By this way, customers know in advance how much amount that they are going to get as a cashback and they don’t want to loose that.
- Using my P-ID , I have logged into SAP CAI and created a bot named ‘Nestham’.
- Greetings, OnlineShopping and Fallback are the three skill sets that I have used majorly to interact with users.
- Backend logic is written in NodeJs and deployed the project in cloud foundry.
- As a webhook, I have consumed this logic during runtime to fetch the data based on user’s input.
- I have added person as requirement in Greetings skillset to know about user name but this will not be required if you integrate this bot with Facebook or Telegram becaue it has access to read the username based on user’s login information.
- When User choose(Amazon) one of the button to proceed below screen will appear.
- When user click on Yes button then it will request for url to proceed
- Online shopping skill got triggered and it gives a call to below webhook
- Response from API will be displayed on screen
- If user click on Yes, Restart button will be appeared to go back to home else it will prompt for a new url
- After done with thorough test testing, I have connected this bot with WebChat, Telegram and Facebook Messenger
- WebChat link: IndianOnlineShopping
- Click on SAP chatbot integrated at the bottom of the page to assist you with the shopping.
- In Telegram, bot is live and it is available with ‘Indian Online Shopping Assistant‘ name
- However, I am a bit disappointed about the output after it has gone live on Telegram. UI looks weird when compared to chat preview in CAI, some messages got truncated 🙁
- In facebook messenger, bot is available with the name ‘Indian Online Shopping Assistant’. you can find with this name
- Though UI looks rich , webhooks are not functioning properly. May be I have not properly configured the webhook in my app 🙁
- I would like to introduce you another bot which I have developed and working fine in Telegram is ‘Amazon Cashback Calculator‘ bot . I have used Telegram UI and created this as a native bot.
- I would like to highlight a point before closing this tutorial, always keep in mind that UI design of a Bot depends on the platform you are going to deploy it. Because, some of the features shown in Chat Preview(simulation) option won’t work when they have gone live.
- I have taken a Non-SAP use case but using SAP CAI concept, I have designed this bot 🙂 . I hope you would like it.
- I request CAI team to look into these UI compatibility issues of bots when integrating with telegram