Script Action utility
-
- UpdatedAug 3, 2023
- 2 minutes to read
- Vancouver
- Virtual Agent
Use the Script Action utility in a Virtual Agent topic to run a script.
Script Action utility properties
Property | Description |
---|---|
Node name | The name that identifies this Script Action node in the topic flow. |
Action expression | The script that performs an action. |
Advanced | |
Hide this node | |
Conditionally show this node if | No-code condition statement or low-code script that specifies a condition for presenting this node in the conversation. The condition must evaluate to true. |
Example Script Action utility

Example script action
This example performs a search on the [sn_customerservice_case] table for a specific case
number based on the input from another control called case_number
. The
script then places the results in an array and stores them in the case_list
variable, which is accessible by other nodes in the same topic. Because
vaVars
only supports string, number, and Boolean values, the script uses
toString()
to store these values as strings. The code is contained in an
if
statement, so it only executes if the case_number
variable has a value. This if
statement prevents the code from running if
the user has not entered a number.
For more information about writing scripts for Virtual Agent, see Virtual Agent scripts.