Bot Calling Shopping List API - microsoft-campus-community/workshop-shopping-list-bot GitHub Wiki

Prerequisite: This page assumes that you have finished implementing the AddItemDialog first.

Bot is calling an API to handle the persistence of the shopping list items

Instead of the bot handling the chats' shopping lists' persistence, it uses a uniform API built on Azure Functions. This way, the bot is only concerned with the chat logic. The shopping list logic, for example, database technology, is decoupled from the bot.

Inside the bot, the FunctionService class implements HTTP calls to this uniform API.

As long as the shopping list API surface does not change, the underlying technologies implementing the API can change without touching the bot's source code. For example, the shopping list could store the data in a PostgreSQL database instead of the CosmosDB.

NEXT: How the bot comes together.