Workflow API Parameters
Parameter |
Type |
Description |
Possible Values |
Notes | ||||
---|---|---|---|---|---|---|---|---|
uri |
String |
The URI to get a new copy of the Workflow object. |
— |
The id in the URI maps to the primary key of the workflow. | ||||
name |
String |
The name of the workflow. |
— |
Must be unique. Maximum of 40 characters. | ||||
description |
String |
A description of the workflow. |
— |
Maximum of 128 characters. | ||||
media |
String |
Media channel of the workflow |
— | Media channel maps to the media id.
| ||||
TriggerSet |
Object |
A set of events that cause the conditions to be evaluated. |
— | |||||
ConditionSet |
Object |
A set of conditions that determine whether the workflow runs. |
— |
You can assign up to five conditions to a workflow. | ||||
workflowActions |
Object |
A list of workflow actions to run if the trigger and its conditions are met. Actions run in the order in which they appear in this list. |
— |
You can assign up to five workflow actions to a workflow. When getting a workflow or list of workflows, this list contains summary workflow actions (name, type, and URL). When creating or updating a workflow, only the URI is required in each workflow action. For more information, see WorkflowAction. |
ConditionSet Parameters
Parameter |
Type |
Description |
Possible Values |
Notes |
---|---|---|---|---|
applyMethod |
String |
Determines whether any or all of the conditions must be met for the workflow to run. |
ANY, ALL | |
conditions |
Object |
A list of conditions for the workflow. |
— |
Maximum of five conditions for a workflow. A workflow with no conditions is specified by a conditions parameter with no Condition elements. |
Condition |
Object |
Information about a workflow condition. |
— | |
Variable |
Object |
A piece of data from the Trigger event used to filter the event. |
— |
Leading and trailing spaces are removed from the variable during evaluation. Comma-separated values in a list also have leading and trailing spaces removed. If the value contains only spaces, it is treated as an empty value. |
comparator |
String |
The operator used to compare the event variable to the desired value. |
IS_EQUAL, IS_NOT_EQUAL, BEGINS_WITH, ENDS_WITH, CONTAINS, IS_EMPTY, IS_NOT_EMPTY, IS_IN_LIST, IS_NOT_IN_LIST | |
value |
String |
The value to compare the event variable with. |
When type is SYSTEM, valid values are CALL_ARRIVES, CALL_ANSWERED, CALL_ENDS, CALL_IS_MADE, and CALL_IS_PREVIEWED. |
If the comparator is IS_IN_LIST or IS_NOT_IN_LIST, the value is one of a comma-separated list of values. If an explicit comma is needed, it must be escaped with a backslash (\,). If a backslash is needed, it must be escaped with a backslash (\\) (for example, apple,slash\\ here,comma\,here,ball). |
TriggerSet Parameters
Parameter |
Type |
Description |
Possible Values |
Notes |
---|---|---|---|---|
type |
String |
The type of TriggerSet. |
SYSTEM | |
name |
String |
The name of the TriggerSet |
When type is SYSTEM, valid values are CALL_ARRIVES, CALL_ANSWERED, CALL_ENDS, CALL_IS_MADE, and CALL_IS_PREVIEWED. | |
allow Overlapping CallWorkflow |
Boolean |
Indicates whether workflow for a second simultaneous call can fir while the call for this trigger is in process. |
TRUE, FALSE |
Default for this parameter is FALSE. |
triggers |
Object |
List of Trigger subobjects. |
— |
For workflow admin, this field is not returned and is ignored if the type is SYSTEM. |
Trigger Parameters
Parameter |
Type |
Description |
Possible Values |
Notes |
---|---|---|---|---|
Variable |
Object |
A piece of data from the trigger event to be used to filter the event. Contains a name, node, and type. |
— | |
name |
String |
A unique name for the variable. Used as a readable, unique key for the variable. |
— | |
node |
String |
The XPath to use to extract the value of the variable from an XMPP event that might contain it. |
— | |
type |
String |
Indicates whether this is a system or custom variable. |
SYSTEM, CUSTOM |
SYSTEM variables are name references to the values returned by SystemVariable and do not require a node value. CUSTOM variables are self-defining and require a node and a unique name that does not conflict with any system variable. |
Nodes can contain the following predefined variables as part of their XPath. When the node is evaluated, the current value as received in the most recent User event will be substituted in place of the variable. Variables are surrounded by ${} when specified in XPath as shown in the table below.
Note | These variables are a subset of those defined by the SystemVariable resource |
SYSTEM variables are name references to the values returned by SystemVariable and do not require a node value. CUSTOM variables are self-defining and require a node and a unique name that does not conflict with any system variable.
Variable Name | Value | Data Type |
---|---|---|
${userExtension} | The extension this user is currently using. | String |
${userLoginId} | The login ID of the user. | String |
${userLoginName} | The user's login name. | String |
${userTeamName} | The name of the team the user belongs to. | String |
${userTeamId} | The ID of the team the user belongs to. | String |
${userFirstName} | The first name of the user. | String |
${userLastName} | The last name of the user. | String |