Configure bot context in Azure bots
Omnichannel for Customer Service offers a suite of capabilities that extend the power of Dynamics 365 Customer Service Enterprise to enable organizations to instantly connect and engage with their customers across digital messaging channels. An additional license is required to access Omnichannel for Customer Service. For more information, see the Dynamics 365 Customer Service pricing overview and Dynamics 365 Customer Service pricing plan pages.
For Azure bots, you must install the bot SDK and instantiate the Omnichannel middleware before you configure bot context.
Install the bot SDK in your project
To open the NuGet Package Manager, right-click your project and then select Manage NuGet Packages.
In the NuGet Package Manager, select the package source as nuget.org and browse for "Microsoft.Xrm.Omnichannel.BotSDK". Select the package and then select Install. More information: Nuget page
Alternatively, you can use the following command in NuGet CLI.
Install-Package Microsoft.Xrm.Omnichannel.BotSDK
The bot SDK is now installed and the Omnichannel middleware is available in your project.
Use the Omnichannel middleware in your bot code
Use this procedure if you've created your bot using Visual Studio Azure Bot template or Azure portal.
Open the AdapterWithErrorHandler.cs file.
Add the import statement and instantiate the Omnichannel middleware.
using Microsoft.Omnichannel.Bot.Middleware; Use(new OmnichannelMiddleware());
Next steps
Parse activity JSON to get bot context
See also
Send custom context
setContextProvider
Integrate an Azure bot
Feedback
https://aka.ms/ContentUserFeedback.
Bald verfügbar: Im Laufe des Jahres 2024 werden wir GitHub-Issues stufenweise als Feedbackmechanismus für Inhalte abbauen und durch ein neues Feedbacksystem ersetzen. Weitere Informationen finden Sie unterFeedback senden und anzeigen für