Newer Version Available
Get Custom Invocable Actions
Sending email with the emailAlert action counts against your daily email limit for workflows. For more information, see Daily Allocations for Email Alerts in Salesforce Help.
When invoking an Apex action using the POST method and supplying the inputs in the request, only the following primitive types are supported as inputs:
- Blob
- Boolean
- Date
- Datetime
- Decimal
- Double
- ID
- Integer
- Long
- String
- Time
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 Invocable Method annotation from the Apex class, a runtime error in the flow occurs.
When a flow user invokes an autolaunched flow, the active flow version runs. If there’s no active version, the latest version runs. When a flow admin invokes a flow, the latest version always runs.
If any of these elements are used in a flow, packageable components that reference the elements aren’t automatically included in the package.
- Apex action
- Email alerts
- Post to Chatter core action
- Quick Action core action
- Send Email core action
- Submit for Approval core action
For example, if you use an email alert, manually add the email template that’s used by that email alert. To deploy the package successfully, manually add those referenced components to the package.
For more information about actions, see the Actions Developer Guide.
Syntax
Formats
HTTP Methods
Authentication
Request parameters
Example
Example Request
1curl https://MyDomainName.my.salesforce.com/services/data/v66.0/actions/custom -H "Authorization: Bearer token"Example Response Body
1{
2 "quickAction" : "/services/data/v66.0/actions/custom/quickAction",
3 "apex" : "/services/data/v66.0/actions/custom/apex",
4 "emailAlert" : "/services/data/v66.0/actions/custom/emailAlert",
5 "flow" : "/services/data/v66.0/actions/custom/flow",
6 "sendNotification" : "/services/data/v66.0/actions/custom/sendNotification",
7 "generatePromptResponse" : "/services/data/v60.0/actions/custom/generatePromptResponse"
8 }