Return
This help page is for Desktop Studio. This information is also available for CXone Studio.
|
Completes the subscript triggered by Runsub in another script. Return stores a single value in the ReturnValue property and passes it back to the script that called the subscript. ReturnValue is stored in the ReturnVariable property in the Runsub action. Return should always return control back to the main script. Best practice is not to end a script while in a subscript. |
Supported Script Types
|
|
|
|
|
|
|
|
Generic |
Chat | Phone | Voicemail | Work Item | SMS | Digital |
Input Properties
These properties define data that the action uses when executing.
Property |
Description |
---|---|
Caption |
Enter a short phrase that uniquely identifies this action in the script. The caption appears on the script canvas under the action icon. |
ReturnValue |
The variable that holds the value you want to pass to the main script. This value is stored in the ReturnVariable property of the |
Result Branch Conditions
None
Tips & Tricks
The ReturnValue can be an array or dynamic data object. If you use a dynamic data object, convert it to JSON or XML using the
Script Example
This is an example to show how this action can be used in scripts. It is not intended to be a complete script. Additional scripting may be required.
The example below is a subscript that uses three Return actions to values back to a main script.
Would you like to download this script?