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:
Table 1. Required trigger properties for all workflows
Name | Supported values | Description |
_teams | specific teams configured for the CRM | Teams assigned to the workflow.
"_teams":[<br>
<br>
],
|
action |
| Defines the resulting behavior when the trigger condition is met.
For more information, see Actions below.
"action": {<br>
"type": " <em><type></em> ",<br>
...<br>
}
|
id | generated string | Unique identifier of the workflow generated by Tenfold.
IMPORTANT: Do not change this value.
|
label | user-created string | User-friendly name identifying the workflow.
"label" : "Example Workflow Label",
|
roles | admin
user
other roles configured for the CRM
| User roles that can access the workflow.
"roles":[<br>
"user",<br>
"admin",<br>
...<br>
]
|
type |
| The kind of trigger used in the workflow.
For more information, see Workflow triggers below
|
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.
Table 2. Workflow triggers and the actions they support
Actions | Supported by these triggers |
|
|
|
|
|
|
|
webLink | onCall | onFindAgain | onRelatedResource | resolveMultiMatch | resolveNoMatch | onClickCreateRecord | onNoteSave |
|
openCustomUrl | ✓ | ✓ | ✓ |
| ✓ | ✓ | ✓ |
|
openMatchingRecord |
| ✓ |
|
| ✓ | ✓ |
|
|
openParentAccount |
| ✓ |
|
| ✓ | ✓ |
|
|
openCrmSearch |
| ✓ | ✓ |
| ✓ | ✓ |
|
|
openCrmFlow |
| ✓ |
|
|
| ✓ |
|
|
openCrmUrl |
| ✓ |
|
| ✓ | ✓ |
|
|
openRelatedResource |
| ✓ |
| ✓ |
|
|
|
|
postCustomMessage |
| ✓ |
|
|
|
|
|
|
runApex |
| ✓ |
|
|
|
|
|
|
sendRequest |
| ✓ |
|
|
|
|
|
|
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 |
waitForCallAttribute | path | The action will wait for the identified call attribute to resolve before executing.
Some IVR integrations provide attached data asynchronously from call events; waitForCallAttribute lets you programmatically execute the action on upon Tenfold receiving the attached data.
"waitForCallAttribute": {<br>
"path": "attachedData.someField"<br>
}<br>
...
|
Worfklow actions and properties
openCrmFlow
Opens a Salesforce Lightning Flow.
This action supports the following:
Name | Supported Values | Description |
name | string | Flow API name
"name":" <em><Flow_API_name></em> "
|
args | name = Flow variable name
type = the data type of the variable
value = the name of the variable which passes a value to the workflow
| Name of a Lightning Flow variable that is configured as "Available for input" in the variables settings.
"args":[<br>
{<br>
"name":" <em><flow_variable_name></em> ",<br>
"type":" <em><variable_data_type></em> ",<br>
"value":" <em><variable_name></em> "<br>
}<br>
],<br>
...
|
Supports the args
property which holds input information for the Lightning Flow.
Example 1. openCrmFlow
javascript:
{
"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 |
searchTemplate | Tenfold variables. | Variables which can be passed to the CRM to use as search parameters.
"searchTemplate": "{ <em><variable_name></em> }"<br>
...
|
Supports name
and value
parameters which can be used with the URL to construct a search query.
Example 2. openCrmSearch
javascript:
{
"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 |
urlTemplate | A URL relative path. | A URL inside Salesforce which receives the parameters sent from the workflow.
"urlTemplate":" <em><path_to_CRM_URL></em> ",<br>
"parameters":[<br>
{<br>
"name": " <em><URL_parameter_name></em> ",<br>
"value": " <em><URL_parameter_value></em> "<br>
}<br>
],<br>
...<br>
|
Supports name
and value
parameters which can be used with the URL to construct a query.
Example 3. openCrmUrl
javascript:
{
"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 |
urlTemplate | name and value parameters | The URL you want to open. May contain variables from the Tenfold platform.
"urlTemplate" : "https://www.google.com/search",<br>
"parameters" : [ <br>
{ <br>
"name" : "q",<br>
"value" : "{recordName}"<br>
}<br>
...
|
waitForAttachedData
DEPRECATED
| true | false | 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 waitForCallAttribute instead.
|
Supports name
and value
parameters which can be used with the URL to construct a query.
Example 4. openCustomUrl
javascript:
{
"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}"
}
]
}
}
<br>
openMatchingRecord
The action openMatchingRecord
opens a record which is in context in the CRM.
This action does not support any properties or variables.
Example 5. openMatchingRecord
javascript:
{
"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.
Example 6. openParentAccount
javascript:
{
"id":"<workflow_id>",
"_teams":[
],
"roles":[
"user"
],
"type":"openParentAccount"
}
openRelatedResource
Opens the target resource of the onRelatedResource
trigger in the CRM.
Example 7. openRelatedResource
javascript:
{
"type" : "onCall",
"match" : "singleMatch",
"action" : {
"type" : "openRelatedResource"
},
"callDirection" : "Inbound"
}
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 |
message |
| Name of the Tenfold event. |
data | A key : value ( <em><name></em> : <em><variable></em> ) pair where the value of a Tenfold variable is saved as the value of a named variable. | Variable information to submit to the search page. |
Example 8. postCustomMessage
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.
javascript:
{
"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 |
className | string | Apex class of the method to execute. |
methodName | string | Method to execute. |
params |
| Method parameters to pass. The string must include field value pairs and be formatted as a valid query string. |
Example 9. runApex
javascript:
{
"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 |
requestType | GET | POST |
|
urlTemplate | string |
|
requestBody |
| 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:
Table 3. Launcher parameters (standard) supported in webLinks. Additional variables configured in the Attached Data feature are made available on the Call object.
Object | Property | Description |
Call1 | Match count | Number of CRM matches returned from the CRM when searching by ANI. |
| subject | First 50 characters of the call description. |
| Description | Notes captured in the Tenfold UI. |
| Current Call Status | Current status of the call. For example, ringing, connected, hangup. |
| Start Time | Timestamp of the ringing event. |
| Connected Time | Timestamp of the connected event. |
| End Time | Timestamp of the hangup event. |
| Duration | Length of the call from ringing to hangup. |
| Talk Time Duration | Duration of the interaction from the connected event to the hangup event. |
| Direction | Direction of the call. For example, Inbound or Outbound. |
| Phone number | Phone number associated with the call. |
| Inbound Number | Deprecated |
| User Extension | Phone extension associated with the call. |
| User Device | Device associated with the call. Support varies by integration. |
| Created Date | Timestamp of when the call object was created in the Tenfold platform. |
| CRM Record Id | Unique identifier assigned by the CRM to the record in the CRM. |
| Platform PBX Call ID | Unique ID of the call within the telephony platform. Support varies by integration. |
| PBX Unique Call ID | Unique ID of the call within the telephony platform. Support varies by integration. |
| Is Queue | Boolean value indicating whether the call is a queue call. Support varies by integration. |
| Type | Type of call (example: Internal or External). |
| Is Transfer | Boolean value. Indicates if the call is a transfer call. Support varies by integration. |
| Is Conference | Boolean value. Indicates if the call is a conference call. Support varies by integration. |
| Is Internal | Boolean value. Indicates if the call is an internal call. Support varies by integration. |
| Recording link | Web link to a recorded version of a call. |
User | Name | Name of the logged in Tenfold user. |
| CRM Unique Id | Unique identifier assigned by the CRM to the logged in Tenfold user. |
| CRM Username | Unique username for the CRM user. |
| Username | The Tenfold username of the currently logged in Tenfold user. |
Organization | Company | Name of the logged in Tenfold user's company as defined in Tenfold Dashboard under Company Settings. |
| Locale | The locale of the currently logged in Tenfold user. |
| Timezone | Time zone of the logged in user as defined in Tenfold Dashboard under Company Settings. |
| Created At | Timestamp of when the user object was created in the Tenfold platform. |
1 The Call object is only available for webLinks for the Toolbar and "More Links" types.
Supported JSON configurator workflow parameters
Parameters from the CRM environment can be passed between the workflow and the CRM framework.
Table 4. Workflow variables supported in Manage Workflows (workflows other than webLink). Additional variables configured in the Attached Data feature are made available on the Call object.
Property | Description | Notes |
callId | Unique call ID within the Tenfold platform. |
|
callPhoneNumber | Phone number of the call. |
|
callDirection | Direction of the call (for example, Inbound or Outbound). | Supported values:
Outgoing
Inbound
|
callExtension | Extension of the call. |
|
callCrmRecordId | Unique identifier assigned by the CRM to the call record in the CRM. |
|
callStatus | The state of the call which triggers the workflow. | Supported values:
Hangup
In Limbo
Ringing
Connected
Held
Mute
|
callType |
| Supported values:
External
Internal
|
recordId | Unique identifier assigned by the CRM to the matched record from the CRM. For example, a contact, account, or lead. |
|
recordName | Name of the matched record from the CRM. For example, the name of the contact, account, or lead. |
|
recordEmail | Email address associated with the matched record from the CRM. |
|
recordPhone | Phone number associated with the matched record from the CRM. |
|
recordType | Type of CRM record for the matched record. For example, a contact, lead, or account. |
|
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.
Table 5. Other workflow properties
Name | Supported values | Description | Applicable to: |
delay | number | The length of time to wait before running the action (in milliseconds). | onCall |
disableDefaultBehavior | true | false | Disables the default behavior of onClickCreateRecord so that a new browser tab opens instead of a new create record form. | onClickCreateRecord |
display | contact
contactCard
global
historyElement
| Enables rendering web links within the Tenfold UI for:
- on contact cards (
contact )
- in global links (
global )
- in call history (
historyElement )
- on the call description card (
contactCard )
Defaults to global if display is not specified.
| webLink |
icon | *.ico file or a link to a *.png file | An icon which displays next to a web link in the UI. | webLink |
match | multiMatch
noMatch
singleMatch
| The match scenario that triggers the workflow. | onCall
webLink
|
onSingleMatch | true | false | Evaluates to true when there is only one match for a call from the beginning. | onCall |
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
.
Table 6. Workflow property conditions
Name | Description | Values |
child | A JSON object made up of a key, an operator, and a value. It evaluates to either true or false and can be compared to other child objects using Boolean operators. | <em><key></em> , <em><operator></em> , <em><value></em>
Example format of a child object:
"child2" : {<br>
"key" : "{callAttachedData.city}",<br>
"operator" : "non-equal",<br>
"value" : "detroit"<br>
}
NOTE: While it is not required to use "child" to name these objects, it is a best practice for clarity and supportability.
|
condition | A JSON object which compares included child objects to produce a Boolean value.
If condition evaluates to true , then the worfklow proceeds. If it evaluates to false , then the workflow stops.
| child
logicalOp
|
key | A property in the format of <em><object></em> . <em><property></em> which represents a value. | A property in the format <em><object></em> . <em><property></em> which is compared with the value assigned to value . |
operator | A mathematical operator; used to compare key and value . | gt = greater than
gte = greater than or equal to
equal = equal to
non-equal = not equal to
lt = less than
lte = Iess than or equal to
isNil = is null or undefined
|
value | A value assigned to a key. | A value which is compared to key using a mathematical operator to produce a Boolean value. |
logicalOp | A logical operator. | AND
OR
|
Example 11. Logical and mathematical operators in a workflow
An example of a condition.
javascript:
{
"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
}
}
}
}
}
<br>