User Prompt Literals

The user prompt literal is always of type Prompt.

UserPrompt:
UserPromptDeclarator [ComplexLiteralInputCharsopt]
UserPromptDeclarator [Expression]
UserPromptDeclarator [Expression, ArgumentList]
UserPromptDeclarator: one of
p P
User prompt literals are used to represent a prompt located in the prompt repository and manageable using the prompt management pages which are part of the Cisco Unified CCX Administration Web page. The ComplexLiteralInputChars can include the [ character as long as it has a balanced number of ] characters: one for every [ character found:
  • If the sequence of characters can be parsed as an Expression of type String, then the resulting prompt is a user prompt where the expression specifies the name of the prompt to retrieve the prompt from the repository.

  • If the sequence of characters can be parsed as an Expression and an ArgumentList where the first one must have type String, then the resulting prompt is a user prompt where the first argument specifies the name of the prompt to retrieve from the repository and the argument list must corresponds to the expected parameterized arguments of a complex expression block defined in a prompt template file.

    The arguments are ignored if the referenced prompt is not a prompt template. If it is one, then each specified argument is evaluated and assigned as the value of a defined argument to the expression block. If the types do not match, then a runtime exception is thrown back. No errors are generated if more arguments are supplied then expected; they are ignored. No errors are generated if fewer arguments are supplied then expected unless the given argument is accessed by the complex expression block and it was not defined with a default value

  • If the sequence of characters cannot be parsed properly as described above, then it is considered to be the name of the user prompt to retrieve from the repository.

Example User Prompts Literals:
P[text.tts]
P[AA\Welcome.wav]
P[currency.tpl]
P[prompt]
P["currency.tpl", amount, C[USD]]

The extension of the prompt file can be omitted in which case the search looks at all supported extensions (<.wav>, <.ssml>, <.tts>, <.tpl>) in order until one is found.

Note

The special case of P[] represents an empty prompt.