How To: Author Prompts
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.
In the Microsoft Visual Studio 2008 development system, use the Properties window to add static prompt text to workflow activities in Microsoft Unified Communications Managed API applications. Also, use code to play prompts recorded in .wav files.
What Prompts Do
Prompts serve a number of functions in a Unified Communications Managed API 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
In Visual Studio 2008, create a new communications workflow project.
In the Toolbox, expand Unified Communications Workflow to display workflow activities.
Drag and drop a SpeechQuestionAnswerActivity activity into communicationsSequenceActivity1.
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
Add a SpeechQuestionAnswer activity to a project as described in the previous procedure, in steps 1 through 3.
In the workflow designer, right-click the activity and then click Generate Handlers.
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
Create a debugging environment. For information about creating a debugging environment, see Establish Accounts on Office Communications Server.
Debug the workflow application. For information about debugging this application, see Walkthrough: Debugging a Communications Workflow Application.