Using variables in Notify workflow activities
-
- UpdatedAug 3, 2023
- 1 minute read
- Vancouver
- Workflow
Certain Notify workflow activities support variable substitution for reading text to callers.
Scratchpad variables
You can call variables from the workflow scratchpad or the activity scratchpad using the syntax ${variable_name}. You do not need to include either workflow.scratchpad or activity.scratchpad before the variable name. For example, to use the variable activity.scratchpad.langCode = ‘en-US’, call ${langCode} within the activity. If the scratchpad does not contain the specified variable, the variable evaluates to an empty value.
You can get values from objects on the scratchpad using the format ${object.value}. For example, you can get the name of a user object, such as workflow.scratchpad.user = {name:'john.smith'} by calling ${user.name}.
The digit variable
The Input activity exposes the ${digit} variable. Use this variable in each condition presented by the activity. The number read to the user is determined automatically by each condition. The caller can press that number to cause the activity to transition through that condition.