Prompt Step Descriptions

Table of Contents

Prompt Step Descriptions
Create Conditional Prompt
Create Container Prompt
Create Generated Prompt
Create Language Prompt
Create TTS Prompt

Prompt Step Descriptions


The steps in the Prompt palette of the Cisco Customer Response Applications (CRA) Editor provide script designers with a way to create intelligent prompts.

The Prompt palette contains the following steps:

Figure 9-1 shows the steps in the Prompt palette as they appear in the Palette pane of the CRA Editor.


Figure 9-1   Prompt Palette Steps


Create Conditional Prompt

Use the Create Conditional Prompt step to create a prompt based on the result of evaluating a specified Boolean expression.

The prompts passed are evaluated immediately as prompt objects, but they are not resolved until the time of playback. This means that if the values of any variables entered as part of the expression change between the time this prompt was created and the time the prompt is played back, then the new value of the variable is used to evaluate the conditional expression.

As an example, you can write a script that offers callers the choice between pressing digits or speaking a number. The conditional prompt provides prompts for both situations and lets the caller's choice determine which prompt the script plays in the given case.

Figure 9-2 shows the customizer window for the Create Conditional Prompt step.


Figure 9-2   Create Conditional Prompt Customizer Window


Table 9-1 describes the properties of the Create Conditional Prompt customizer window.

Table 9-1   Create Conditional Prompt Properties

Property Description

Output Prompt

Variable that stores the prompt that results from the Create Conditional Prompt step

Condition Expression

Boolean expression the script uses to decide which one of the two prompts to play back

Prompt If True

Prompt to be used if the expression is True

Prompt If False

Prompt to be used if the expression is False

To use the Create Conditional Prompt customizer window to create a conditional prompt, perform the following procedure:

Procedure

Step 1   From the Output Prompt drop-down menu, choose the variable that stores the prompt that results from this step.

Step 2   In the Condition Expression field, enter a value directly or take one of the following actions:

  • From the Condition Expression drop-down menu, choose the variable that stores the expression to be used to evaluate the condition.
  • Click the Expression Editor (...) button and enter the expression to be used to evaluate the condition.

Step 3   In the Prompt If True field, enter a value directly or take one of the following actions:

  • From the Prompt If True drop-down menu, choose the variable that stores the prompt to be used if the expression evaluates to true.
  • Click the Expression Editor (...) button and enter an expression that specifies the prompt to be used if the expression evaluates to true.

Step 4   In the Prompt If False field, enter a value directly or take one of the following actions:

  • From the Prompt If False drop-down menu, choose the variable that stores the prompt to be used if the expression evaluates to false.
  • Click the Expression Editor (...) button and enter an expression that specifies the prompt to be used if the expression evaluates to false.

Step 5   Click OK.

The Create Conditional Prompt customizer window closes, and the name of the conditional prompt appears next to the Create Conditional Prompt step icon in the Design pane of the CRA Editor.





Create Container Prompt

Use the Container Prompt step to combine multiple prompts into one larger prompt. You can create three types of container prompts:

  • Concatenated Prompt—Contains a list of prompt phrases that are played back in a specific sequence.

For example, for a prompt of "Your checking account balance is one hundred and sixty-eight dollars", you can create a concatenated prompt that (1) begins with a user prompt "Your"; (2) continues with a conditional prompt that specifies a condition such as <accountType == "check">, and plays "checking account" if the condition is True or "savings account" if the condition is False; and (3) ends with the balance amount.

  • Escalating Prompt—Provides an initial question prompt with a minimal amount of information at first, and then adds additional prompt phrases if no response is given.

For example, for a prompt that provides the caller with more information as needed, you can create an escalating prompt that, when passed to a media step such as the Get Digit String step, begins by playing the first concise prompt inside the escalating prompt, such as "What is your account number?"

If the step fails to collect the account number due to the caller's failure to provide it, a second prompt plays, such as "Please provide your account number by either pressing the account number using your touch tone phone followed by the pound key, or simply speaking out the account number digits."

  • Random Prompt—Plays back a series of promotional or informational messages in a random order while a caller is waiting for an available agent.

Figure 9-3 shows the customizer window for the Create Container Prompt step.


Figure 9-3   Create Container Prompt Customizer Window


Table 9-2 describes the properties of the Create Container Prompt customizer window.

