'Save user bot conversation along with Intent in MS Bot Composer
I'm creating a MS composer bot using in c#. Can I know how to save the user input, bot response and intent triggered in Sql server DB.
Should I make use of ${turn} object in composer to save the details by making an Http request for each and every turn or is there any way to save? and even I didn't find any activity or turn object in backend to make use of it. Can anyone help me out.
Thanks in advance!
Solution 1:[1]
Here are the docs on conversation flow and memory in Composer, and specifically the default memory scopes (such as turn.activity.text, which gets the message's text content). These documents show the scope values needed to extract data about the conversation and each turn. They are akin to the turnContext scope you see in code-first bots.
There is no default method to store information in a SQL database, however you have a few options.
- You could use HTTP requests as you suggested, but this wouldn't be a particularly speedy solution (depending on how you implement it of course), so I wouldn't necessarily recommend it.
- You could look into extending Composer with code and build a small addition that would store conversation data into a SQL DB as per your schema.
- You could try to use this SqlClient package for Composer (available through the nuget package manager in Composer itself). It was written by a Bot Framework developer.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
