InstantMessagingBot (Communications Workflow Sample)

InstantMessagingBot (Communications Workflow Sample)

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

This sample instant messaging (IM) workflow application demonstrates how to implement a generic IM bot program using communications workflow activities. In this sample, data is stored in a Microsoft SQL Server database and accessed using ADO.NET. The script to create the data structures in the database is located in CreateDatabase.sql. The script to populate the data structures is located in PopulateDatabase.sql.

The bot asks the user a series of questions to pinpoint the troubleshooting topic of interest for them. The bot also lets the user choose to start over, quit the application, or choose to go back to a previous question.

  • Use the Resources class to dynamically set prompt properties, for example MainPrompt and SilencePrompt, of the InstantMessagingPrompts class.

  • Use semantic interpretation markup to create a grammar from a list of categories.

  • Use the SrgsSemanticInterpretationTag class to set the value of array items in an SrgsItem class.

  • Use the StringBuilder class to construct prompts.

To build and debug the sample application

  1. Create a debugging environment. For information about creating a debugging environment, see Establish Accounts on Office Communications Server.

  2. In the UCMA v2.0 SDK\Samples\Workflow directory, open InstantMessagingBot.

  3. Debug the InstantMessagingBot IM workflow application. For information about debugging this application, see Walkthrough: Debugging a Communications Workflow Application.

© 2015 Microsoft