Table 9-2   Create Container Prompt Properties

Property Description

Output Prompt

Script variable that holds the combined prompt generated by the Create Container Prompt step

Prompt Container Type

Concatenated, escalating, or random prompt

Prompts

List of prompts to be combined into the container prompt

Override Language (optional)

Language in which the prompts are played back

To use the Create Container Prompt customizer window to create a concatenated prompt, perform the following procedure:

Procedure

Step 1   From the Output Prompt drop-down menu, choose the variable that stores the container prompt that results from this step.

Step 2   From the Prompt Container drop-down menu, choose Concatenated.

Step 3   To add an individual prompt to be concatenated, click Add.

The Add Prompt dialog box appears. (See Figure 9-4.)


Figure 9-4   Add Prompt Dialog Box


Step 4   In the Prompt field, enter a value directly or take one of the following actions:

  • From the Prompt drop-down menu, choose the variable that stores the prompt you want to add.
  • Click the Expression Editor (...) button and enter an expression that specifies the prompt you want to add.

Step 5   Click OK.

The Add Prompt dialog box closes, and the name of the prompt variable appears in the Prompts list box in the Create Container Prompt customizer window.

Step 6   Repeat Steps 3 to 5 as needed to add prompts until all the prompts that you want to concatenate appear in the Prompts list box.

Step 7   To determine the order of playback of the prompts in the concatenated prompt, select an individual prompt and click the Up button to move it up a level or the Down button to move it down a level.

Step 8   Repeat Step 7 as needed until the prompts in the concatenated prompt are listed in the playback order you want.

(To modify a prompt that is contained in the concatenated prompt, select the prompt in the Prompts list box, and then click Modify. The Modify Prompt dialog box appears, which contains the same property as the Add Prompt dialog box and is configured in the same way.)

Step 9   To specify a different language for the playback of the concatenated prompt, take one of the following actions:

  • From the Override Language (Optional) drop-down menu, choose a language for the concatenated prompt playback.
  • Click the Expression Editor (...) button.

The Define Language dialog box appears. (See Figure 9-5 .)


Figure 9-5   Define Language Dialog Box


  • Choose the desired language from the Language display list, or enter the name of the desired language in the User Defined text field.
  • Click OK.

The Define Language dialog box closes, and the specified language appears in the Override Language text field.

Step 10   Click OK.

The Create Container Prompt customizer window closes, and the name of the concatenated prompt appears next to the Create Container Prompt step icon in the Design pane of the CRA Editor.





To use the Create Container Prompt customizer window to create an escalating prompt, perform the following procedure:

Procedure

Step 1   From the Output Prompt drop-down menu, choose the variable that stores the container prompt that results from this step.

Step 2   From the Prompt Container drop-down menu, choose Escalating.

Step 3   To add an individual prompt to be included in the escalating prompt, click Add.

The Add Prompt dialog box appears. (See Figure 9-4.)

Step 4   In the Prompt field, enter a value directly or take one of the following actions:

  • From the Prompt drop-down menu, choose the variable that stores the prompt you want to add.
  • Click the Expression Editor (...) button and enter an expression that specifies the prompt you want to add.

Step 5   Click OK.

The Add Prompt dialog box closes, and the name of the prompt variable appears in the Prompts list of the Create Container Prompt customizer window.

Step 6   Repeat Steps 3 to 5 as needed to add prompts until all the prompts that you want to include in the escalating prompt appear in the Prompts list box.

Step 7   To determine the order of playback of the prompts in the escalating prompt, select an individual prompt and click the Up button to move it up a level or the Down button to move it down a level.

Step 8   Repeat Step 7 as needed until the prompts in the escalating prompt are listed in the playback order you want.

(To modify a prompt that is contained in the escalating prompt, select the prompt in the Prompts list box, and then click Modify. The Modify Prompt dialog box appears, which contains the same property as the Add Prompt dialog box and is configured in the same way.)

Step 9   To specify a different language for the playback of the escalating prompt, take one of the following actions:

  • From the Override Language (Optional) drop-down menu, choose a language for the escalating prompt playback.
  • Click the Expression Editor (...) button.

The Define Language dialog box appears. (See Figure 9-5 .)

  • Choose the desired language from the Language display list, or enter the name of the desired language in the User Defined text field.
  • Click OK.

