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:
After this Create Generated Prompt step you can play the zipCodePrompt variable in any steps such as Play Prompt, Menu, Get Digit String, etc.
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: