Advanced Workflow reference
Supported CRMs | Bullhorn, Microsoft Dynamics, Oracle NetSuite, Salesforce, ServiceNow, SugarCRM, Tier1 CRM, Zendesk NOTE: Certain Advanced Workflow features are specific to certain CRMs where indicated. |
Supported PBX systems | All phone systems supported by Tenfold. Features may vary by system. For example, some phone systems support attached data while others do not. |
Configure workflows in Advanced Workflow
Advanced Workflow lets you define events (triggers) and conditions that cause automated actions to occur in the end user work environment.
This reference is intended for more advanced users who are interested in viewing the capabilities of actions and triggers and using more complex workflow features.
Users who are just getting started with workflow can begin using the Launcher feature to create web page links in the UI. Refer to Configure workflows using Manage Workflows for a detailed explanation of using the more technical workflow feature to create JSON-based configurations.
The parts of a workflow
There are two main parts to any workflow: An action, which tells the app what to do, and a trigger which tells the app when to do it.
In the following example, the trigger (shown in blue) is activated when there is a call (type is onCall
) when there is no matching phone number in the CRM.

The action, which is the event the trigger causes the happen, is shown in red. In this case, a URL opens in the user's browser:

The rest of this reference explores the capabilities and options of triggers and actions.
Workflow triggers
The top level of the workflow includes the information about the trigger. A trigger is a set of conditions that must happen (such as clicking a link or receiving a call) before the action portion of the workflow can occur.
Tenfold includes the following workflow triggers:
webLink
Adds links with custom labels to the UI. This trigger is the same as the one used to create workflows for Launcher; however, it is possible to go beyond the basic abilities configured in Launcher by using
webLink
in custom workflows.onCall
Performs an activity as defined by the action section when a call is received.
onFindAgain
Opens a URL when the user clicks "Find record" above the Search box in the Tenfold UI. Can be combined with parameters in the same way that the
webLink
trigger can.onRelatedResource
Detects when a resource related to Call has changed; runs when Call has no related resource, when a resource has been related with call, or if a related resource is replaced by another resource.
resolveMultiMatch
Performs the defined action when a multi-match call is resolved to a single match.
resolveNoMatch
Performs the defined action when a no-match call is resolved to a single match.
onClickCreateRecord
Performs the defined action when a user creates a new record in the UI.
onNoteSave
Performs the defined action when a user saves note for an interaction.
Required trigger properties
All workflow triggers must include the followign properties:
Name | Supported values | Description |
---|---|---|
| specific teams configured for the CRM | Teams assigned to the workflow. "_teams":[ ], |
| Defines the resulting behavior when the trigger condition is met. For more information, see Actions. "action": {
"type": "<type>",
...
} | |
| generated string | Unique identifier of the workflow generated by Tenfold. IMPORTANT: Do not change this value. |
| user-created string | User-friendly name identifying the workflow. "label" : "Example Workflow Label", |
|
other roles configured for the CRM | User roles that can access the workflow. "roles":[ "user", "admin", ... ] |
| The kind of trigger used in the workflow. For more information, see Workflow triggers |
Workflow actions
The workflow proceeds to the action portion when the conditions for the trigger are met. The action section of the workflow is inside the action {...}
of the workflow code.
Tenfold includes the following actions:
openCustomUrl
Opens a URL in a browser tab.
openMatchingRecord
Opens a record in context in the CRM.
openParentAccount
Opens the record for the account which is the parent of the record currently in context.
openCrmSearch
Opens search in the CRM. Support is limited to Salesforce and MS Dynamics.
openCrmFlow
Opens a Salesforce Lightning Flow.
openCrmUrl
Opens a relative URL (only in Salesforce Lightning); uses the Salesforce API to open a specified view.
openRelatedResource
Opens the target resource of the
onRelatedResource
trigger in the CRM.postCustomMessage
Integrates Tenfold with a Dynamics custom search page via
windows.postMessage()
.runApex
Runs a Salesforce OpenCTI method.
sendRequest
Sends an
http
request. This action can support use cases where it is necessary to make a request to some service on a localhost:port.
Actions define what happens when the conditions for the trigger are met. In the action section of each workflow, there is a type
variable which holds the action type. The workflow types and the actions supported by each are listed below.
Actions | Supported by these triggers | ||||||||
---|---|---|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
| ||
| ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | |||
| ✓ | ✓ | ✓ | ||||||
| ✓ | ✓ | ✓ | ||||||
| ✓ | ✓ | ✓ | ✓ | |||||
| ✓ | ✓ | |||||||
| ✓ | ✓ | ✓ | ||||||
| ✓ | ✓ | |||||||
| ✓ | ||||||||
| ✓ | ||||||||
| ✓ |
Properties applicable to all actions
Properties can modify how an action executes or supply required information. Some properties are specific to certain actions. All actions support the following:
Name | Supported Values | Description |
---|---|---|
|
| The action will wait for the identified call attribute to resolve before executing. Some IVR integrations provide attached data asynchronously from call events; "waitForCallAttribute": { "path": "attachedData.someField" } ... |
Worfklow actions and properties
openCrmFlow
Opens a Salesforce Lightning Flow.
This action supports the following:
Name | Supported Values | Description |
---|---|---|
| string | Flow API name "name":"<Flow_API_name>" |
|
| Name of a Lightning Flow variable that is configured as "Available for input" in the variables settings. "args":[ { "name":"<flow_variable_name>", "type":"<variable_data_type>", "value":"<variable_name>" } ], ... |
Supports the args
property which holds input information for the Lightning Flow.
{
"id" : "<workflow_id>",
"type":"onCall",
"label":"Open Lightning Flow",
"roles":[
"admin",
"user"
],
"_teams":[
],
"callDirection":"Inbound",
"callType":"External",
"action":{
"type":"openCrmFlow",
"name":"Tenfold_Call_Initiation",
"args":[
{
"name":"input_UUID",
"type":"String",
"value":"{callAttachedData.UUI}"
},
{
"name":"input_CCID",
"type":"String",
"value":"{callAttachedData.UCID}"
}
]
},
"note":"CCC Open Lightning Flow ",
"display":"global"
}
NOTE: Opening a Lightning Flow requires additional configuration on the CRM side.
openCrmSearch
The action openCrmSearch
searches the CRM for information. Applicable to Salesforce and MS Dynamics.
This action supports the following:
Name | Supported Values | Description |
---|---|---|
| Variables which can be passed to the CRM to use as search parameters. "searchTemplate": "{<variable_name>}"
... |
Supports name
and value
parameters which can be used with the URL to construct a search query.
{
"id":"<workflow_id>",
"_teams":[
],
"roles":[
"user"
],
"type":"onCall",
"action":{
"type":"openCrmSearch",
"searchTemplate":"{callPhoneNumber}"
},
"match":"noMatch"
}
openCrmUrl
Opens a relative URL (only in Salesforce Lightning); uses the Salesforce API to open a specified view based on passed parameters.
This action supports the following:
Name | Supported Values | Description |
---|---|---|
| A URL relative path. | A URL inside Salesforce which receives the parameters sent from the workflow. "urlTemplate":"<path_to_CRM_URL>", "parameters":[ { "name": "<URL_parameter_name>", "value": "<URL_parameter_value>" } ], ... |
Supports name
and value
parameters which can be used with the URL to construct a query.
{
"id":"<workflow_id>",
"_teams":[
],
"roles":[
"user"
],
"action":"openCrmUrl",
"urlTemplate:":"/internal-salesforce-relative-url/{callPhoneNumber}/{recordType}",
"parameters":[
{
"name":"id",
"value":"{callId}"
},
{
"name":"module",
"value":"{recordType}"
}
]
}
openCustomUrl
The action openCustomUrl
opens a new URL in a new browser tab. Included parameters are converted into a query string.
This action supports the following:
Name | Supported Values | Description | ||
---|---|---|---|---|
|
| The URL you want to open. May contain variables from the Tenfold platform. "urlTemplate" : "https://www.google.com/search", "parameters" : [ { "name" : "q", "value" : "{recordName}" } ... | ||
DEPRECATED |
| Adds a delay to workflows which use called attached data; the data sometimes needs a little time to finish writing to the CRM, and this setting prevents the workflow from timing out. NOTE: This property is deprecated. It is mentioned here for historical reasons only. Use |
Supports name
and value
parameters which can be used with the URL to construct a query.
{
"id":"<workflow_id>",
"_teams":[
],
"roles":[
"user"
],
"type":"webLink",
"display":"contact",
"label" : "Look up name",
"action":{
"type":"openCustomUrl",
"urlTemplate":"https://www.google.com/search",
"parameters":[
{
"name":"q",
"value":"{recordName}"
}
]
}
}
openMatchingRecord
The action openMatchingRecord
opens a record which is in context in the CRM.
This action does not support any properties or variables.
{
"id":"<workflow_id>",
"_teams":[
],
"roles":[
"user"
],
"type":"resolveMultiMatch",
"action":{
"type":"openMatchingRecord"
}
}
openParentAccount
The action openParentAccount
opens the parent account of a record in context in the CRM.
This action does not support any properties or variables.
{
"id":"<workflow_id>",
"_teams":[
],
"roles":[
"user"
],
"type":"openParentAccount"
}
postCustomMessage
When the trigger conditions are met in Tenfold, Tenfold emits this custom search event which contains some information as a payload (example: caller phone number). The MS Dynamics CRM then catches the event and executes the logic contained in a custom script, which then performs some task. For example, it could redirect the user to a custom search page displaying search results with the payload in the search query.
NOTE: This action applies only to the embedded version of Tenfold for Microsoft Dynamics.
This action supports the following:
Name | Supported Values | Description |
---|---|---|
| Name of the Tenfold event. | |
| A key : value ( | Variable information to submit to the search page. |
In the following workflow, the action is triggered when an inbound call event occurs. This causes Tenfold to send the event tenfold:render-custom-search-page
to MS Dynamics, along with a payload containing the phone number of the call. When Dynamics receives the event, it uses the payload data to search for the call phone number.
{
"type":"onCall",
"callDirection":"Inbound",
"action":{
"type":"postCustomMessage",
"message":"tenfold:render-custom-search-page",
"data":{
"phoneNumber":"{callPhoneNumber}"
}
},
"id":"<workflow_id>",
"_teams":[
],
"roles":[
"user",
"admin"
]
}
NOTE: Additional configuration on the MS Dynamics side is required for postCustomMessage
. For specific details, contact Tenfold support.
runApex
Executes an Apex method from an Apex class that’s exposed in Salesforce.
Name | Supported Values | Description |
---|---|---|
| string | Apex class of the method to execute. |
| string | Method to execute. |
| Method parameters to pass. The string must include field value pairs and be formatted as a valid query string. |
{ "type" : "onCall", "onSingleMatch" : true, "action" : [ { "type" : "runApex", "className" : "ExampleClass", "methodName" : "ExampleMethod", "waitForAttachedData" : true, "params" : { "inputData" : { "category" : "{callAttachedData.category}", "intent" : "{callAttachedData.intent}", "description" : "{callDescription}" } } }, { "type" : "relateResource", "param" : "{returnValue.runApex.caseId}" } ], "callDirection" : "Inbound", },
sendRequest
Sends a REST request to Salesforce to a service on a local port.
Name | Supported Values | Description |
---|---|---|
|
| |
| string | |
| The body of the REST request. |
Variables
Parameters can obtain information about objects the CRM knows about such as a call, a record, or the current user and can be used as conditions for triggering a workflow. Weblinks use a separate set of parameters from other types of workflows. Tables listing the supported parameters for each are included below.
Supported weblink parameters
The Advanced Workflow Launcher feature supports the following parameters:
Supported JSON configurator workflow parameters
Parameters from the CRM environment can be passed between the workflow and the CRM framework.
These variables can be used in URLs, parameters and in searchTemplate
.
Other workflow properties
These properties are used with different triggers to define other aspects of the workflow or to define triggers. Some of these properties are required with certain types of triggers.
Name | Supported values | Description | Applicable to: |
---|---|---|---|
| number | The length of time to wait before running the action (in milliseconds). |
|
|
| Disables the default behavior of |
|
|
| Enables rendering web links within the Tenfold UI for:
Defaults to |
|
|
| An icon which displays next to a web link in the UI. |
|
|
| The match scenario that triggers the workflow. |
|
|
| Evaluates to |
|
Conditions
Conditions make complex workflows possible which include numerous dependencies. Conditions follow the order of mathematical operations, beginning with the most deeply nested statements and proceeding outward. When all conditions have been evaluated and condition
evaluates to true
, then the action proceeds. If condition
evaluates to false
, then the workflow does not run.
Conditions are supported by all triggers except for webLink
.
Name | Description | Values |
---|---|---|
| A JSON object made up of a key, an operator, and a value. It evaluates to either |
Example format of a child object: "child2" : { "key" : "{callAttachedData.city}", "operator" : "non-equal", "value" : "detroit" } NOTE: While it is not required to use "child" to name these objects, it is a best practice for clarity and supportability. |
| A JSON object which compares included child objects to produce a Boolean value. If |
|
| A property in the format of | A property in the format |
| A mathematical operator; used to compare |
|
| A value assigned to a key. | A value which is compared to |
| A logical operator. |
|
An example of a condition.
{
"id":"<workflow_id>",
"roles":[
"admin",
"user"
],
"_teams":[
"60d201b4aab4dc7af8667f5c"
],
"type":"onCall",
"callDirection":"Inbound",
"action":{
"type":"openCustomUrl",
"urlTemplate":"https://foo.com/{callAttachedData.TransferReason}?xx={callAttachedData.someIvrData}",
"waitForAttachedData":true,
"condition":{
"child1":{
"child1":{
"key":"{callAttachedData.TransferReason}",
"operator":"equal",
"value":"InternetPickup"
},
"logicalOp":"AND",
"child2":{
"key":"{callAttachedData.city}",
"operator":"non-equal",
"value":"lodz"
}
},
"logicalOp":"AND",
"child2":{
"child1":{
"key":"{callAttachedData.testData}",
"operator":"gt",
"value":5
},
"logicalOp":"OR",
"child2":{
"key":"{callAttachedData.someIvrData}",
"operator":"gte",
"value":10
}
}
}
}
}