The Define Language dialog box closes, and the specified language appears in the Override Language text field.

Step 10   Click OK.

The Create Container Prompt customizer window closes, and the name of the escalating prompt appears next to the Create Container Prompt step icon in the Design pane of the CRA Editor.





To use the Create Container Prompt customizer window to create a random prompt, perform the following procedure:

Procedure

Step 1   From the Output Prompt drop-down menu, choose the variable that stores the container prompt that results from this step.

Step 2   From the Prompt Container drop-down menu, choose Random.

When you choose the random prompt, Prompt and Weight columns appear in the Prompts list box. (See Figure 9-6.)


Figure 9-6   Create Container Prompt Customizer Window—Random Prompt


Step 3   To add an individual prompt to be included in a random sequence, click Add.

The Add Prompt dialog box appears. (See Figure 9-7 .)


Figure 9-7   Add Prompt Dialog Box


Step 4   In the Prompt field, enter a value directly or take one of the following actions:

  • From the Prompt drop-down menu, choose the variable that stores the prompt you want to add.
  • Click the Expression Editor (...) button and enter an expression that specifies the prompt you want to add.

Step 5   From the Weight drop-down menu, choose a number to represent the priority of the prompt in the sequence.

Step 6   Click OK.

The Add Prompt dialog box closes, and the name and weight of the prompt variable appears in the Prompts list of the Create Container Prompt customizer window.

Step 7   Repeat Steps 3 to 6 as needed to add prompts until all the prompts that you want to play randomly appear in the Prompts list box.

Step 8   To make an individual prompt play more or less often than other prompts, select it and click the Up button to move it up a level in priority or the Down button to move it down a level in priority.

Step 9   Repeat Step 8 as needed until the prompts in the random prompt are listed in the priority order you want.

(To modify a prompt that is contained in the random prompt, select the prompt in the Prompts list box, and then click Modify. The Modify Prompt dialog box appears, which contains the same property as the Add Prompt dialog box and is configured in the same way.)

Step 10   To specify a different language for the playback of the random prompt, take one of the following actions:

  • From the Override Language (Optional) drop-down menu, choose a language for the random prompt playback.
  • Click the Expression Editor (...) button.

The Define Language dialog box appears. (See Figure 9-5 .)

  • Choose the desired language from the Language display list, or enter the name of the desired language in the User Defined text field.
  • Click OK.

The Define Language dialog box closes, and the specified language appears in the Override Language text field.

Step 11   Click OK.

The Create Container Prompt customizer window closes, and the name of the random prompt appears next to the Create Container Prompt step icon in the Design pane of the CRA Editor.





Create Generated Prompt

Use the Generated Prompt step to create prompt phrases from intermediate variables whose values are dynamically determined based on run-time script information.

For example, you can create the prompt phrase of "account balance is one hundred and sixty-eight dollars" by querying the database of account balances at a particular point in the script and using a currency generator to generate the number.

Figure 9-8 shows the customizer window for the Create Generated Prompt step.


Figure 9-8   Create Generated Prompt Customizer Window


Table 9-3 describes the properties of the Create Generated Prompt customizer window.

Table 9-3   Create Generated Prompt Properties

Property Description

Output Prompt

Prompt script variable in which the prompt object resulting from this step is stored.

Generator Type

Type of information generated.

(See following sections for descriptions of the 12 supported generator types.)

Constructor Type

Constructor type that corresponds to the generator type.

Argument Information

Arguments and their values.

Override Language (Optional)

Language in which the prompt is played back. Used only if the resulting prompt is played in a different language than the one defined by the contact in which that prompt is played back.

To use the Create Generated Prompt customizer window to generate prompt phrases, perform the following procedure:

Procedure

Step 1   From the Output Prompt drop-down menu, choose the variable that stores the prompt that results from this step.

Step 2   From the Generator drop-down menu, choose the generator type for the prompt.

Step 3   In the Constructor Type drop-down menu, choose the constructor type for the prompt.

When you choose the constructor type, the constructors automatically appear in the Argument column of the Argument list box.

Step 4   To define a value for an item in the Argument Information list box, select and then double-click the item.

The Define Character dialog box appears. (See Figure 9-9 .)


Figure 9-9   Define Character Dialog Box


