Compartir a través de


How To: Author Prompts

In the Microsoft Visual Studio development system, use the Properties window to add static prompt text to workflow activities in Microsoft Unified Communications Managed API (UCMA) applications. Also, use code to play prompts recorded in .wav files.

What Prompts Do

Prompts serve a number of functions in a UCMA application:

  • Ask the user a question. For example, "From which city do you wish to depart?"

  • Greet the user. For example, "What can I do for you?"

  • Provide information to the user. For example, "This flight serves dinner."

  • Direct the user to take specific action. For example, "Press 3 on your telephone keypad."

Prompts in an instant messaging scenario are delivered as text and viewed in a Conversation window. Speech prompts are delivered as audio, and are typically heard in a telephone call.

To add static prompt text using the Properties window

  1. The following steps are sufficient for Visual Studio 2008. However, additional steps are required to develop UCMA workflows in Visual Studio 2010.

  2. In Visual Studio, create a new communications workflow project.

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

  4. Drag and drop a SpeechQuestionAnswerActivity activity into communicationsSequenceActivity1.

  5. In the Properties window, enter What color? as the value for the MainPrompt property.

To add a prompt recorded in a wave file using code

  1. Add a SpeechQuestionAnswer activity to a project as described in the previous procedure, in steps 1 through 3.

  2. In the workflow designer, right-click the activity and then click Generate Handlers.

  3. In the event handler, add the following code:

    this.speechQuestionAnswerActivity1.MainPrompt.ClearContent();
    this.speechQuestionAnswerActivity1.MainPrompt.AppendAudio("<path to the .wav file>");
    

To build and debug the application

  1. Create a debugging environment. For information about creating a debugging environment, see Provision and Deploy a UCMA Workflow Application.

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

See Also

Other Resources

Unified Communications Managed API 3.0 Workflow SDK Documentation