This bot has been created using Bot Framework. It shows how to create a simple bot that returns a series of Adaptive Cards that leverage the Adaptive Card 2.0 schema that includes Action.Execute and the Invoke Activity processing to handle these Action.Execute requests.
-
.NET Core SDK version 3.1
# determine dotnet version dotnet --version
The solution includes a Catering bot that asks users for an entre and drink order. Orders are stored in a Cosmos DB. The key conecepts include:
- How to return an Adaptive Card that uses schema 2.0
- How to use Action.Execute in the JSON of an Adaptive Card
- How to perform an automatic card refresh of an Adaptive Card 2.0
- How to process the Invoke Activities that an Action.Execute emits
- How to respond to an Action.Execute Invoke
- How to update Web Chat to use Adaptive Cards 2.0
-
Clone the repository
git clone https://github.com/microsoft/botbuilder-samples.git
-
Create a bot registration in the azure portal for the
Catering Bot
and update appsettings.json -
Add the Microsoft AppID and Password to the appsettings.json file
-
Regsiter for the Direct Line channel and copy the secret into the appsettings.json file
-
Create a Cosmos DB in Azure and add the endpoint and key to the appsettings.json file
-
Deploy your bot to Azure and navigate to the home page
-
You can use a tunnelling tool such as ngrok to point your bot registration to your local machine; Currently the Bot Framework Emulator does not support Adaptive Cards with schema 2.0
To learn more about deploying a bot to Azure, see Deploy your bot to Azure for a complete list of deployment instructions.