In the E-Z-Flow example, two separate Greeting controls are used to play two different messages that are dependent on caller input.
Alternatively, you can use control property substitution with a VBVoice System phrase (see VBVoice Phrase Types for more information). The Wave File system phrase plays the wave file specified by the given file path. Use control property substitution in the file path to tie it directly to the caller selection.
Review the E-Z Flow example in the Example subdirectory of the VBVoice install directory.
In this example we define two wave files named ezflow1.wav and ezflow2.wav. Ezflow1.wav is a replicate of the greeting established for the PlayInfo1 Greeting control and ezflow2.wav is a replicate of the greeting in PlayInfo2.
In the file path for the system phrase, specify the file name to play as ezflow%GetCustInfo.Digits%.wav.
The Wave File system phrase substitutes the digits collected in GetCustInfo into the file path to determine which file to play: info1.wav or info2.wav (corresponding to the collected digits of 1 and 2 respectively).
Delete the ProductInfo and SupportInfo controls.
Select the Routing page of the Properties dialog for the GetCustInfo control.
Delete Cust. Support-2.
Select Company Info-1 and click Edit.
Change the condition name to Info Selection and the digit data to 1-2 (as shown in image below).
This specifies that if the digits collected are 1 or 2, then exit the node. You can also specify a range of digits. An unlimited number of selections could be handled by this single condition.
Click OK to save the changes.
Add a greeting control to the page and rename it Info.
Connect Info to the Info Selection node of GetCustInfo.
Connect the output node of Info to the input node of GetCustInfo.
Select the Greeting page for Info.
Click Add Phrase.
Click System Phrase.
Select System Phrase type Wave File<>.
Enter the filename info%GetCustInfo%.wav in the file path box.
ALTERNATIVE TO STEP 5:
Control property substitution strings are case-sensitive. To avoid manually entering the filename:
Click the Control List button to display the Available Controls dialog.
Select GetCustInfo from the Controls list.
Select Digits from the Available Properties list.
Drag and drop the Digits label to the File Path box on the System Phrase page. VBVoice pastes the property name with the %% syntax into the box:
Edit the path to create the desired file name.
Click Add Phrase.
Click Close. The system phrase is now configured in the Greetings page for Info.
The greeting now plays either info1.wav or info2.wav for digits collected in GetCustInfo.
NOTE: There is no limit to the range of digits that we could have used. The same simple call-flow diagram could be used to configure an information hotline that plays a selection from thousands of voice files.