Step 4: Recognizing Order Status Responses

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 is the last of four topics describing the steps to create the Create an Automated Call Distributor walkthrough application. This sequence of topics demonstrates how the various capabilities of communications workflow activities can be combined to implement a basic Microsoft Unified Communications Managed API call distributor application using Microsoft Visual Studio 2008 development system. The procedures for creating the walkthrough application build sequentially. Completing the procedures in sequence is important.

Recognizing Order Status Responses

To ask the user for their order number

  1. In the Visual Studio 2008Toolbox, expand Unified Communications Workflow to display workflow activities.

  2. Drag and drop a SpeechQuestionAnswer activity from the Toolbox onto the design surface in ifElseOrderStatus, above promptStatus.

  3. Rename the question answer activity to qaOrderNumber.

  4. Set the MainPrompt property for qaOrderNumber to What is the order number?

  5. Specify user inputs for the qaOrderNumber.ExpectedSpeechInputs property so that the activity will recognize the words one, two, and three. For more information, see Authoring Grammars.

In the next procedure, a final IfElse activity to handle answers containing order numbers is added to the workflow.

To add an IfElse activity for order numbers

  1. In the Toolbox, expand Windows Workflow 3.0 to display the core workflow activities.

  2. Drag and drop an IfElse activity onto the design surface between qaOrderNumber and promptStatus.

  3. Rename the new activity to ifElseOrderNumber. Rename the left branch to ifElseNumberOne and rename the right branch to ifElseNumberOther.

  4. On the left branch, ifElseNumberOne, add a code condition called conditionOrderOne, and then add the following code.

    e.Result = (this.qaOrderNumber.RecognitionResult.Text == "one");
    
  5. Drag and drop promptStatus onto ifElseNumberOne.

  6. On the design surface, drag and drop a SpeechStatementActivity onto ifElseNumberOther. Rename the activity as promptBackOrder. Set the MainPrompt property to This item is back ordered.

    Dd130188.5da959fe-3d85-4714-b2f9-1f7d2ac14efe(en-us,office.13).jpg

Debug the Application

To build and debug the application

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

  2. Debug the application. For information about debugging applications, see Walkthrough: Debugging a Communications Workflow Application.

See Also

Concepts

Walkthrough: Create an Automated Call Distributor