Step 5   In the Enter Variable Expression field, enter a value directly or take one of the following actions:

  • From the Enter Variable Expression drop-down menu, choose the variable that holds the value for the argument.
  • Click the Expression Editor (...) button and enter any valid expression.

Step 6   Click OK.

The Define Character dialog box closes, and the name of the argument and its value appear in the Argument Information list box of the Create Generated Prompt customizer window.

Step 7   Repeat Steps 3 to 5 as needed to define each argument in the Argument Information list box.


Note    You must define all arguments listed with some value or define them as null; you cannot leave them blank.

Step 8   To specify a different language for the playback of the generated prompt, take one of the following actions:

  • From the Override Language (Optional) drop-down menu, choose a language for the generated prompt playback.
  • Click the Expression Editor (...) button.

The Define Language dialog box appears. (See Figure 9-5 .)

  • Choose the desired language from the Language display list, or enter the name of the desired language in the User Defined text field.
  • Click OK.

The Define Language dialog box closes.

Step 9   Click OK.

The Create Generated Prompt customizer window closes, and the name of the generated prompt appears next to the Create Generated Prompt step icon in the Design pane of the CRA Editor.





The Create Generated Prompt step supports the following 12 generator types:

The following sections describe these supported generator types.

Number

The Number generator type supports the following constructors:

  • (Number number)
  • (String number)
  • (Number number, Number gender)
  • (String number, Number gender)
  • (Number number, Boolean play.full)
  • (String number, Boolean play.full)
  • (Number number, Boolean play.full, Number gender)
  • (Number number, Boolean play.full, Number gender)

The three parameters are:

  • Number—Any Number object (for example; Integer, Long, Float, Double, BigInteger, BigDecimal) or String object defining the number to be played back.
  • Gender—When the number must be played back in a specific gender context, this parameter specifies the context. Valid values are 0 for neutral, 1 for male, and 2 for female.

Note    If the language associated with the call does not behave differently based on gender, this parameter is ignored.

  • Play.full—Plays the number in full format if this optional Boolean argument is true or omitted. (For example, "709" is played as "Seven Hundred and Nine".) Otherwise, the number plays in brief format. (For example, "709" is played as "Seven Oh Nine".)

Note    If the number is played in full format, the maximum number supported is +/- 999,999,999,999.

Character

The Character generator type supports the following constructors:

  • (Character character)
  • Character character, Boolean play_all)

The two parameters are:

  • Character—The character object to be played back.
  • Play_all—Optional Boolean flag indicating whether to play spaces, punctuation, and other special characters normally instead of playing them as silence (ranging from 250ms to 500ms).

Spelling

The Spelling generator type supports the following constructors:

  • (String string)
  • (String string, Boolean punctuation)
  • (Object object)
  • (Object object, Boolean punctuation)

The three parameters are:

  • String—String object to be played back.
  • Object—Object for which the string representation returned by the String.valueOf() method should be spelled out.
  • Punctuation—An optional Boolean flag indicating whether to play spaces, punctuations, and special characters normally or as silences.

Note    Punctuation default behavior in the Spelling generator is different from Play-all default behavior in the Character generator.

Date

The Date generator type supports the following constructors:

  • (Date date)
  • (Date date, Boolean skip.current.year)
  • (Number year)
  • (Number year, Number month)
  • (Number year, Number month, Boolean skip.current.year)
  • (Number year, Number month, Number day)
  • (Number year, Number month, Number day, Boolean skip.current.year)

The five parameters are:

  • Date—Any Date object from which to extract the date to be played back.
  • Skip.current.year—If set to true, the year does not play back if it is the same as the current year.
  • Year—The year of the date to be played back. This year must be specified in full (for example, 2002).

Note    Any number given is played, so it is the responsibility of the caller to ensure that the specified year is valid.

  • Month—The month of the date to be played back. Valid values range from 1 to 12, where 1 represents January and 12 represents December.
  • Day—The day of the date to be played back. Valid values range from 1 to 31 and are validated at run time based on the specified month and year.

Time

The Time generator type supports the following constructors:

  • (Time)
  • (Hours, Minutes)

