Architect expression help
Architect provides a concentrated, comprehensive list of elements to assist you with expression building. This list includes mathematical, statistical, text, date and time, logical, comparison, list, financial, audio, language, and type cast categories. Each element includes a description, implementation code, return values, and parameters. You can also view examples of specific strings and the resulting output. Within the Expression Help, you can copy and paste a desired example into the Edit Expression dialog box and then modify it to meet your expression calculation.
Within Expression Help, you can view implementations, parameters, and examples. You can also copy and paste a provided example into the Edit Expression dialog box and then modify it to meet your expression calculation.
Access Expression Help from the help menu
In the upper right corner of Architect, click the Help button and select Expression Help.
Access Expression Help using the Functions button
- From the Edit Expression dialog box or the Audio Sequence dialog box, click the F() button. The Expression Help dialog box opens.
- To locate a specific element, do one of the following:
- In the Search field, type the first few letters of the function you want to view. Architect displays potential matches.
- In the Name / Symbol area, use the scroll bar to navigate to the function you want to view and click the function to see the values.
- To exit the Expression Help dialog box, in the upper right corner click X.
Access Expression Help using type-ahead
You can easily access expression-specific function help by using Architect’s type-ahead feature in the Edit Expression dialog box. When you type the first few letters of text, Architect displays a list of potential matches. Each match includes a ? that when clicked, opens the Expression Help for that expression.
Some functions, such as ToAudioNumber or ToAudioBool, are only valid for use in certain supported languages. Flow authors should only incorporate data playback in a flow using ToAudio functions if the flow’s supported languages include runtime data playback support. To determine if a function has this requirement, check that function’s page in the Expression Help.
If a function is called in an unsupported language, Architect returns an error. For example: A flow is configured with runtime data playback support for English (en-us) and therefore runs in English, but encounters the following expression:
In this case, the runtime knows to sequence the system prompt of five hundred and the system prompt of three in that order, because this is the order English-speaking users expect. However, if Architect does not have runtime data playback support for a language, and the flow author sets that language as supported for the flow, the above example generates a parsing error.
The error occurs when the flow runs in a language with no runtime data playback support because if the flow encounters ToAudioNumber(503), Architect cannot determine how to read the number back in audio appropriate for the unsupported language.
For each function to which this applies, the Expression Help help contains a Valid for use in these languages section.
Every Expression Help page contains implementation information. Implementations show the supported ways an author can call a function or operator. For example, in the Expression Help, open the addition operator and view the potential implementations such as:
5 + 3
"hello" + true
Implementations show both the data types and the parameters you can specify.
Within each Implementations section, the Expression Help includes a Parameters section that provides helpful information for flow authors, such as whether the parameter is allowed to be NOT_SET at run-time, minimum and maximum values, and other restrictions. For example, when a parameter is only allowed as a literal.
Example: Valid currency code
By including “USD” in the following expression, the author ensures that the currency code parameter is a valid ISO 4217 code, as specified in the MakeCurrency parameters.
However, if a flow author uses a literal for the currency code, the parser validates the code at design time. The following call results in a parser error, telling the flow author that the currency code parameter is not a supported currency code:
When Architect validates this literal value at design time, it returns a message informing the flow author that the literal “USD123” supplied to the currencyCode parameter is not a supported ISO4217 currency code.
Example: Valid Date time
Similarly, the following expression, which is a date time with year of 2500, will also be flagged at design time:
MakeDateTime(2500, 1, 1, 0, 0, 0)
As specified in the Expression Help for MakeDateTime, the value of 2500 supplied to the year parameter is greater than the maximum allowed of 2200.