Use Scripting to Design a Chatbot Message from an API Response
- How to fetch entity values with an external (OData) service
- How to build a custom message using scripting
- How to create a button that lets the end user trigger a skill
Prerequisites
- You’ll need an SAP Conversational AI trial account. See Build Your First Chatbot with SAP Conversational AI.
You will build a bot so customers can order a product from categories like food, beverages or electronics – simulating a convenience store digital commercial chatbot. Here’s a sneak peek:
To build the bot, you start by creating an intent for ordering a product, which then gives the customer a dynamically generated list of products depending on the category the customer chose. This is done by calling an OData service.
The main purpose of this tutorial is to demonstrate how to make API requests and handle the responses with scripting. Scripting enables you to show the content the user is asking for in different UI elements (e.g., Cards or Buttons).
-
For more information on the scripting syntax, see Scripting with Variables.
-
For more information on how to make API calls and webhooks, see Connect Your SAP Conversational AI Chatbot to External Services.
Now you’ve learned:
- How to fetch entity values through an external service, in this case, using an OData service.
- How to build custom messages and also enable scripting syntax for dynamic responses while using an external service.
- How to set up end-user skill triggers from a button.
Hope you enjoyed this tutorial! 😊
































