Create Generated Prompt and Create Container Prompt Steps in UCCX Scripts

In many UCCX scripts a developer can meet a task to spell or pronounce some phrases from intermediate variables whose values are dynamically determined based on runtime script information. For example, the customer enters his information like his credit card number or zip code etc. and the script must confirm it by spelling this value back to the caller. Very often these spoken phrases should be concatenated with other existing prompts (wav-files). There are some interesting steps in the UCCX script editor such as Create Generated Prompt step and Create Container Prompt step. Let’s see how they can help you to spell string values and concatenate prompts. 

Let’s assume first that your script collected some user information with the Get Digit String step. This step plays a prompt and ask the customer to enter some digits. Let’s say that our customer entered his zip code and the script recognized all the digits and put them into the String variable zipCode. To spell the value of the variable zipCode back to the caller you can use the Create Generated Prompt step in the UCCX Editor. 

The Create Generated Prompt step is used to create prompt variables from intermediate values such as strings. The spoken information can be formatted into currency, telephone numbers, which are spelled, or many other formats. After the prompt is generated, it can be played by any step that plays a prompt.

When you choose a generator type from the Generator Type dropdown list in the Create Generated Prompt step, the corresponding constructor types become available in the Constructor Type dropdown list. These constructor types provide information on what form to use for creating a specific prompt generator.

So, now let’s create a prompt phrase for our zipCode string with the Create Generated Prompt step. Below you can find an example of how to do it with this step:

Generator Type field defines how the output prompt will be constructed. In our case we selected spelling to speak the value symbol by symbol. In the Arguments field we specify the Value to be spelled – our zipCode String variable. Finally, the result will be assigned to zipCodePrompt variable which will carry our generated prompt (please don’t forget to create an empty zipCodePrompt variable in the script variable window). 

After this Create Generated Prompt step you can play the zipCodePrompt variable in any steps such as Play Prompt, Menu, Get Digit String, etc. 

As an option, you can spell the value of the zipCode String variable directly in the Play Prompt step if you want. To do it, there is an S (Spelling) operator in the properties of the Play Prompt step as it is shown in the following screenshot: 

However, the Create Generated Prompt step provides better flexibility for the scripts. 

All right, now let’s see how we can concatenate several prompts together and play them one by one. Imagine, that we have to play something like “Your zip code is 90210” and 90210 is what the customer entered himself (we have to confirm his input). Let’s split this phrase to two prompts – “Your zip code is” and “90210”. The first part is a wav file and is presented by the Prompt variable promptPart1. And the second part is the generated prompt zipCodePrompt made by the Create Generated Prompt step as it was just described. We can combine them with the Create Container Prompt step. 

Here is how we can do it: 

In the properties of this step select Concatenation in the Type drop down list. This operation combines some prompts together. Then with the Add button specify the variables to be concatenated. In our example we added the promptPart1 and zipCodePrompt variables. The concatenated phrase will be in the output variable finalZipCodePrompt. Again you can play the output variable with Play Prompt or other media related steps.
Remember – the Create Generated Prompt and Create Container Prompt steps do not play the prompts!!! They just create the Prompt variables and that’s it.