Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
Noorulain
Product and Topic Expert
Product and Topic Expert
6,308
In our previous blog post, we showcased a scenario where intelligent technologies like SAP Conversational AI and Qualtrics, when combined, yield winning customer experience, thereby enabling ‘Intelligent Enterprises’ to thrive in this era of ‘Experience Economy’.

With that in mind, we’ll now try and develop the demonstrated end-to-end scenario from ground-up. We’ll approach the discussion in four parts/blog posts.

Part 1: Introduction and Getting Started

Part 2: Building the SAP Conversational AI Chatbot

Part 3: Building the Qualtrics Survey and App

Part 4: Additional API Calls and Tips

In part 1, we are simply going to recall the scenario discussed in the previous blog post, in an attempt to understand how different integration components are structured and also look at the tools that we would require to build these components.

So, are you ready? Let’s get started!

First, let us visualize the scenario using an interaction flow diagram. Here, we can see the interaction between a customer, named 'Ann' and a chatbot named ‘Hero’. Ann comes looking to track a recent order on the SAP Commerce Cloud B2C site. She notices the chat icon and decides to give it a try.


1.1 Use case Process Flow Diagram


 

The conversation starts with Hero greeting Ann. Hero confirms Ann's email address, subsequently displaying up to 2 recent orders for Ann to choose from. Ann would choose a specific order from the list. Hero shares the order details as well as the order status and suggests that a service ticket be created in order to have someone look at the processing status. Hero also provides a ticket number for Ann's reference. Once that is settled, Ann is presented with a Qualtrics survey where Ann decides to respond to the survey and the chat ends.

On the SAP Cloud for Customer (SAP C4C) side, a service ticket is created and could be referenced using the number provided in the chat. On the Qualtrics platform, the survey responses are received and become part of the data set of responses used in different visualizations and dashboards.


Technical Integration Diagram



An integrated system is a complex system achieved by a process of connecting multiple components or sub-systems. For our chatbot, let’s look at the technical integration diagram showing the connected components in a 5-point integration.


 


1.2 Technical Integration Diagram


 

Starting at the top, the SAP Conversational AI chatbot is embedded inside the SAP Commerce Cloud site using a script generated by the SAP Conversational AI platform. The chatbot calls the SAP Commerce Cloud APIs to get order information and using the SAP C4C API call, creates a service ticket.

A custom python app deployed on the SAP Cloud Platform (SCP), is registered as a webhook inside the chatbot.  This app serves as a middleware to programmatically create and update the survey (along with any embedded data) from Qualtrics via the survey sessions API.

 

Pre-requisites and Development Tools


 

For building the end-to-end scenario, we will be using:

SAP Conversational AI offers a very powerful web-based chatbot development suite for building and testing chatbots. For developing advanced scenarios, you may use the various REST API offered.




We are going to develop the survey app using Python and leveraging the Flask framework. Python is ideal for developing quick prototypes with its simple and uncluttered syntax and excellent code readability. Flask is a web application framework for Python based on the principles of minimalism offering an elegant API.




We would be using the Visual Studio with Python IDE for developing our app.




SAP API Hub needs no introduction. We would be using the API Hub to browse API specification for SAP Commerce Cloud and SAP C4C. In order to try out the SAP Commerce Cloud API, we are going to make use of the Swagger UI using the Base URL of our SAP Commerce Cloud site:


https://Base_URL/rest/v2/swagger-ui.html#/




Cloud Foundry is an open source industry standard for Platform as a Service (PaaS) technology, adopted by SAP Cloud Platform (SCP) in the Cloud Foundry (SCP CF) environment. The SAP CF makes use of the Bring Your Own Language (BYOL) concept offering cloud native development using the language of your choice. The language runtime environment, also referred to as a buildpack, serves as the application container. Follow the tutorial here in order to get up to speed with the related terminology and concepts.




CLI is a neat command line client offered by Cloud Foundry for managing the CF environment users, services, apps and so on. We are going to use the CLI for deploying our survey app to the SCP. Click on the link in the heading in order to follow the steps to install the CLI.


Now that we have set the context, and laid the stage, we can proceed to the next part/blog post where we are going to develop and train our chatbot using the SAP Conversational AI platform.

See you there!

 

Part 2: Building the SAP Conversational AI Chatbot

Part 3: Building the Qualtrics Survey and App

Part 4: Additional API Calls and Tips

———————————————————————–

For more information about SAP Conversational AI:
3 Comments