Action API
Action API
Developer Guide
Version 61.0, Summer ’24
names and marks. Other marks appearing herein may be trademarks of their respective owners.
CONTENTS
Use actions to add more functionality to your applications. Choose from standard actions, such as posting to Chatter or sending email,
or create actions based on your company’s needs.
For example, you can:
• Add features and functionality to your existing Lightning Platform tools.
• Build dynamic modules for Lightning Platform development into your enterprise integration tools.
• Build specialized development tools for a specific application or service.
You can batch actions to improve performance in API version 35.0 and later.
Overview
Actions allow you to build custom development tools for Lightning Platform applications.
Actions are about “getting things done” in Salesforce. They encapsulate a piece of logic that allows a user to perform some work, such
as sending email. When an action runs, it saves changes in your organization by updating the database.
Actions are easy to discover and use, and also easy to understand and implement. Every button and link in Salesforce can be considered
an action. A consistent Actions API and framework support the creation and distributed use of actions throughout Salesforce. Actions
are available in the REST API.
The types of actions are:
Type Description
InvocableAction Invocable actions can be invoked from a common endpoint in the REST API. They provide “describe”
support – a programmatic mechanism to learn about all invocable actions on the platform.
There are two types of invocable actions.
Standard action
A standard action is ready to use right away. The work it performs is predefined, along with its
inputs and outputs, and they’re available in every organization.
Custom action
You create custom actions because these actions require a definition. For example, to use an
Apex action, create the Apex class method for the action.
QuickAction Quick Actions, formerly known as Publisher Actions, use page layouts to make it easy for administrators
to configure an action to create or update a record. The API always works with an sObject.
StandardButton Standard buttons are URLs allowing users to either go to another page (for example, the Edit page)
or accomplish some task (for example, lead conversion).
CustomButton Custom buttons are URLs that an administrator can specify and when included on a page and clicked,
will redirect a user to that URL.
To call an action from a flow, use FlowActionCall, as described in the Metadata API Developer’s Guide.
1
Introducing Actions Invoking Actions
The If-Modified-Since header can be used with actions, with a date format of EEE, dd MMM yyyy HH:mm:ss z.
When this header is used, if the action metadata has not changed since the provided date, a 304 Not Modified status code is
returned, with no response body.
Invoking Actions
Most actions are invoked using the same JSON body format. The top-level JSON key name must be inputs.
Note: Invoke Salesforce Order Management actions with the corresponding Connect REST API resources or Apex ConnectApi
methods, not the standard endpoints.
The following example request shows two Chatter posts made with a single Post to Chatter action.
POST /services/data/vXX.X/actions/standard/chatterPost
{ "inputs" :
[
{
"subjectNameOrId" : "jsmith@salesforce.com",
"type" : "user",
"text" : "first chatter post!"
},
{
"subjectNameOrId" : "hsmith@salesforce.com",
"type" : "user",
"text" : "second chatter post!"
}
]
}
Standard actions return their name in actionName. The value of actionName varies for custom actions.
2
Introducing Actions Available Actions
Available Actions
The available actions are:
Action Description
Apex Actions Invoke Apex methods annotated with @InvocableMethod and include
custom parameters with @InvocableVariable.
Asset Lifecycle Actions Create or update an asset from an order or order item. Additionally, initiate the
amendment, cancellation, or renewal of an asset.
Apply Case Classification Recommendations Applies Einstein’s recommended values for fields on a given case record, and
returns the updated case record.
Batch Management Actions Manage your Batch Management jobs by using invocable actions.
B2B Commerce Checkout Flow Actions Manage B2B Commerce integrations and store checkout flow.
Commerce Checkout Flow Actions Manage Commerce integrations and store checkout flow.
Create Service Report Actions Creates a service report for a service appointment, work order, or work order line
item.
Custom Notification Actions Send custom notifications to recipients via desktop or mobile channels.
Decision Table Actions Invokes a decision table or refreshes business rules for an active decision table.
Data Processing Engine Actions Runs an active Data Processing Engine definition.
Dynamic Revenue Orchestrator Actions Submit an order to Dynamic Revenue Orchestrator (DRO) for fulfillment.
Email Alert Actions Send emails from flows by reusing already-configured workflow email alerts.
Einstein Bots Actions Search for knowledge articles based on data category and data category groups.
Einstein Visit Recommendation Action Save visit and task recommendation decisions.
Initiate Natural Language Processing Action Create a record for the AI natural language processing result and initiate text
processing by using the service specified in the related record.
3
Introducing Actions Available Actions
Action Description
Financial Services Cloud Actions Create person accounts, financial accounts, and related records from a residential
loan application for Financial Services Cloud.
Flow Actions Invoke an active autolaunched flow or active invocable process that exists in the
current org.
Fundraising for Nonprofit Cloud Actions Manage gift commitments, gift commitment schedules, gift default schedules,
gift transaction designations, and gift entries for Fundraising.
Generate Order Summary Action Generate a URL so that authenticated and guest users can access order details.
Media Integration Procedure Action Call an Integration Procedure from a Salesforce Flow to process media content.
Prompt Template Actions Generate a response based on the large language model (LLM) response for the
specified prompt template and inputs.
Generate Work Orders Actions Generates work orders from a maintenance plan.
Quote and Order Capture Actions Create an order from a quote record.
Live Message Notification Actions Use messaging templates to send notifications to users over communication
channels, such as SMS, WhatsApp, and Facebook Messenger, when certain
conditions are met.
Loyalty Management Actions Create and manage loyalty programs for your organization by using the standard
and custom invocable actions.
Manufacturing Cloud Actions Automate business processes related to account forecast, sales agreements, and
account manager target values.
Net Zero Cloud Actions Track and manage environmental impact for precise calculation and analysis of
carbon emissions.
Apply Payment Action Applies a payment record to an invoice header by creating a PaymentLineInvoice
record with a type of Applied.
Payment Sale Action Capture a payment without any prior authorization and create a payment record.
The payment sale transaction consists of an authorize request and a capture request
made to the payment gateway at the same time. This way, the merchant can
request funds to be transferred to the merchant account in a single command,
with no further action required.
PlatformAction PlatformAction is a virtual read-only object. It enables you to query for actions
displayed in the UI, given a user, a context, device format, and a record ID. Examples
include standard and custom buttons, quick actions, and productivity actions.
4
Introducing Actions Available Actions
Action Description
Preview Cart to Exchange Order Generate preview details of an exchange order for specified order summary,
exchange cart ID, and reference record ID.
Post to Chatter Actions Post a message to a specified feed, such as to a Chatter group or a case record.
The message can contain mentions and topics, but only text posts are supported.
Public Sector Solutions Actions Create a benefit disbursement for an eligible benefit assignment or run a Data
Processing Engine definition to process an asynchronous batch job.
Quick Actions Use a quick action to create a task or a case. Invoke existing quick actions, both
global and object-specific, to create records, update records, or log calls.
Rebate Management Actions Create and manage rebate programs and manage payouts and transactions by
using the Rebate Management invocable actions.
Referral Marketing Actions Create and manage referral programs for your organization.
Refresh Metric Actions Update a metric’s Current Value field if it’s linked to a summary field in a Salesforce
report. The refresh runs as the metric owner.
Salesforce Omnichannel Inventory Actions Manage inventory availability and provide omnichannel commerce experiences
in flows with Salesforce Omnichannel Inventory.
Salesforce Order Management Actions Manage, fulfill, and service orders in flows with Salesforce Order Management.
Salesforce Pricing Actions Invoke the Pricing Connect API by providing the context, pricing procedure, and
price waterfall details. Additionally, you can also specify the pricing data and details
of a context to invoke the Pricing Connect API.
Send Notification Actions Call a notification type to send. Each Send Notification action corresponds to an
available notification type.
Session-Based Permission Set Actions Activate or deactivate a session-based permission set for the current user’s API
session.
Simple Email Actions Send an email where you specify the subject, body, and recipients.
Submit for Approval Actions Submit a Salesforce record for approval if an approval process is defined for the
current entity.
Submit Exchange Order Submits an exchange order based on the specified information.
Survey Invitation Actions Send email survey invitations to leads, contacts, and users in your org based on
an action. Also, send customized notifications to users about important events or
updates to the records that they’re working on.
5
CHAPTER 2 Action Objects
This is the reference for quick actions and dynamic actions. Invocable actions are also known as dynamic actions.
Apex Actions
Invoke Apex methods annotated with @InvocableMethod and include custom parameters with @InvocableVariable.
This object is available in API version 33.0 and later.
"inputs": [
{
"objects": {
"attributes" : {
"type" : "Account"
},
"Name": "Acme"
}
},
{
6
Action Objects Apex Actions
"objects": {
"attributes" : {
"type" : "Account"
},
"Name": "Global Media"
}
}
]
}
return accountIds;
}
}
Note: The resource is the name of the Apex class, not the Apex method. In this example, the resource is
/ActionTestWithSObject, not /getAccountNames.
Notes
• Describe and invoke for an Apex action respect the profile access for the Apex class. If you don’t have access, an error is issued.
• If you add an Apex action to a flow, and then remove the @InvocableMethod annotation from the Apex class, you get a
runtime error in the flow.
• If an Apex action is used in a flow, packageable components that reference these elements aren’t automatically included in the
package. For example, if you use an email alert, you must manually add the email template that is used by that email alert. To
deploy the package successfully, manually add those referenced components to the package.
• An Apex invocable action can be declared public or global in a managed package. However, that action doesn’t appear
in Flow Builder’s list of available Apex actions. Flows within the same managed package can still refer to these invocable actions.
Global Apex invocable actions in a managed package can be used in flows outside the managed package, anywhere in the
organization, and appear in Flow Builder’s list of available Apex actions.
Inputs
Supply input values that correspond to the Apex action.
• A POST request body must use the JSON format specified in Invoking Actions.
7
Action Objects Assign Enablement Program
• Apex methods annotated with @InvocableMethod must take a List as an input and return a List or Null. For more information,
see @InvocableMethod Annotation in the Apex Developer Guide.
• Only the following primitive types are supported as inputs in a POST request body:
– Blob
– Boolean
– Date
– Datetime
– Decimal
– Double
– ID
– Integer
– Long
– String
– Time
• Concrete types inherited from the sObject. In the previous example, the inherited concrete type is Account.
• A user-defined type, containing variables of the supported types and with the InvocableVariable annotation. To implement
your data type, create a custom global or public Apex class. The class must contain at least one member variable with the invocable
variable annotation.
Outputs
The Apex InvocableMethod determines the output values.
SEE ALSO:
Flow Actions
Apex Developer Guide: InvocableMethod Annotation
8
Action Objects Apply Case Classification Recommendations
Authentication
Authorization: Bearer token
Inputs
Input Details
assigneeId Type
ID
Description
Required. The ID of the Enablement user to assign to the program.
notificationUserId Type
ID
Description
Required. The ID of the Salesforce user to notify when the program assignment is complete.
programId Type
ID
Description
Required. The ID of the program being assigned.
startDate Type
ID
Description
Required. The date that assignees can access the program. Dates for Saturdays and Sundays are
automatically set to the following Monday.
Outputs
None
SEE ALSO:
Salesforce Help: Automating Enablement Program Assignment
9
Action Objects B2B Commerce Checkout Flow Actions
Inputs
Input Details
caseId Type
ID
Description
Required. The ID of a case.
Outputs
Input Details
caseSObject Type
SObject
Description
A case SObject with recommendations applied.
10
Action Objects Commerce Checkout Flow Actions
11
Action Objects Create Service Document Actions
Inputs
Input Details
recordId Type
string
Description
Required. The record ID of a work order, work order line item, or service appointment used to
generate the service document. Create a Lightning web component to use a Custom Property
Editor (CPE) to validate the recordId to avoid deployment issues.
templateId Type
string
Description
Required, if the recordId is a work order, work order line item, or service appointment. The
ID of the service document template to use when generating the document.
locale Type
string
Description
Optional. Specifies the language for service document localization. The default is the user’s
language. Used when generating a document in a different language from the user’s language.
See a list of supported languages in Supported Languages.
You can only input language for locale. For example, use es for Spanish. Using language and
country, for example es_ES for Spanish associated with Spain, results in error.
title Type
string
Description
Optional. The value used to name the document that’s generated and saved.
documentType Type
string
12
Action Objects Create Service Document Actions
Input Details
Description
Optional. The value that allows people to generate different types of documents with the service.
Defaults to serviceDocument.
pdfReportId Type
string
Description
Optional value corresponding to recordId and templateId. However, the value is required
if you aren’t generating the document from the default pdfRecord record. For the Document
Builder feature, this is a service report ID for a report that is in progress, queued, or failed. It must
be used to generate a service document from failed state.
Outputs
Inputs Details
pdfReportId Type
string
Description
Required. The report’s record ID that holds the generated PDF. For service documents, the
pdfReportId is a service report, and the record is created if the work order, work order line
item, or service appointment is passed as the recordId.
Usage
Sample Input
The following code sample generates a PDF of a service document with a specific recordId and templateId:
{
"inputs":[
"recordId": "08pOG00000023anYAA",
"templateId": "0M0OG0000005Na40AE",
"locale": "en_US",
13
Action Objects Create Service Report Actions
Inputs
Input Details
entityId Type
reference
Description
Required. The ID of the service appointment, work order, or work order line item that the service
report is created for.
signatures Type
string
Description
Optional. A list of JSON definitions for a digital signature.
• data—(Required) The base64 code for an image.
• contentType—(Required)The file type of the signature.
• signatureType—(Required) The role of the person signing; for example, “Customer.” Salesforce
admin defines Signature Type picklist values ahead of time. Each signature block must use
a different signature type, and the signature types you define in your call must match the
service report template’s signature types.
• name—The signature block title. This value appears on the generated service report.
• place—The place of signing. This value appears on the generated service report.
14
Action Objects Custom Notification Actions
Input Details
• signedBy—The name of the person signing. This value appears on the generated service
report.
• signedDate—The date of signing. This value appears on the generated service report.
templateId Type
reference
Description
Required. The ID of the standard or custom service report template that is used to create the
service report.
Usage
Sample Input
The following code sample creates a service report with two signatures by making an Apex callout to the createServiceReport
action REST API resource.
{
"inputs" : [ {
"entityId" : "0WOxx000000001E",
"signatures" : [
{"data":"Base64 code for the captured signature image",
"contentType":"image/png",
"name":"Customer Signature",
"signatureType":"Customer",
"place":"San Francisco",
"signedBy":"John Doe",
"signedDate":"Thu Jul 13 22:34:43 GMT 2017"
},
{"data":"Base64 code for the captured signature image",
"contentType":"image/png",
"name":"Technician Signature",
"signatureType":"Technician"
}],
"templateId" : "0SLR00000004DBFOA2"
} ]
}
15
Action Objects Custom Notification Actions
Important: In orgs created in Winter ’21 or later, the Send Custom Notifications user permission is required to trigger the Send
Custom Notification action in flows that run in user context, REST API calls, and Apex callouts.
The Send Custom Notifications user permission isn’t required to trigger the Send Custom Notification action in processes or flows
that run in system context.
Inputs
Input Details
customNotifTypeId Type
reference
Description
Required. The ID of the Custom Notification Type being used for the notification.
recipientIds Type
reference
Description
Required. The ID of the recipient or recipient type of the notification. Valid recipient or recipient
type values are:
• UserId — The notification is sent to this user, if this user is active.
• AccountId — The notification is sent to all active users who are members of this account’s
Account Team.
This recipient type is valid if account teams are enabled for your org.
• OpportunityId — The notification is sent to all active users who are members of this
opportunity’s Opportunity Team.
This recipient type is valid if team selling is enabled for your org.
• GroupId — The notification is sent to all active users who are members of this group.
• QueueId — The notification is sent to all active users who are members of this queue.
Values can be combined in a list up to the maximum of 500 values.
16
Action Objects Custom Notification Actions
Input Details
senderId Type
reference
Description
Optional. The User ID of the sender of the notification.
title Type
string
Description
Required. The title of the notification, as seen by recipients. Maximum characters: 250.
The content of mobile push notifications depends on the Display full content push notifications
setting.
body Type
string
Description
Required. The body of the notification, as seen by recipients. Maximum characters: 750.
The content of mobile push notifications depends on the Display full content push notifications
setting.
targetId Type
reference
Description
Optional. The Record ID for the target record of the notification.
You must specify either a targetID or a targetPageRef.
targetPageRef Type
string
Description
Optional. The PageReference for the navigation target of the notification.
To see how to specify the target using JSON, see pageReference.
You must specify either a targetID or a targetPageRef.
Usage
GET
The following example shows how to get information about the custom notification action type:
curl --include --request GET \
--header "Authorization: Authorization: Bearer 00DR...xyz" \
--header "Content-Type: application/json" \
"https://instance.salesforce.com/services/data/v46.0/actions/standard/customNotificationAction"
17
Action Objects Email Alert Actions
POST
The following example shows how to create a custom notification action:
curl --include --request POST \
--header "Authorization: Authorization: Bearer 00DR...xyz" \
--header "Content-Type: application/json" \
--data '{ "inputs" :
[
{
"customNotifTypeId" : "0MLR0000000008eOAA",
"recipientIds" : ["005R0000000LSqtIAG"],
"title" : "Custom Notification",
"body" : "This is a custom notification.",
"targetId" : "001R0000003fSUDIA2"
}
]
}' \
"https://instance.salesforce.com/services/data/v46.0/actions/standard/customNotificationAction"
18
Action Objects Einstein Bots Actions
HTTP Methods
GET, HEAD, POST
Authentication
Authorization: Bearer token
Inputs
The email alert action uses the record specified by SObjectRowId to get the information it needs. For example, if a Case was specified
for the action, the action could retrieve the email address and recipient’s name from the Case object’s SuppliedEmail and
SuppliedName fields, respectively.
Input Details
SObjectRowId Type
ID
Description
Required. The ID of a record such as an Account.
Outputs
None.
19
Action Objects Get Data Category Groups
Inputs
Input Details
dataCategoryGroupName Type
string
Description
The API name of the data category group.
dataCategoryName Type
string
Description
The API name of the data category.
Outputs
Output Details
dataCategoryDetailsOutput Type
Apex
Description
An Apex knowledge_bot__DataCategoryDetailsOutput record that contains the labels and API
names for the data category and its child categories.
20
Action Objects Search Knowledge Articles
Inputs
None
Outputs
Output Details
dataCategoryGroupInfo Type
Apex
Description
An Apex knowledge_bot__DataCategoryGroupInfo record that contains the labels and API
names of the data category groups visible to the current user.
Inputs
Input Details
searchText Type
string
Description
Search terms to be used in the knowledge article search.
languageCode Type
string
Description
The language code to be used in a knowledge article search. Valid values are language codes
for fully supported languages.
21
Action Objects Flow Actions
Input Details
dataCategoryGroupName Type
string
Description
The API name of the data category group to be used in the knowledge article search.
dataCategoryName Type
string
Description
The API name of the data category to be used in the knowledge article search.
resultsLimit Type
integer
Description
Optional. The maximum number of knowledge articles to return. Valid values are from 1 through
2000. By default, the maximum is 2000.
Outputs
Output Details
knoweldgeArticlesList Type
Apex
Description
An Apex knowledge_bot__ArticlesList record that contains information about the knowledge
articles that were returned.
Flow Actions
Invoke an active autolaunched flow that exists in the current org.
For more information about creating flows and processes, see Build a Flow.
This object is available for autolaunched flows in API version 32.0 and later.
22
Action Objects Flow Actions
Formats
JSON, XML
HTTP Methods
GET, HEAD, POST
Authentication
Authorization: Bearer token
Inputs
Input values vary according to the input variables specified for each flow. For autolaunched flows, the input values vary according to
the input variables in that flow.
Outputs
The response to an invocation includes Flow__InterviewStatus and any output variables defined in the flow.
Output Details
Flow__InterviewStatus Type
picklist
Description
The status of the flow interview. Valid values are:
• Created
• Started
• Finished
• Error
• Waiting
SEE ALSO:
Apex Developer Guide : InvocableMethod Annotation
23
Action Objects Generate Order Summary Action
Inputs
Input Details
orderSummaryId Type
ID
Description
Optional. The ID of the order summary to generate a URL for.
orderNumber Type
string
Description
Optional. The ID of the Salesforce payment gateway record that represents the external payment
gateway used for processing the sale request.
webStoreId Type
ID
Description
Required. The order number of the order summary to generate a URL for.
Outputs
Output Details
url Type
string
24
Action Objects Generate Work Orders Actions
Output Details
Description
The URL generated by the action that links to the order summary.
Inputs
Input Details
recordId Type
reference
Description
The ID of the maintenance plan from which you want to generate work orders.
25
Action Objects Get Assessment Response Summary
Inputs
Input Details
assessmentId Type
ID
Description
Required. The ID of the assessment record for which to summarize responses.
Outputs
Output Details
assessmentResponseSummary Type
string
Description
A JSON string containing the summary assessment question texts and responses for the specified
assessment record. The response summary structure follows the structure of the OmniScript.
Usage
Sample Input
When exposing the Get Assessment Response Summary invocable action in a REST API, you can use the following format to pass
input, which includes the assessmentId and its value.
{
"inputs" : [ {"assessmentId" : "0U3RO00000005FN0AY"} ]
}
26
Action Objects Get Assessment Response Summary
Sample Output
In this example, the first line indicates the OmniScript type, subtype, and language. For each step, there are multiple questions that
appear in the OmniScript. You can use this information in a downstream process, such as generation of PDF document using Docgen
capability.
"KYC_Individual_English": {
"Step1": {
"label": "Identity Details",
"value": {
"LC_Survey_Question_2": {
"label": "Full Name",
"value": "Joe Smith"
},
"DateofBirth_m": {
"label": "Date of Birth",
"value": "Thu Jul 27 00:00:00 GMT 2000"
},
"Gender_m": {
"label": "Gender",
"value": "Female"
},
"EmailAddress_m": {
"label": "Email Address",
"value": "Joe.Smith@company.com"
},
"PAN": {
"label": "PAN",
"value": "QWEASDZXC"
}
}
},
"Step2": {
"label": "Address Details",
"value": {
"Address_CorrespondenceAdd_Corporate": {
"label": "Address of Correspondence",
"value": "100 Some St, San Francisco, CA 12345, United States"
},
"Address_ContactDetails_Corporate": {
"label": "Telephone/Mobile",
"value": "1616111233"
},
"Alternate_Contact": {
"label": "Alternate Mobile Number",
"value": "1911212123"
}
}
},
"Step3": {
"label": "Account Declaration",
"value": {
"Account_declaration": {
"label": "I declare that I have following deposit accounts with your/
other bank's branches :",
27
Action Objects Get Assessment Response Summary
"value": [
{
"Bank": {
"label": "Bank",
"value": "Acme1"
},
"Branch": {
"label": "Branch",
"value": "Mission St"
},
"Type_of_Account": {
"label": "Type of Account",
"value": "Checking"
},
"Account_Number": {
"label": "Account Number",
"value": "12345678"
}
},
{
"Bank": {
"label": "Bank",
"value": "Acme2"
},
"Branch": {
"label": "Branch",
"value": "Mission St"
},
"Type_of_Account": {
"label": "Type of Account",
"value": "Savings"
},
"Account_Number": {
"label": "Account Number",
"value": "1234567890"
}
}
]
}
}
},
"Step4": {
"label": "Declaration",
"value": {
"Declaration_m": {
"label": "The customer declares and certifies that the information in this
form is true and correct. Any pre-filled sections of this form must be reviewed prior
to signing and submitting, to ensure the information accurately conveys the new
account details.",
"value": "true"
}
}
}
28
Action Objects Knowledge Actions
}
}
Knowledge Actions
Manage your Knowledge articles using invocable actions.
Important: Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain
terms to avoid any effect on customer implementations.
The Assign and Publish actions are available in API version 44.0 and later. All the other actions are available in API version 45.0 and later.
Lightning Knowledge must be set up in your org. The user must have permissions to manage articles.
You can use multiple inputs to an invocable action. This technique is useful for actions that don’t take lists, such as
restoreKnowledgeArticleVersion.
29
Action Objects Knowledge Actions
Other Information
Error Response Types on page 39
Table 1: Inputs
Input Details
articleVersionIdList Type
string
Description
Required. Comma-separated article version ID list.
Sample Input
The following code sample archives two articles:
{
"inputs" : [
{
"articleVersionIdList" : [ "ka0RM00000004VeYAI", "ka0RM00000003doYAA" ]
}
]
}
Sample Output
The following code sample illustrates a response after a successful request.
[ {
"actionName" : "archiveKnowledgeArticles",
"errors" : null,
"isSuccess" : true,
"outputValues" : {
"ka0RM00000004Ve" : "Success",
"ka0RM00000003do" : "Success"
}
} ]
The following code sample illustrates a response with one success and one failure:
[ {
"actionName" : "archiveKnowledgeArticles",
"errors" : null,
"isSuccess" : false,
"outputValues" : {
"ka0RM00000004Ve" : "You can't perform this action. Be sure the action is valid for
the current state of the article, and that you have permission to perform it.",
"ka0RM00000003do" : "Success"
}
} ]
30
Action Objects Knowledge Actions
Table 2: Inputs
Input Details
articleVersionIdList Type
string
Description
Required. Comma-separated article version ID list.
assigneeId Type
ID
Description
Required. ID of the assigned user.
assignAction Type
string
Description
Required. Assign action. Valid actions are:
• ASSIGN_DRAFT_MASTER
• ASSIGN_DRAFT_TRANSLATION
dueDate Type
string
Description
Optional. Assigned due date.
instruction Type
string
Description
Optional. Instructions for the assignee.
sendEmailNotification Type
boolean
Description
Optional. Indicates whether to send an email notification. Defaults to false.
Sample Input
The following code sample assigns two articles for translation:
{
"inputs" : [
31
Action Objects Knowledge Actions
{
"articleVersionIdList" : [ "ka0RM00000004VeYAI", "ka0RM00000003doYAA" ]
"assigneeId" : "005RM00000AAAAAYA4",
"assignAction" : "ASSIGN_DRAFT_TRANSLATION"
}
]
}
Sample Output
The following code sample illustrates a response after a successful request.
[ {
"actionName" : "assignKnowledgeArticles",
"errors" : null,
"isSuccess" : true,
"outputValues" : {
"ka0RM00000004Ve" : "Success",
"ka0RM00000003do" : "Success"
}
} ]
Table 3: Inputs
Input Details
action Type
string
Description
Required. Edit action for primary language or translation articles. Valid actions are:
• EDIT_AS_DRAFT_ARTICLE
• EDIT_AS_DRAFT_TRANSLATION
unpublish Type
boolean
Description
Required. Indicates whether to keep the article published (false) or archive the published
article (true). Use false to keep the current article version online and create a draft. Use
true to archive the current online version, which removes it from the knowledge base, and
creates a draft.
articleVersionId Type
string
Description
Article version ID. Required to create a draft from an online (published) translation. Optional to
create a draft from the online primary article if the Article ID is provided.
32
Action Objects Knowledge Actions
Input Details
articleId Type
string
Description
Article ID. Required when creating a draft from the online (published) primary article if the Article
Version ID isn’t provided.
Sample Input
The following code sample creates a draft from a primary article and archives the original article:
{
"inputs" : [
{
"action" : "EDIT_AS_DRAFT_ARTICLE",
"unpublish" : true,
"articleId" : "kA0RM00000004pP0AQ"
}
]
}
Sample Output
The following code sample illustrates a response after a successful request.
[ {
"actionName" : "createDraftFromOnlineKnowledgeArticle",
"errors" : null,
"isSuccess" : true,
"outputValues" : {
"kA0RM00000004pP0AQ" : "Success"
}
} ]
Table 4: Inputs
Input Details
articleVersionIdList Type
string
Description
Required. Comma-separated article version ID list.
33
Action Objects Knowledge Actions
Sample Input
The following code sample deletes two articles:
{
"inputs" : [
{
"articleVersionIdList" : [ "ka0RM00000004VeYAI", "ka0RM00000003doYAA" ]
}
]
}
Sample Output
The following code sample illustrates a response after a successful request.
[ {
"actionName" : "deleteKnowledgeArticles",
"errors" : null,
"isSuccess" : true,
"outputValues" : {
"ka0RM00000004Ve" : "Success",
"ka0RM00000003do" : "Success"
}
} ]
Table 5: Inputs
Input Details
articleVersionIdList Type
string
Description
Required. Comma-separated article version ID list.
pubAction Type
string
Description
Required. Publish action. Valid actions are:
• PUBLISH_ARTICLE (which replaces the latest version)
• PUBLISH_ARTICLE_NEW_VERSION (which creates a new version)
• SCHEDULE_ARTICLE_FOR_PUBLICATION
• PUBLISH_TRANSLATION
pubDate Type
string
34
Action Objects Knowledge Actions
Input Details
Description
Optional. Scheduled publish date in ISO 8601 format YYYY-MM-DDTHH:mm:ss+/-HHmm.
For example, for February 8, 2023, 1:40 pm UTC+01:00 use 2023-02-08T13:40:31+0100.
Sample Input
The following code sample publishes two articles:
{
"inputs" : [
{
"articleVersionIdList" : [ "ka0RM00000004VeYAI", "ka0RM00000003doYAA" ],
"pubAction" : "PUBLISH_ARTICLE"
}
]
}
Sample Output
The following code sample illustrates a response after a successful request.
[ {
"actionName" : "publishKnowledgeArticles",
"errors" : null,
"isSuccess" : true,
"outputValues" : {
"ka0RM00000004Ve" : "Success",
"ka0RM00000003do" : "Success"
}
} ]
Table 6: Inputs
Input Details
action Type
string
Description
Required. The only valid action is: RESTORE_KNOWLEDGE_ARTICLE_VERSION
articleId Type
string
Description
Required. Article ID.
35
Action Objects Knowledge Actions
Input Details
versionNumber Type
integer
Description
Optional. Version number of the archived article version to restore. Default is the latest archived
version.
Sample Input
The following code restores the latest archived version:
{
"inputs" : [
{
"action" : "RESTORE_KNOWLEDGE_ARTICLE_VERSION",
"articleId" : "kA0RM00000004pP0AQ"
}
]
}
Sample Output
The following code sample illustrates a response after a successful request.
[ {
"actionName" : "restoreKnowledgeArticleVersion",
36
Action Objects Knowledge Actions
"errors" : null,
"isSuccess" : true,
"outputValues" : {
"kA0RM00000004pP0AQ" : "Success"
}
} ]
Table 7: Inputs
Input Details
articleVersionId Type
string
Description
Required. The ID of the Knowledge article version.
Sample Input
The following code sample retrieves the SmartLink URL of a Knowledge article version:
{
"inputs":[
{
"articleVersionId":"ka0xx00000000cjAAA"
}
]
}
Sample Output
The following code sample illustrates a response after a successful request.
[
{
"actionName":"getArticleSmartLinkUrl",
"errors":null,
"isSuccess":true,
"outputValues":{
"articleSmartLinkUrl":"https://example.lightning.force.com/lightning/articles/Knowledge/Test-Redirection-1"
}
}
]
37
Action Objects Knowledge Actions
Table 8: Inputs
Input Details
articleId Type
string
Description
Required. Article ID.
language Type
string
Description
Required. Language code for the translation.
assigneeId Type
ID
Description
Required. ID of the assigned user.
dueDate Type
string
Description
Optional. Assigned due date.
sendEmailNotification Type
boolean
Description
Optional. Indicates whether to send an email notification. Defaults to false.
Table 9: Outputs
Output Details
articleId Type
ID
Description
Article ID.
language Type
string
Description
Language code for the translation.
38
Action Objects Knowledge Actions
Sample Input
The following code sample submits one article for translation into Spanish:
{
"inputs" : [
{
"articleId" : "kA0RM00000004pP0AQ",
"language" : "es",
"assigneeId" : "005RM00000AAAAAYA4"
}
]
}
Sample Output
The following code sample illustrates a response after a successful request.
[ {
"actionName" : "submitKnowledgeArticleForTranslation",
"errors" : null,
"isSuccess" : true,
"outputValues" : {
"articleId" : "kA0RM00000004pP0AQ",
"language" : "es"
}
} ]
Item-scoped errors describe a problem with a specific article or article version within the action. For example, this code illustrates an
archiveKnowledgeArticles action response with one failed item and one successful item.
[ {
"actionName" : "archiveKnowledgeArticles",
"errors" : null,
"isSuccess" : false,
"outputValues" : {
"ka0RM00000004Ve" : "You can't perform this action. Be sure the action is valid
39
Action Objects Lead Action
for the current state of the article, and that you have permission to perform it.",
"ka0RM00000003do" : "Success"
}
} ]
If any type of error occurs with an action, the isSuccess field is false.
Lead Action
Manage your leads using the invocable action.
Leads must be enabled in your org. The user must have read and edit permissions for leads.
40
Action Objects Lead Action
Sample Input
The following code runs lead assignment rules for two leads:
{"inputs": [ {
"leadId" : "00QR00000006LE8OAM"
},
{
"leadId" : "00QR00000006LEDOA2"
}]
}
Sample Output
The following code sample illustrates a response when the action succeeds.
[ {
"actionName" : "invocableApplyLeadAssignmentRules",
"isSuccess" : true
} ]
This example illustrates an error caused when the lead IDs passed to the Apply Lead Assignment Rules action are invalid.
[ {
"actionName" : "invocableApplyLeadAssignmentRules",
"errors" : [ {
"statusCode" : "UNKNOWN_EXCEPTION",
"message" : "Something's not right with one or more the specified LeadIds. Check the
IDs and try again.",
"fields" : [ ]
} ],
"isSuccess" : false,
"outputValues" : null
} ]
41
Action Objects Live Message Notification Actions
This example illustrates an error caused when one of the leads passed to the Apply Lead Assignment Rules action has been deleted.
[ {
"actionName" : "invocableApplyLeadAssignmentRules",
"errors" : [ {
"statusCode" : "ENTITY_IS_DELETED",
"message" : "One or more of the specified LeadIds were deleted. Check the IDs and try
again.",
"fields" : [ ]
} ],
"isSuccess" : false,
"outputValues" : null
} ]
Inputs
Input Details
channelDeveloperName Type
string
42
Action Objects Live Message Notification Actions
Input Details
Description
Required. The unique name of the messaging channel that’s used to send the messaging
notification.
contextRecordId Type
ID
Description
The entity ID of the sObject that’s used as the context for the merge field in a messaging template.
To resolve a merge field, the contextRecordId input property is required.
conversationBroadcastId Type
ID
Description
The entity ID of the sObject that links all the messages within a broadcast.
recipientPhone Type
string
Description
The destination phone number that the message is sent to. If the messaging channel type is
SMS and the recipientRecordId input property isn’t a messaging user, then the
recipientPhone input property is required.
recipientRecordId Type
ID
Description
Required. The MessagingEndUserId property or the Record ID associated with a recipient
phone number, to send the message notification.
surveyDeveloperName Type
string
Description
The API name of the survey that’s sent in the message. Available in API version 57.0 and later.
This input property is applicable to Surveys only.
templateDeveloperName Type
string
Description
Required. The unique name of the messaging template that’s used to generate the message.
triggeredOutboundTypeEnum Type
picklist
43
Action Objects Omni-Channel Action
Input Details
Description
The type of triggered outbound message. Possible values are:
• Standard
• Broadcast
Outputs
None.
Example
GET
The following example shows how to get information about the Live Message Notification action type:
curl --include --request GET \
--header "Authorization: Authorization: Bearer 00DR...xyz" \
--header "Content-Type: application/json" \
"https://instance.salesforce.com/services/data/v43.0/actions/standard/liveMessageNotification"
POST
Here’s an example request for the Live Message Notification action:
{
"inputs":[{
"templateDeveloperName":"MessageQ3Template",
"channelDeveloperName":"MessageQ3Template",
"contextRecordId":"003RO00000480RvYAM",
"recipientRecordId":"0PARM000000GJzo4AG"
}]
}
Omni-Channel Action
Create a PendingServiceRouting record used for Omni-Channel skills-based routing.
For more information about skills-based routing, see Skills-Based Routing for Omni-Channel in Salesforce Help.
44
Action Objects Omni-Channel Action
Inputs
Input Details
recordId Type
ID
Description
Required. ID of the Salesforce record to be routed by Omni-Channel.
routingConfigId Type
ID
Description
Required. ID of the QueueRoutingConfig record to be used by Omni-Channel.
skillIdList Type
string
Description
Optional. Comma-separated list of Skill IDs. Maximum number of skills is 25.
Outputs
Output Details
pendingServiceRoutingId Type
ID
Description
ID of the new PendingServiceRouting record, if the request was successful.
45
Action Objects Apply Payment Action
Usage
Sample Input
The following code sample attempts to create a PendingServiceRouting record using a work record (recordId), the
routing configuration (routingConfigId), and two skills (skillIdList).
{
"inputs": [{
"recordId":"400B0000004GGUUIA4",
"routingConfigId":"0K8B0000000CbgZKAS",
"skillIdList":"0C4B00000008QImKAM,0C4B0000000CcR1KAK"
}]
}
Sample Output
The following code sample illustrates a response after a successful request.
[
{
"actionName":"skillsBasedRouting",
"errors":null,
"isSuccess":true,
"outputValues":{
"pendingServiceRoutingId":"0JRB0000000TWA2"
}
}
]
46
Action Objects Apply Payment Action
Inputs
Input Details
amount Type
number
Description
Required. The amount to be applied to the invoice header.
appliedToId Type
ID
Description
Required. The ID of the invoice that receives the payment.
associatedAccountId Type
ID
Description
Optional. The ID of the account that contains the invoice.
comments Type
String
Description
Optional comments for more information about the payment application.
effectiveDate Type
datetime
Description
Optional. The date that the payment takes effect on the invoice.
paymentId Type
string
Description
Required. The payment that's applied to the invoice. The application is represented by the
PaymentLineInvoice created for a successful action.
Outputs
Output Details
appliedDate Type
datetime
Description
The date that the payment was applied to the invoice header.
47
Action Objects Payment Sale Action
Output Details
paymentLineInvoiceId Type
ID
Description
Represents the application of the payment's amount to the invoice. Created after a successful
action.
Inputs
Input Details
amount Type
number
Description
Required. The amount of the payment sale request.
paymentGatewayId Type
ID
48
Action Objects Payment Sale Action
Input Details
Description
Required. The ID of the Salesforce payment gateway record that represents the external payment
gateway used for processing the sale request.
paymentMethodId Type
ID
Description
Required. The ID of the Salesforce payment method that contains customer payment information.
currencyIsoCode Type
string
Description
Required for multicurrency orgs. Three-letter ISO 4217 currency code associated with the payment
output.
idempotencyKey Type
string
Description
Optional. Key used to ensure idempotency and avoid duplicate payments.
Outputs
Output Details
actionName Type
string
Description
The name of the action performed. Becomes paymentSale following a Payment Sale action.
errors Type
string
Description
Following a 400 error response, the error objects show information about the error that occurred.
Contains a status code, message, and list of fields.
isSuccess Type
boolean
Description
Shows whether the payment sale request was successful.
49
Action Objects Perform Survey Sentiment Analysis
Output Details
outputValues Type
ID
Description
The ID of the new payment request record.
Inputs
Input Details
surveyId Type
ID
Description
Required. The ID of the survey containing the questions for whose responses you want to get
sentiment insights.
surveyQuestionIds Type
ID
Description
Required. The IDs of the questions for whose responses you want to get sentiment insights.
50
Action Objects Perform Survey Sentiment Analysis
Input Details
startDate Type
Datetime
Description
Required. The date from when participant responses are processed to get sentiment insights.
endDate Type
Datetime
Description
Required. The date until when participant responses are processed to get sentiment insights.
typeOfOperation Type
String
Description
Required. The type of operation to be performed on the survey responses.
Possible values are:
• create—Bulk process survey responses. After the processing is completed, the AI Sentiment
Result records are created with the Submitted status.
• update—Bulk process survey responses that have associated AI Sentiment Result records
in the Draft status. After the processing is completed, the AI Sentiment Result records are
updated and their status is changed to Submitted.
You can only update a sentiment analysis result record with the Draft status.
Outputs
None.
Example
Sample Request
Here’s an example POST request to create or update the AI Sentiment Result records:
{
"inputs":[{
"surveyId":"0Kdx00000000GYeCAM",
"surveyQuestionIds":["0Kux00000000xDgCAI","0Kux00000000xDiCAI"],
"startDate":"1-07-2022",
"endDate":"12-07-2022",
"typeOfOperation":"create"
51
Action Objects PlatformAction
}]
}
SEE ALSO:
Salesforce Help: Automate Your Business Process: Perform Survey Sentiment Analysis
PlatformAction
PlatformAction is a virtual read-only object. It enables you to query for actions displayed in the UI, given a user, a context, device format,
and a record ID. Examples include standard and custom buttons, quick actions, and productivity actions.
Supported Calls
describeSObjects(), query()
Fields
Field Details
ActionListContext Type
picklist
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
Required. The list context this action applies to. Valid values are:
• Assistant
• BannerPhoto
• Chatter
• Dockable
• FeedElement
• Flexipage
• Global
• ListView
• ListViewDefinition
• ListViewRecord
• Lookup
• MruList
• MruRow
• ObjectHomeChart
• Photo
• Record
52
Action Objects PlatformAction
Field Details
• RecordEdit
• RelatedList
• RelatedListRecord
ActionTarget Type
textarea
Properties
Nillable
Description
The URL to invoke or describe the action when the action is invoked. If the action is a standard
button overridden by a Visualforce page, the ActionTarget returns the URL of the Visualforce
page, such as /apex/pagename.
This field is available in API version 35.0 and later.
ActionTargetType Type
picklist
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
The type of the target when this action is triggered. Valid values are:
• Describe—applies to actions with a user interface, such as quick actions
• Invoke—applies to actions with no user interface, such as action links or invocable
actions
• Visualforce—applies to standard buttons overridden by a Visualforce page
ActionTargetUrl Type
string
Properties
Filter, Group, Nillable, Sort
Description
URL to invoke or describe the action when the action is invoked. This field is deprecated in
API version 35.0 and later. Use ActionTarget instead.
Category Type
picklist
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
Applies only to action links. Denotes whether the action link shows up in the feed item list
of actions or the overflow list of actions. Valid values are:
• Primary
53
Action Objects PlatformAction
Field Details
• Overflow
ConfirmationMessage Type
string
Properties
Filter, Group, Nillable, Sort
Description
Applies only to action links. The message to display before the action is invoked. Field is null
if no confirmation is required before invoking the action.
DeviceFormat Type
picklist
Properties
Defaulted on create, Filter, Group, Nillable, Restricted picklist, Sort
Description
Specifies which action icon the PlatformAction query returns. If this field isn’t specified, it
defaults to Phone. Valid values are:
• Aloha
• Desktop
• Phone
• Tablet
ExternalId Type
string
Properties
Filter, Group, Nillable, Sort
Description
The unique ID for the PlatformAction. If the action doesn’t have an ID, its API name is used.
GroupId Type
reference
Properties
Filter, Group, Nillable, Sort
Description
The unique ID of a group of action links.
IconContentType Type
string
Properties
Filter, Group, Nillable, Sort
54
Action Objects PlatformAction
Field Details
Description
The content type—such as .jpg, .gif, or .png—of the icon for this action. Applies to both
custom and standard icons assigned to actions.
IconHeight Type
int
Properties
Filter, Group, Nillable, Sort
Description
The height of the icon for this action. Applies only to standard icons.
IconUrl Type
url
Properties
Filter, Group, Nillable, Sort
Description
The URL of the icon for this action.
IconWidth Type
int
Properties
Filter, Group, Nillable, Sort
Description
The width of the icon for this action. Applies only to standard icons.
InvocationStatus Type
picklist
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
The status of the action within the feed item. Applies to action links only. Valid values are:
• Failed
• New
• Pending
• Successful
InvokedByUserId Type
reference
Properties
Filter, Group, Nillable, Sort
55
Action Objects PlatformAction
Field Details
Description
The ID of the user who most recently invoked this action within the current feed item. Applies
to action links only.
This is a relationship field.
Relationship Name
InvokedByUser
Relationship Type
Lookup
Refers To
User
IsGroupDefault Type
boolean
Properties
Defaulted on create, Filter, Group, Sort
Description
Denotes whether this action is the default in an action link group. False for other action types.
Applies to action links only.
IsMassAction Type
boolean
Properties
Defaulted on create, Filter, Group, Sort
Description
Indicates whether the action can be performed on multiple records.
This field is available in API version 38.0 and later.
Label Type
string
Properties
Filter, Group, Sort
Description
The label to display for this action.
PrimaryColor Type
string
Properties
Filter, Group, Nillable, Sort
Description
The primary color of the icon for this action.
56
Action Objects PlatformAction
Field Details
RelatedListRecordId Type
string
Properties
Filter, Group, Nillable, Sort
Description
Represents the ID of a record in an object’s related list.
This field is available in API version 38.0 and later.
RelatedSourceEntity Type
string
Properties
Filter, Group, Nillable, Sort
Description
When the ActionListContext is RelatedList or RelatedListRecord, this field represents
the API name of the related list to which the action belongs.
Section Type
picklist
Properties
Filter, Group, Nillable, Restricted picklist, Sort
Description
The section of the user interface the action resides in. Applicable only to Lightning Experience.
Valid values are:
• ActivityComposer
• CollaborateComposer
• NotesComposer
• Page
• SingleActionLinks
This field is available in API version 35.0 and later.
SourceEntity Type
string
Properties
Filter, Group, Sort
Description
Required. The object or record with which this action is associated.
Subtype Type
string
Properties
Filter, Group, Nillable, Sort
57
Action Objects PlatformAction
Field Details
Description
The subtype of the action. For quick actions, the subtype is QuickActionType. For
custom buttons, the subtype is WebLinkTypeEnum. For action links, subtypes are Api,
ApiAsync, Download, and Ui. Standard buttons and productivity actions have no
subtype.
TargetObject Type
string
Properties
Filter, Group, Nillable, Sort
Description
The type of object record the action creates, such as a contact or opportunity.
This field is available in API version 41.0 and later.
TargetUrl Type
string
Properties
Filter, Nillable, Sort
Description
The URL that a custom button or link points to.
This field is available in API version 41.0 and later.
Type Type
picklist
Properties
Filter, Group, Restricted picklist, Sort
Description
The type of the action. Valid values are:
• ActionLink—An indicator on a feed element that targets an API, a web page, or a
file, represented by a button in the Salesforce Chatter feed UI.
• CustomButton—When clicked, opens a URL or a Visualforce page in a window or
executes JavaScript.
• InvocableAction
• ProductivityAction—Productivity actions are predefined and attached to a
limited set of objects. Productivity actions include Send Email, Call, Map, View Website,
and Read News. Except for the Call action, you can’t edit productivity actions.
• QuickAction—A global or object-specific action.
• StandardButton—A predefined Salesforce button such as New, Edit, and Delete.
58
Action Objects Post to Chatter Actions
Usage
PlatformAction can be described using describeSObject().
You can directly query for PlatformAction. For example, this query returns all fields for actions associated with each of the records of the
listed objects:
SELECT ExternalId, ActionTargetType, ActionTargetUrl, ApiName, Category,
ConfirmationMessage, ExternalId, GroupId, UiTheme, IconUrl, IconContentType,
IconHeight, IconWidth, PrimaryColor, InvocationStatus, InvokedByUserId,
IsGroupDefault, Label, LastModifiedDate, Subtype, SourceEntity, Type
FROM PlatformAction
WHERE SourceEntity IN ('001xx000003DGsH', '001xx000003DHBq', ‘Task’) AND
ActionListContext = ‘Record’;
Note: To query PlatformAction, provide the ActionListContext and SourceEntity. If you query for
ActionListContext with a value of RelatedList, and don't specify a RelatedSourceEntity, the query returns
the API name of the related list. In API v43.0 and before, SourceEntity = 'Object API Name' and
ActionListContext = 'ListView' is an invalid combination to fetch quick actions in a SOQL query. Use
SourceEntity = 'Object ID' and ActionListContext = 'ListView' instead.
This query uses multiple ActionListContext values in its WHERE clause to return all actions in the Lightning Experience user
interface (DeviceFormat = 'Desktop') for the specified object:
SELECT ActionListContext, Label, Type, Subtype, Section, SourceEntity,
RelatedSourceEntity, ActionTarget, ActionTargetType, ApiName, Category,
ConfirmationMessage, DeviceFormat, ExternalId, GroupId, IconContentType,
IconHeight, IconUrl, IconWidth, Id, InvocationStatus, InvokedByUserId,
IsGroupDefault, LastModifiedDate, PrimaryColor
FROM PlatformAction
WHERE ActionListContext IN ('Record','Chatter','RelatedList') AND
SourceEntity = '001xx000003DlvX' AND
DeviceFormat = 'Desktop'
59
Action Objects Post to Chatter Actions
Authentication
Authorization: Bearer token
Inputs
Input Details
communityId Type
reference
Description
Optional. Specifies the ID of an Experience Cloud site to post to. Valid only if Digital Experiences
is enabled. Required if posting to a user or Chatter group that belongs to an Experience Cloud
site. This value is available in API version 35.0 and later.
subjectNameOrId Type
string
Description
Required. Reference to the user, Chatter group, or record whose feed you want to post to.
• To post to a user’s feed, enter the user’s ID or Username. For example:
jsmith@salesforce.com
• To post to a Chatter group, enter the group’s Name or ID. For example: Entire
Organization
• To post to a record, enter the record’s ID. For example: 001D000000JWBDx
text Type
string
Description
Required. The text that you want to post. Must be a string of no more than 10,000 characters.
To mention a user or group, enter @[reference], where reference is the ID for the user
or group that you want to mention. The reference can be a literal value, a merge field, or a flow
resource.
To add a topic, enter #[string], where string is the topic that you want to add.
For example, the string Hi @[005000000000001] check this out
#[some_topic]. is stored appropriately as Hi @Joe, check this out
#some_topic. where “@Joe” and “#some_topic” are links to the user and topic, respectively.
type Type
picklist
Description
Required only if subjectNameOrId is set to a username or a Chatter group name. The type
of feed that you want to post to.
• User—Enter this value if subjectNameOrId is set to a user’s Username.
• Group—Enter this value if subjectNameOrId is set to a Chatter group’s Name.
60
Action Objects Preview Cart to Exchange Order
Input Details
visibility Type
picklist
Description
Optional. Valid only if Digital Experiences is enabled. Specifies whether this feed item is available
to all users or internal users only. Valid values are:
• allUsers
• internalUsers
This value is available in API version 35.0 and later.
Outputs
Output Details
feedItemId Type
reference
Description
The ID of the new Chatter feed item.
61
Action Objects Preview Cart to Exchange Order
Inputs
Input Details
orderSummaryId Type
ID
Description
Required. The ID of the order summary record associated with the list of exchanges.
exchangeCartId Type
ID
Description
Required. The ID of the cart record containing the items for the exchange order.
referenceId Type
ID
Description
Required. The ID of the record that's related to the specified order summary. Only IDs from a
return order record are supported.
Outputs
Output Details
changeBalances Type
string
Description
A string that contains the calculated amounts resulting from the exchange order.
errors Type
string
Description
Following a 400 error response, the error objects show information about the error that occurred.
Contains a status code, message, and list of fields.
isSuccess Type
boolean
Description
Shows whether the payment sale request was successful.
orderSummaryID Type
ID
62
Action Objects Prompt Template Actions
Output Details
Description
The ID of the order summary record associated with the list of exchanges.
Inputs
Input values vary according to the input variables specified for the prompt template.
Outputs
Output Details
promptResponse Type
string
Description
The prompt response generated by the action based on the specified prompt template and
input.
63
Action Objects Quick Actions
Quick Actions
Use a quick action to create a task or a case. Invoke existing quick actions, both global and object-specific, to create records, update
records, or log calls.
For more information about creating global quick actions, see Create Global Quick Actions, and for more information on object-specific
quick actions, see Create Object-Specific Quick Actions, in Salesforce Help.
This object is available in API version 32.0 and later.
Inputs
All quick actions have the contextId input parameter. It’s a reference to the related record for the quick action. Other inputs vary
according to the layout of the quick action. To determine inputs for a specific quick action, use the describe feature. For example, perform
a GET with /services/data/vXX.X/actions/custom/quickAction/Task/deferTask to see the inputs for the
quick action deferTask.
64
Action Objects Sales Engagement Actions
Formats
JSON, XML
HTTP Methods
GET, HEAD, POST
Authentication
Authorization: Bearer token
Inputs
Input Details
metricId Type
string
Description
Required. The metric linked to a Salesforce report.
Outputs
Output Details
resultingMessage Type
string
Description
The message that indicates the results of the metric refresh.
65
Action Objects Sales Engagement Actions
/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 on page 74
startStepNameOrId Type
string
Description
The name or ID of the cadence step where the target starts in the cadence.
targetId Type
ID
Description
Required. The ID of the contact, a lead, or person account to add to the cadence.
66
Action Objects Sales Engagement Actions
Input Details
userId Type
ID
Description
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 Type
ID
Description
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:
{
"inputs" : [ {
"salesCadenceNameOrId" : "77Cxx0000004CXEEA2",
"targetId" : "00Qxx000002TRI2EAO"
}]
}
actionCadenceTrackerId Type
ID
Description
Required if targetId is null. The ID of the action cadence tracker to remove from the cadence.
67
Action Objects Sales Engagement Actions
Input Details
completionReasonCode Type
string
Description
Required. The completion reason code indicates how the target competed the cadence. Valid
value is:
• ManuallyRemoved
completionDisposition Type
string
Description
The disposition of the completed cadence tracker. Valid values are:
• Success
• Customer Engaged
• Customer Connected
• Contact Later
• No Response
• Not Interested
• Disqualified
• Bad Data
• Duplicate
relatedToId Type
ID
Description
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 Type
string
Description
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.)
• Collected (Valid for invoices.)
shouldApplyUserContext Type
boolean
68
Action Objects Sales Engagement Actions
Input Details
Description
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:
{
"inputs" : [ {
"completionReasonCode" : "ManuallyRemoved",
"targetId" : "00Qxx000002TRI2EAO"
}]
}
resumeTime Type
String
Description
Optional. The scheduled end time for the pause.
Sample Input
The following code sample pauses a target in its cadence:
{
"inputs" : [ {
"targetId" : "00Qxx000002TRI2EAO", "resumeTime" : "2021-06-15T05:30:00:521917Z"
}]
}
69
Action Objects Sales Engagement Actions
Sample Input
The following code sample resumes a target in its cadence:
{
"inputs" : [ {
"targetId" : "00Qxx000002TRI2EAO"
}]
}
userId Type
ID
Description
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.
70
Action Objects Sales Engagement Actions
Sample Input
The following code changes a target’s assignee:
{
"inputs" : [ {
"targetId" : "00Qxx000002TRI2EAO",
"userId" : "005R0000000eg3zIAA",
}]
}
completionDisposition Type
string
Description
The disposition of the completed cadence tracker. Valid values are:
• Success
• Customer Engaged
• Customer Connected
• Contact Later
• No Response
• Not Interested
• Disqualified
• Bad Data
• Duplicate
relatedToId Type
ID
Description
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.
71
Action Objects Sales Engagement Actions
Input Details
relatedToAttributionType Type
string
Description
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.)
• 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”:
{
"inputs" : [ {
"actionCadenceTrackerId" : "0qBR00000005CXvMAM",
"completionDisposition" : "Customer Engaged",
"relatedToId" : "006R0000003DNpJIAW",
"relatedToAttributionType" : "Activation"
}]
}
eventType Type
string
Description
Required. The type of event to send. Valid values are:
• Skip
72
Action Objects Sales Engagement Actions
Input Details
• Manual Complete
Sample Input
The following code sends a Manual Complete event to a cadence step tracker:
{
"inputs" : [ {
"recordId" : "8HFR00000005WyqOAE",
"eventType" : "Manual Complete"
}]
}
error Type
string
Description
The error message returned when the action fails.
73
Action Objects Sales Engagement Actions
Sample Input
The following code retrieves the email template or call script for two cadence steps:
{"inputs": [ {
"stepTrackerId" : "8HFR00000006LE8OAM"
},
{
"stepTrackerId" : "8HFR00000006LEDOA2"
}]
}
Sample Output
The following code sample illustrates a response after one success and one failure.
[ {
"actionName" : "selectTemplateForSalesCadenceStepTracker",
"errors" : null,
"isSuccess" : true,
"outputValues" : {
"output" : {
"SplitPercentage" : 10.0,
"TemplateId" : "00XR0000000UOtZMAW"
}
}
}, {
"actionName" : "selectTemplateForSalesCadenceStepTracker",
"errors" : [ {
"statusCode" : "UNKNOWN_EXCEPTION",
"message" : "No template was found.",
"fields" : [ ]
} ],
"isSuccess" : false,
"outputValues" : {
"error" : "No template was found."
}
} ]
This example illustrates an error caused by sending invalid input values to the Assign Target To Cadence action.
[ {
"actionName" : "assignTargetToSalesCadence",
"errors" : [ {
74
Action Objects Salesforce Omnichannel Inventory Actions
"statusCode" : "UNKNOWN_EXCEPTION",
"message" : "The object needs to be a valid cadence entity.",
"fields" : [ ]
} ],
"isSuccess" : false,
"outputValues" : {
"error" : "The object needs to be a valid cadence entity."
}
} ]
75
Action Objects Send Conversation Messages Actions
76
Action Objects Send Conversation Messages Actions
HTTP Methods
GET, HEAD, POST
Authentication
Authorization: Bearer token
Inputs
Input Details
messageDefinitionName Type
string
Description
The API name of a ConversationMessageDefinition record that's used to render the messages.
messagingDefinitionInputParameters Type
list
Description
Optional. A collection of Apex
richmessaging__MessageDefinitionInputParameter records that contain
messaging component details to use when rendering messages.
requestType Type
string
Description
Specifies the type of the request. Valid values are: SendNotificationMessages.
isEnforceMessagingChannelConsent Type
boolean
Description
Indicates whether messaging consent must be verified after messages are queued for sending.
allowedSessionStatus Type
string
Description
Limits the time when the message can be sent. Valid values are:
• Any—Send the message whether the messaging user is engaged in a messaging session
with the business or not.
• NonActive—Send the message unless the messaging user is engaged in a messaging
session with a status of Active. The message is sent after the session’s status changes.
• Closed—Send the message unless the messaging user is engaged in a messaging session.
The message is sent after the session is closed.
messagingEndUserIds Type
list
77
Action Objects Send Conversation Messages Actions
Input Details
Description
A collection of up to 100 messaging end user record IDs to use as recipients of the messages. To
send more than 100 messages, divide your end user recipients into batches of 100 or fewer and
repeat the action invocation for each batch.
Outputs
Input Details
requestId Type
string
Description
The ID of the ConvMessageSendActionRequest record created by the request that's used to track
the message progress.
messageIdentifiers Type
list
Description
A collection of generated message UUIDs with one entry for each recipient specified in
messagingUserIds.
Usage
Sample Input
The following sample input attempts to create a ConvMessageSendRequest record using a Messaging Component
(messageDefinitionName), the request for the type of component being sent (requestType), the consent preferences
(isEnforceMessagingChannelConsent), when the message can be sent (allowedSessionStatus), and the
message recipients (messagingEndUserIds). Additionally, the request contains a list of custom parameters
(messagingDefinitionInputParameters). These parameters are mapped to parameters configured in the messaging
component, which can be optional. Applicable data types for parameters are textValue, recordIdValue, dateValue,
dateTimeValue, numberValue, and booleanValue.
{
"inputs": [{
"messageDefinitionName":"Notification",
"requestType":"SendNotificationMessages",
"isEnforceMessagingChannelConsent":true,
"allowedSessionStatus":"Any",
"messagingEndUserIds":"0PARM000000Lc3I,0PARM000000MZ3p",
"messagingDefinitionInputParameters":[{"name":"custom_parameter_name","textValue":"custom
parameter value"}]
}]
}
78
Action Objects Send Notification Actions
Sample Output
The following sample output illustrates a response after a successful request.
[
{
"actionName":"sendConversationMessages",
"errors":null,
"isSuccess":true,
"outputValues":{
"messageIdentifiers":"c581098c-5db6-4ed8-915f-c9aaa016c671,d8e1990e-5d67-414c-9713-180107d7d1bb",
"requestId":"1srM000000000p"
}
}
]
For more information about this action, see Flow Core Actions: Send Conversation Messages and Send Automated Messages in Enhanced
Messaging Channels in Salesforce Help.
Note: To send notifications for Slack, enable Salesforce for Slack Integrations.
To create a custom Slack notification type supported by a Send Notification action, see Create and Send Custom Slack Notifications.
To trigger Send Notification actions using REST API calls, you need the Send Custom Notifications user permission.
79
Action Objects Send Notification Actions
Inputs
Input Details
recipientIds Type
ID
Description
Required. The IDs of the notification recipients or recipient types. Valid recipient or recipient type
values are UserId or CollaborationRoomId values.
recordId Type
ID
Description
Required. The ID of the record that the notifications are about. The record ID must be associated
with the specific EntityType of the notification type. For example, enter the record ID for an
opportunity when configuring a notification type associated with the Opportunity object.
For custom notification types, you can find the related object by viewing the notification type's
settings from Custom Notifications in Setup. For supported standard notification types, refer to
the Standard Notification Types and Related Objects table.
close_date_reminder Opportunity
close_date_updated Opportunity
deal_won Opportunity
deals_to_watch Opportunity
hc_care_plan_alert Case
hc_care_plan_task_alert Task
80
Action Objects Session-Based Permission Set Actions
high_priority_case Case
new_child_opportunity Opportunity
next_step_reminder Opportunity
stage_reminder Opportunity
stage_updated Opportunity
SEE ALSO:
Object Reference for the Salesforce Platform: CollaborationRoom
Object Reference for the Salesforce Platform: Swarm
81
Action Objects Simple Email Actions
Inputs
Input Details
PermSetName Type
string
Description
Required. Specifies the developer name of the permission set.
PermSetNamespace Type
string
Description
Optional. Specifies the namespace of the permission set.
Outputs
None.
82
Action Objects Simple Email Actions
Inputs
Input Details
emailAddresses Type
string
Description
Optional. A comma-delimited list of the recipients' email addresses. Up to five email recipients,
specified as a comma-separated list. If emailAddressesArray and recipientId are
also used, the combined number of recipients must be five or fewer.
emailAddressesArray Type
string
Description
Optional. A collection of the recipients' email addresses. Up to five email recipients, specified as
a collection of strings. If emailAddresses is also used, the combined number of recipients
must be five or fewer.
emailBody Type
textarea
Description
Optional. The body of the email. Required if not using an email template.
emailSubject Type
string
Description
Optional. The subject of the email. Required if not using an email template. The value is treated
as plain text.
emailTemplateId Type
text
Description
Optional. The ID of the email template to use for the subject and body of the email. If this input
is included, recipientId is required. If the email template has merge fields from an object
other than the one associated with recipientId, specify the record used to supply those
merge fields in relatedRecordId. If this input is specified, it changes the API called by the
action, which can impact your daily email-sending limit. For details, see Flow Core Action: Send
Email in Salesforce Help.
This field is available in API version in 58.0 and later.
logEmailOnSend Type
boolean
Description
Optional. Indicates whether to log the email on the specified records’ activity timelines. Valid
values are true and false. Default value is false, and the email isn't logged. To log an
83
Action Objects Simple Email Actions
Input Details
email, you must specify a value in recipientId or relatedRecordId. If this input is
set to true, it changes the API called by the action, which can impact your daily email-sending
limit. For details, see Flow Core Action: Send Email in Salesforce Help.
This field is available in API version in 58.0 and later.
recipientId Type
text
Description
Optional. The ID of a lead, contact, or person account record. If logEmailOnSend is included,
then recipientId is the ID of the person to send and log the email to. If
emailTemplateId is included, then recipientId is required and is the ID of the person
to send the email to. This field is available in API version in 58.0 and later.
relatedRecordId Type
text
Description
Optional. The ID of a record that's not a person. For example, the ID of a case record. If
logEmailOnSend is included, relatedRecordId is the ID of a secondary record to
log the email to. In this case, relatedRecordId can’t be used to log an email if
recipientId is a lead record. If emailTemplateId is included, relatedRecordId
is the ID of the non-recipient record used to populate email template merge fields. This field is
available in API version in 58.0 and later.
sendRichBody Type
boolean
Description
Optional. Indicates whether the body of the email uses rich or plain text. Valid values are:
• {!$GlobalConstant.True}—The body of the email uses rich text.
• {!$GlobalConstant.False}—The body of the email uses plain text. This value is
the default.
senderAddress Type
string
Description
Optional. The organization-wide email address to be used as the sender. Required only if
senderType is set to OrgWideEmailAddress.
senderType Type
string
Description
Optional. Email address used as the email’s From and Reply-To addresses. Valid values are:
• CurrentUser—Email address of the user running the flow. This setting is the default.
• DefaultWorkflowUser—Email address of the default workflow user.
84
Action Objects Submit Exchange Order
Input Details
• OrgWideEmailAddress—The organization-wide email address that is specified in
senderAddress.
Outputs
None.
Inputs
Input Details
exchangeCartId Type
ID
Description
Required. The ID of the cart record containing the items in the exchange order.
85
Action Objects Submit Exchange Order
Input Details
orderNumber Type
ID
Description
Optional. Order number for the created exchange order summary.
orderSummaryId Type
ID
Description
Required. The ID of the order summary record associated with the list of exchanges.
paymentInfoInputs Type
Collection
Description
Optional. A collection of Apex ConnectApi.PaymentInfoInputRepresentation records, each
containing payment details when the exchange order amount is greater than the original order
amount.
referenceId Type
ID
Description
Required. The ID of the record that's related to the specified order summary. Only IDs from a
return order record are supported.
sequenceList Type
Collection
Description
Optional. A collection of Apex ConnectApi.SequenceOrderPaymentSummaryInputRepresentation
records to reserve a balance from. Each record contains an order summary payment ID and an
amount.
Outputs
Output Details
changeBalances Type
string
Description
A string that contains the calculated amounts resulting from the exchange order.
errors Type
string
86
Action Objects Submit for Approval Actions
Output Details
Description
Following a 400 error response, the error objects show information about the error that occurred.
Contains a status code, message, and list of fields.
exchangeOrderSummaryId Type
ID
Description
The ID of the order summary record associated with the list of exchanges.
isSuccess Type
boolean
Description
The ID of the order summary record created for the exchanges.
orderSummaryID Type
ID
Description
The ID of the order summary record associated with the list of exchanges.
87
Action Objects Submit for Approval Actions
Inputs
Input Details
comment Type
string
Description
Optional. Comments that accompany the Approval submission.
nextApproverIds Type
reference
Description
Optional. An array of one ID of the next approver, which can be a user or a group. This input is
optional because some approval processes have the next approver specified in the approval
process definition. You can’t specify more than 2,000 approvers.
objectId Type
reference
Description
Required. The ID of the record being submitted for approval.
processDefinitionNameOrId Type
string
Description
Optional. The ID or name of the approval process to run against the record. If none is specified,
the first approval process whose entry criteria the record satisfies is used. Names can’t be longer
than 120 characters.
skipEntryCriteria Type
boolean
Description
Optional. A Boolean value controlling whether the entry criteria for the specified approval process
must be evaluated for the record (true) or not (false). If set to true, also specify
processDefinitionNameOrId.
submitterId Type
string
Description
Optional. The ID of the user submitting the record for approval. If none is specified, the submitter
is the current user.
88
Action Objects Survey Invitation Actions
Outputs
Output Details
actorIds Type
reference
Description
An array of the IDs of the next approvers.
entityId Type
reference
Description
The ID of the record submitted for approval.
instanceId Type
reference
Description
The ID of the approval process instance.
instanceStatus Type
string
Description
The status of the approval. The valid values are
• Approved
• Pending
• Rejected
• Removed
newWorkItemIds Type
reference
Description
An array of the IDs of the work items created for the next step in this approval process.
89
Action Objects Dynamic Send Survey Invitation Actions
Inputs
Input Details
anonymousResponse Type
boolean
Description
Indicates whether the participant’s name is recorded in the response record (true) or not
(false).
autoExpiryDays Type
integer
Description
Number of days remaining for the survey invitation to expire.
emailTemplateName Type
string
Description
Developer name of the template that contains either the question or the survey link.
isUnauthenticatedResponse Type
boolean
90
Action Objects Dynamic Send Survey Invitation Actions
Input Details
Description
Indicates whether the participant is required to authenticate before starting the survey (true)
or not (false).
personalInvitation Type
boolean
Description
Indicates whether the invitation is specific to the recipient (true) or not (false).
recipient Type
reference
Description
Required. Salesforce ID of the record that the survey invitation is sent to.
recipientType Type
string
Description
Type of the survey recipient.
surveyQuestionName Type
string
Description
Developer name of the question that’s sent by using the invitation.
surveySubjectEntity Type
reference
Description
ID of the record that associates the invitation record with another record.
Outputs
None.
Example
GET
This example shows how to get information about the Dynamic Send Survey Invitation action type.
curl --include --request GET \
--header "Authorization: Authorization: Bearer 00DR...xyz" \
--header "Content-Type: application/json" \
"https://instance.salesforce.com/services/data/v51.0/actions/custom/dynamicSendSurveyInvitation"
91
Action Objects Send Survey Invitation Actions
Here’s a response that returns the list of invocable actions for each survey.
{
"actions" : [ {
"label" : "flowsend",
"name" : "flowsend",
"type" : "SEND_SURVEY_DYNAMIC_INVOCABLE_ACTION",
"url" : "/services/data/v51.0/actions/custom/dynamicSendSurveyInvitation/flowsend"
}, {
"label" : "survey2",
"name" : "survey2",
"type" : "SEND_SURVEY_DYNAMIC_INVOCABLE_ACTION",
"url" : "/services/data/v51.0/actions/custom/dynamicSendSurveyInvitation/survey2"
}, {
"label" : "survey",
"name" : "survey",
"type" : "SEND_SURVEY_DYNAMIC_INVOCABLE_ACTION",
"url" : "/services/data/v51.0/actions/custom/dynamicSendSurveyInvitation/survey"
} ]
}
POST
Here’s a request for the Dynamic Send Survey Invitation action.
{
"inputs":[{
"recipient" : "003xx000004WpemAAC",
“isUnauthenticatedResponse” : false,
"autoExpiryDays" : 6
}]
}
SEE ALSO:
Salesforce Help: Send Survey Invitations Using Flows
92
Action Objects Send Survey Invitation Actions
Inputs
Input Details
anonymousResponse Type
boolean
Description
Indicates whether the participant’s name is recorded in the response record (true) or not
(false).
autoExpiryDays Type
integer
Description
Number of days remaining for the survey invitation to expire.
emailTemplateName Type
string
Description
Developer name of the template that contains either the question or the survey link.
isUnauthenticatedResponse Type
boolean
Description
Indicates whether the participant is required to authenticate before starting the survey (true)
or not (false).
personalInvitation Type
boolean
93
Action Objects Send Survey Invitation Actions
Input Details
Description
Indicates whether the invitation is specific to the recipient (true) or not (false).
recipient Type
reference
Description
Required. Salesforce ID of the record that the survey invitation is sent to. The record can be a
user (internal invitation) or a contact or a lead (external invitation via community).
surveyName Type
string
Description
Required. Developer name of the survey that the invitation is sent for.
surveyQuestionName Type
string
Description
Developer name of the question that’s sent using the invitation.
surveySubjectEntity Type
reference
Description
ID of the record that associates the invitation record with another record.
Outputs
None.
Example
GET
This example shows how to get information about the Send Survey Invitation action type.
curl --include --request GET \
--header "Authorization: Authorization: Bearer 00DR...xyz" \
--header "Content-Type: application/json" \
"https://instance.salesforce.com/services/data/v47.0/actions/standard/sendSurveyInvitation"
POST
Here’s a request for the send survey invitation action.
{
"inputs":[{
"surveyName" : "FlowActionSend",
94
Action Objects Work Plan and Work Step Actions
"recipient" : "003RO0000037IRvYAM",
"autoExpiryDays" : 6
}]
}
SEE ALSO:
Salesforce Help: Send Survey Invitations Using Process Builder
95
Action Objects Work Plan and Work Step Actions
This action creates work plan records from the work plan library.
workPlanTemplateIdList Type
array of strings
Description
Required. The IDs of the work plan templates used to instantiate the work plans.
workPlanIdList Type
array of strings
Description
The list of work plan IDs.
Sample Input
The following code sample adds work plans:
{
"inputs" : [ {
"recordId" : "0WOxx00000007j3",
"workPlanTemplateIdList" : ["7Iyxx0000004LSS", "7Iyxx0000004LTT"]
}]
}
Sample Output
The following code sample illustrates a response after a successful request.
[ {
"actionName" : "addWorkPlans",
"errors" : null,
"isSuccess" : true,
"outputValues" : {
96
Action Objects Work Plan and Work Step Actions
"recordId" : "0WOxx00000007j3",
"workPlanIdList" : ["0gqxx0000000Adh", "0gqxx0000000Adi"]
}
} ]
workStepTemplateIdList Type
array of strings
Description
Required. The IDs of the work step templates used to instantiate the work steps.
workStepIdList Type
array of strings
Description
The list of work step IDs.
Sample Input
The following code sample adds work steps:
{
"inputs" : [ {
"recordId" : "0gqRM0000004DxoYAE",
"workStepTemplateIdList" : ["4L0xx0000004FJoCAM", "4L0xx0000004FJoNAC"]
97
Action Objects Work Plan and Work Step Actions
}]
}
Sample Output
The following code sample illustrates a response after a successful request.
[ {
"actionName" : "addWorkSteps",
"errors" : null,
"isSuccess" : true,
"outputValues" : {
"recordId" : "0gqRM0000004DxoYAE",
"workstepIdList" : ["0hFxx00000007uLEAQ", "0hFxx00000007uRAUW"]
}
} ]
workPlanIdList Type
array of strings
Description
The list of work plan IDs.
98
Action Objects Work Plan and Work Step Actions
Sample Input
The following code sample generates a work plan:
{
"inputs" : [ {
"recordId" : "0WOxx00000007j3"
}]
}
Sample Output
The following code sample illustrates a response after a successful request.
[ {
"actionName" : "generateWorkPlans",
"errors" : null,
"isSuccess" : true,
"outputValues" : {
"recordId" : "0WOxx00000007j3",
"workPlanIdList" : ["0gqxx0000000Adh", "0gqxx0000000Adi"]
}
} ]
workPlanIdList Type
array of strings
Description
The ID list for the work plans that were deleted.
99
Action Objects Work Plan and Work Step Actions
Sample Input
The following code deletes a work plan:
{
"inputs" : [ {
"recordId" : "OWOxxxxxxxxxxxx"
}]
}
Sample Output
The following code sample illustrates a response after a successful request.
[ {
"actionName" : "deleteWorkPlans",
"errors" : null,
"isSuccess" : true,
"outputValues" : {
"recordId" : "0WORM000000621X",
"workPlanIdList" : [ "0gqRM0000004CRS" ]
}
} ]
100