The three parameters are:

  • Time—Any Date or Time object representing the time to be played back. Time can also be defined as a Number object (Integer, Float, Long, and so forth) that specifies the time to be played, from 0 to 2359. (For example, a number such as 1234 is played as "12 34 PM.") If the value specified is greater than 2359, then Time is considered to be the number of milliseconds since the standard base time known as "the epoch," namely January 1, 1970, 00:00:00 GMT.
  • Hours—Number object that specifies the hour to be played.
  • Minutes—Number object that specifies the minutes to be played.

Ordinal

The Ordinal generator type supports the following constructors:

  • (Number number)
  • (String number)
  • (Number number, Number gender)
  • (String number, Number gender)

The two parameters are:

  • Number—Any Number or String object defining the ordinal number to be played back. The supported range is from 1 to 999999.
  • Gender—When the ordinal number must be played back in a specific gender context, this parameter specifies this context. Valid values are 0 for neutral, 1 for male, and 2 for female.

Note    If the language associated with the call does not behave differently based on gender, then this parameter is ignored.

Currency

The Currency generator type supports the following constructors:

  • (Currency designator)
  • (Number amount)
  • (Number amount, Currency currency)
  • (Number dollar, Number cent)
  • (Number dollar, Number cent, Currency currency)
  • (Number amount, Boolean colloquial)
  • (Number amount, Boolean colloquial, Currency currency)
  • (Number dollar, Number cent, Boolean colloquial, Currency currency)

The six parameters are:

  • Designator—The designator of a currency to play back. (For example, "USD" is played back as "U.S. Dollar".)
  • Amount—The currency amount to be played back in the system configured default currency or in the specified currency.
  • Dollar—Number object representing the amount of currency unit to be played. Only the integer part of the number is played. The fractional part, if any, is ignored.
  • Cent—Number object representing the currency subdivision to be played. Only the integer part of the number is played. The fractional part, if any, is ignored.

Note    If the number specified exceeds the maximum value allowed for the subdivisions, the excess is added properly to the number of currency unit. For example, specifying "5 dollars and 233" cents results in "7 dollars and 33 cents".

  • Colloquial—An optional Boolean flag, which specifies whether to use colloquial currencies' representations (for example, "Dollars" instead of "US Dollars"). If omitted, the currency amount is played in colloquial format.
  • Currency—The currency in which the amount should be played back. If not specified, the system default configured currency is played back.

Country

The Country generator type supports only one constructor: (Language language). The parameter "language" is a Language object from which to get the language to be played back. (For example, en_US is played back as "United States English".)

Language

The Language generator type supports only one constructor: (Language language). The parameter "language" is a Language object from which to get the country to be played back. (For example, en_US is played back as "United States English".)

Telephone Number

The Telephone Number generator type supports only one constructor: (String number). The parameter "number" is a String object specifying the telephone number to be played out as a sequence of digits.

The character is replaced with 250 ms of silence if the string contains any of the following characters: "-(). Otherwise, the string is automatically formatted.

Automatic formatting of the string inserts 250 ms of silence between sections of digits. These sections follow the following rule: "XXX-XXX-XXX-XXXX" unless there are exactly five digits in the string, in which case the string is considered to be a single section of five digits.

An "x" character is played back as "Extension". DTMF digits ("ABCD0123456789#*") are played back normally.

A string of the form "*xx" where x is a Dual Tone Multi-Frequency (DTMF) digit ("0123456789") is played back as "star xx" (for example,"*69" is played back as "star sixty-nine").

Credit Card Number

The Credit Card Number generator type supports only one constructor: (String number). The parameter "number" is a String object specifying the credit card number to be played out as a sequence of digits.

If the specified credit card number includes "-", then it is played as is, replacing the "-" character with 250 ms of silence; otherwise the number is automatically separated into sections of four digits and played back with 250 ms of silence inserted between sections.

Credit Card Expiration Date

The Credit Card Expiration Date generator type supports the following constructors:

  • (Number year, Number month, Number day)
  • (Number year, Number month)

The parameters are identical to the following Generated Date constructors:

  • If day is 0 or omitted—GeneratedDate (year, month, true)
  • All other cases—GeneratedDate (year, month, day, true)

Create Language Prompt

Use the Create Language Prompt step to input a set of prompts corresponding to different languages.

You can use the Create Language Prompt step to adapt concatenating prompts to the sentence structures of different languages.

For example, a normal grammar sequence for an English sentence is Subject + Verb + Object. For a Japanese sentence, it is Subject + Object + Verb.

