The False Output Branch

If the If step cannot locate a spoken recording of the name of the caller, the script executes the False output branch.

Configure the False output branch of the If step to generate the name, using the spelling generator of the Create Generated Prompt steps.

First, configure a Get User Info step to retrieve the information contained in the firstName, fullName, and lastName variables, in order to make this information available to the Create Generated Prompt steps.

Figure shows the configured Get User Info customizer window.

Configured Get User Info Customizer Window

Figure shows the first configured Create Generated Prompt customizer window in the False branch.

Configured Create Generated Prompt Customizer Window— spelled Prompt

Configure the Create Generated Prompt customizer window as follows:

  • Generator Type—fullname

    This step uses the fullname generator type to properly concatenate the last name and the first name of the user based on the country/language settings associated with the call.

  • Constructor Type—(firstname,lastname)

    This drop-down list contains the available constructors for a given generator. In this case, the constructor specifies that two input parameters are required: the first name followed by the last name.

  • Override Language—(blank)

    Do not choose to override the language context of the call.

  • Output Prompt—spelledPrompt

    This is the prompt that the script will play back to the caller, containing the name of the caller as generated by this step.

Figure shows the second configured Create Generated Prompt customizer window in the False branch.

Configured Create Generated Prompt Customizer Window—tts Prompt

Configure the Create Generated Prompt customizer window for the TTS prompt in a similar way to Figure 7-13..

Finally, insert a Set step to revert to the spelled prompt if TTS is not available.

Figure shows the Set step customizer window in the False branch.

Set Name Customizer Window— namePrompt

Configure the Set customizer window as follows:

  • Variable—namePrompt

    This is the name of the variable where the result of evaluating the given expressions will be stored.

  • Assign—Use the Expression Editor to specify ttsPrompt ||| spelledPrompt

    This prompt expression defines a prompt which will attempt to play the first prompt (that is, ttsPrompt) and—if it fails—then the second prompt (that is, spelledPrompt).

    This provides a mechanism for the script to adapt itself to the system where it is executed. If the system is configured with TTS, then the script will attempt to use TTS to playback the name of the user. If TTS is not available and attempting to play such a prompt would cause an error to occur, the system falls back to the second prompt and plays that. (In this case, the second prompt does not rely on TTS services.)