WorkflowData
|
Provides access to a workflow data profile that is created either through the CXone platform or with APIs. A workflow data profile is a named set of predefined key-value data pairs. This action provides a property that allows you to choose from a list of available profiles. After the action runs in a script, the workflow data output is available as dynamic data object with the same name as the profile you select. |
Dependencies
- If you want to reference the dynamic data object later in the same script, the script that runs this action must declare the dynamic data object to which the data will return. The example script shows an Assign action after the completion of WorkflowData action with the code {Emergency.raiseAlarm}. The main script will not compile unless you add the declaration Dynamic Emergency to a snippet somewhere in the script (in the example script it is the snippet at the top left). The WorkflowData action populates the declared Emergency variable because Emergency was selected as the profile name. The declaration and profile name must match.
- Typing an invalid name instead of using the drop-down, or deactivating a profile through the admin interface or API results in taking the error branch. The error branch should be scripted as well as the default branch.
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. |
ProfileName | A drop-down list of active workflow data profile names that an administrate created through the platform or from an API. The name is restricted to the same naming patterns as variables that can be created in Studio and will be validated by the API and Admin interfaces. No profiles can be created in Studio, but the data stored under the profile can be accessed through this action. |
Output Properties
These properties contain variables that hold data returned from executing the action. They're available for reference and use when the action completes.
Property |
Description |
---|---|
DynamicData |
This variable corresponds with the profile name that was selected in the drop-down of the action. |
_Err | Variable output when the error branch is taken. |
Result Branch Conditions
Result branch conditions allow you to create branches in your script to handle different outcomes when an action executes.
Condition |
Description |
---|---|
Default |
Path taken unless the script meets a condition that requires it to take one of the other branches. It is also taken if the action's other branches are not defined. |
OnError |
Path taken when the action fails to execute properly. For example, when there is an unexpected problem such as poor connectivity, syntax errors, and so on. The _ERR variable, with a single underscore character, should be populated with a condensed explanation of the problem. |
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.
In the following example, you can see that WorkflowData is the second action in the script, entitled Emergency WF Data.
Would you like to download this script?