Sales Engagement Actions
Sales Engagement must be set up in your org. The user must have permissions to use cadences.
Supported REST HTTP Methods
URIs:
- Assign Target To Cadence: /services/data/vXX.X/actions/standard/assignTargetToSalesCadence
- Remove Target From Cadence: /services/data/vXX.X/actions/standard/removeTargetFromSalesCadence
- Pause Cadence Tracker: /services/data/vXX.X/actions/standard/pauseSalesCadenceTracker
- Resume Cadence Tracker: /services/data/vXX.X/actions/standard/resumeSalesCadenceTracker
- Change Cadence Target Assignee: /services/data/vXX.X/actions/standard/changeSalesCadenceTargetAssignee
- Modify Cadence Tracker Attributes: /services/data/vXX.X/actions/standard/modifyCadenceTrackerAttributes
- Send Cadence Event: /services/data/vXX.X/actions/standard/sendSalesCadenceEvent
- Select Template For Cadence Step Tracker: /services/data/vXX.X/actions/standard/selectTemplateForSalesCadenceStepTracker
Formats: JSON, XML
HTTP Methods: GET, HEAD, POST
Authentication: Authorization: Bearer token
Other Information: Error Response Types
Assign Target to Cadence
Available in API version 45.0.
URI: /services/data/vXX.X/actions/standard/assignTargetToSalesCadence
| Input | Type | Description |
|---|---|---|
| salesCadenceNameOrId | string | Required. The name or ID of the cadence. |
| startStepNameOrId | string | The name or ID of the cadence step where the target starts in the cadence. |
| targetId | ID | Required. The ID of the contact, a lead, or person account to add to the cadence. |
| userId | ID | The ID of the user designated as the target assignee. The target assignee is the sales rep who performs the cadence steps for the target. |
| relatedToId | ID | The ID of the target's related opportunity or invoice. This field is only available when Relate Opportunities to Cadences or Use Cadences for Collections is turned on in Sales Engagement Setup. |
Sample Input
The following code sample adds a target to a cadence:
1{
2 "inputs" : [ {
3 "salesCadenceNameOrId" : "77Cxx0000004CXEEA2",
4 "targetId" : "00Qxx000002TRI2EAO"
5 }]
6}Remove Target from Cadence
Available in API version 45.0.
URI: /services/data/vXX.X/actions/standard/removeTargetFromSalesCadence
| Input | Type | Description |
|---|---|---|
| targetId | ID | Required if actionCadenceTrackerId is null. The ID of the contact, a lead, or person account to remove from the cadence. |
| actionCadenceTrackerId | ID | Required if targetId is null. The ID of the action cadence tracker to remove from the cadence. |
| completionReasonCode | string | Required. The completion reason code indicates how the target competed the cadence. The only valid value is ManuallyRemoved. |
| completionDisposition | string | The disposition of the completed cadence tracker. Valid values are: Success, Customer Engaged, Customer Connected, Contact Later, No Response, Not Interested, Disqualified, Bad Data, or Duplicate. |
| relatedToId | ID | The ID of the target's related opportunity or invoice. This field is only available when Relate Opportunities to Cadences or Use Cadences for Collections is turned on in Sales Engagement Setup. |
| relatedToAttributionType | string | The attribution type of the target's related opportunity or invoice. This field is only available when Relate Opportunities to Cadences or Use Cadences for Collections is turned on in Sales Engagement Setup. Valid values are: Activation (valid for both opportunities and invoices), Maturation (valid for opportunities), or Collected (valid for invoices). |
| shouldApplyUserContext | boolean | Indicates whether to remove only action cadence trackers owned by the running user (true) or not (false). |
Sample Input
The following code sample removes a target from a cadence:
1{
2 "inputs" : [ {
3 "completionReasonCode" : "ManuallyRemoved",
4 "targetId" : "00Qxx000002TRI2EAO"
5 }]
6}Pause Cadence Tracker
Pause a target in its cadence. Available in API version 50.0.
URI: /services/data/vXX.X/actions/standard/pauseSalesCadenceTracker
| Input | Type | Description |
|---|---|---|
| targetId | ID | Required. The ID of the contact, a lead, or person account to pause. |
| resumeTime | String | Optional. The scheduled end time for the pause. |
Sample Input
The following code sample pauses a target in its cadence:
1{
2 "inputs" : [ {
3 "targetId" : "00Qxx000002TRI2EAO", "resumeTime" : "2021-06-15T05:30:00:521917Z"
4 }]
5}Resume Cadence Tracker
Resume a target in its cadence. Available in API version 50.0.
URI: /services/data/vXX.X/actions/standard/resumeSalesCadenceTracker
| Input | Type | Description |
|---|---|---|
| targetId | ID | Required. The ID of the contact, a lead, or person account to pause. |
Sample Input
The following code sample resumes a target in its cadence:
1{
2 "inputs" : [ {
3 "targetId" : "00Qxx000002TRI2EAO"
4 }]
5}Change Cadence Target Assignee
Available in API version 50.0.
URI: /services/data/vXX.X/actions/standard/changeSalesCadenceTargetAssignee
| Input | Type | Description |
|---|---|---|
| targetId | ID | Required. The ID of the contact, a lead, or person account to pause. |
| userId | ID | The ID of the user designated as the target assignee. The target assignee is the sales rep who performs the cadence steps for the target. |
Sample Input
The following code changes a target's assignee:
1{
2 "inputs" : [ {
3 "targetId" : "00Qxx000002TRI2EAO",
4 "userId" : "005R0000000eg3zIAA",
5 }]
6}Modify Cadence Tracker Attributes
Available in API version 51.0.
URI: /services/data/vXX.X/actions/standard/modifyCadenceTrackerAttributes
| Input | Type | Description |
|---|---|---|
| actionCadenceTrackerId | ID | Required. The ID of the cadence tracker to modify. |
| completionDisposition | string | The disposition of the completed cadence tracker. Valid values are: Success, Customer Engaged, Customer Connected, Contact Later, No Response, Not Interested, Disqualified, Bad Data, or Duplicate. |
| relatedToId | ID | The ID of the target's related opportunity or invoice. This field is only available when Relate Opportunities to Cadences or Use Cadences for Collections is turned on in Sales Engagement Setup. |
| relatedToAttributionType | string | The attribution type of the target's related opportunity or invoice. This field is only available when Relate Opportunities to Cadences or Use Cadences for Collections is turned on in Sales Engagement Setup. Valid values are: Activation (valid for both opportunities and invoices), Maturation (valid for opportunities), or Collected (valid for invoices). |
Sample Input
The following code modifies a cadence tracker with a Completion Disposition of "Customer Engaged", a related opportunity, and an Attribution Type of "Activation":
1{
2 "inputs" : [ {
3 "actionCadenceTrackerId" : "0qBR00000005CXvMAM",
4 "completionDisposition" : "Customer Engaged",
5 "relatedToId" : "006R0000003DNpJIAW",
6 "relatedToAttributionType" : "Activation"
7 }]
8}Send Cadence Event
Available in API version 52.0.
Send an event to a cadence, such as skipping or manually completing a step.
URI: /services/data/vXX.X/actions/standard/sendSalesCadenceEvent
| Input | Type | Description |
|---|---|---|
| recordId | ID | Required. The ID of the cadence step tracker to send the event to. |
| eventType | string | Required. The type of event to send. Valid values are: Skip or ManualComplete. |
Sample Input
The following code sends a Manual Complete event to a cadence step tracker:
1{
2 "inputs" : [ {
3 "recordId" : "8HFR00000005WyqOAE",
4 "eventType" : "Manual Complete"
5 }]
6}Select Template for Cadence Step Tracker
Retrieve the email template or call script from a cadence step or cadence step variant (if variant testing) to be used while executing a step for a particular target. Available in API version 53.0.
URI: /services/data/vXX.X/actions/standard/selectTemplateForSalesCadenceStepTracker
| Input | Type | Description |
|---|---|---|
| stepTrackerId | ID | Required. The ID of the cadence step tracker. |
| Output | Type | Description |
|---|---|---|
| output | JSON | The email template or call script ID and its related split percentage. |
| error | string | The error message returned when the action fails. |
Sample Input
The following code retrieves the email template or call script for two cadence steps:
1{"inputs": [ {
2 "stepTrackerId" : "8HFR00000006LE8OAM"
3 },
4 {
5 "stepTrackerId" : "8HFR00000006LEDOA2"
6 }]
7}Sample Output
The following code sample illustrates a response after one success and one failure.
1[ {
2 "actionName" : "selectTemplateForSalesCadenceStepTracker",
3 "errors" : null,
4 "isSuccess" : true,
5 "outputValues" : {
6 "output" : {
7 "SplitPercentage" : 10.0,
8 "TemplateId" : "00XR0000000UOtZMAW"
9 }
10 }
11}, {
12 "actionName" : "selectTemplateForSalesCadenceStepTracker",
13 "errors" : [ {
14 "statusCode" : "UNKNOWN_EXCEPTION",
15 "message" : "No template was found.",
16 "fields" : [ ]
17 } ],
18 "isSuccess" : false,
19 "outputValues" : {
20 "error" : "No template was found."
21 }
22} ]Error Response Types
Sales Engagement actions can respond with success or errors.
If any type of error occurs with an action, the isSuccess field is false.
This example illustrates a success response for the Assign Target To Cadence action.
1[ {
2 "actionName" : "assignTargetToSalesCadence",
3 "isSuccess" : true
4 } ]This example illustrates an error caused by sending invalid input values to the Assign Target To Cadence action.
1[ {
2 "actionName" : "assignTargetToSalesCadence",
3 "errors" : [ {
4 "statusCode" : "UNKNOWN_EXCEPTION",
5 "message" : "The object needs to be a valid cadence entity.",
6 "fields" : [ ]
7 } ],
8 "isSuccess" : false,
9 "outputValues" : {
10 "error" : "The object needs to be a valid cadence entity."
11 }
12 } ]