The selection of the prompt is based on the standard search for a matching language. For example, assuming a language context of {L[fr_FR}, L[en_GB]}, the search returns the first prompt defined for the following languages: L[fr_FR], L[fr], L[en_GB], L[en], and finally L[ ].

Figure 9-10 shows the customizer window for the Create Language Prompt step.


Figure 9-10   Create Language Prompt Customizer Window


Table 9-4 describes the properties of the Create Language Prompt customizer window.

Table 9-4   Create Language Prompt Properties

Property Description

Output Prompt

Script variable where the prompt that results from the Create Language Prompt step is stored

Prompts

Prompt variable names or prompt expressions and all the languages that have been entered.

To use the Create Language Prompt customizer window to input a set of prompts corresponding to different languages, perform the following procedure:

Procedure

Step 1   From the Output Prompt drop-down menu, choose the variable that stores the prompt that results from this step.

Step 2   Click Add.

The Add Prompt dialog box appears. (See Figure 9-11 .)


Figure 9-11   Add Prompt Dialog Box


Step 3   From the Language drop-down menu, choose the variable that holds the value for the language, or click the Expression Editor (...) button and to enter any valid expression.

Step 4   In the Prompt field, enter a value directly or take one of the following actions:

  • From the Prompt drop-down menu, choose the variable that holds the value for the prompt.
  • Click the Expression Editor (...) button and enter any valid expression.

Step 5   Click OK.

The Add Prompt dialog box closes, and the name of the prompt and its language appear in the Prompts display list of the Create Language Prompt customizer window.

(To modify an existing prompt, select the prompt in the Prompts list box, and then click Modify. The Modify Prompt dialog box appears, which contains the same property as the Add Prompt dialog box and is configured in the same way.)

Step 6   Click OK.

The Create Language Prompt customizer window closes, and the name of the language prompt appears next to the Create Language Prompt step icon in the Design pane of the CRA Editor.





Create TTS Prompt

Use the Text to Speech (TTS) Prompt step to play back the text from a string or document expression as speech, using one of the installed TTS servers.

By default, the language of the TTS Prompt is determined by the language in which the prompt is going to be played back. You have the option of overriding this default and specifying another language. However, you should keep this field up to date with the language of the text passed in to ensure proper interpretation of the text.


Note   If the script cannot find the Override Language (or the language defined for the contact if Override Language is undefined) from the initialized TTS server list, this TTS request will be denied.

Figure 9-12 shows the customizer window for the Create TTS Prompt step.


Figure 9-12   Create TTS Prompt Customizer Window


Table 9-5 describes the properties of the TTS Prompt customizer window.

Table 9-5   Create TTS Prompt Properties

Property Description

Output Prompt

Script variable that holds the resulting TTS prompt.

Text Input

String expression or Document expression.

Voice Gender

Gender of simulated voice.

Voice gender can be male, female, or default, if supported by the TTS provider. If not supported, the system automatically falls back to a supported voice gender.

Override Language (optional)

Different language to be used instead of the language defined for the contact where the prompt is played back.

Note To ensure proper conversion, keep this field current with the language of the text passed in.

To use the Create TTS Prompt customizer window to play back text as speech, perform the following procedure:

Procedure

Step 1   From the Output Prompt drop-down menu, choose the variable that stores the prompt that results from this step.

Step 2   In the Text Input field, enter a value directly or take one of the following actions:

  • From the Text Input drop-down menu, choose the variable that holds the value for the text input.
  • Click the Expression Editor (...) button and enter an expression that specifies the text input value.

Step 3   From the Voice Gender drop-down menu, choose the variable that indicates the gender of the voice to be used.

Step 4   To specify a different language for the playback of the TTS prompt, take one of the following actions:

  • From the Override Language (Optional) drop-down menu, choose a language for the concatenated prompt playback.
  • Click the Expression Editor (...) button.

The Define Language dialog box appears. (See Figure 9-5 .)

  • Choose the desired language from the Language display list, or enter the name of the desired language in the User Defined text field.
  • Click OK.

The Define Language dialog box closes.

Step 5   Click OK.

The Create TTS Prompt customizer window closes, and the name of the TTS prompt appears next to the Create TTS Prompt step icon in the Design pane of the CRA Editor.