Newer Version Available
Invoking Actions
Most actions are invoked using the same JSON body format. The top-level JSON key name must be inputs.
The following example request shows two Chatter posts made with a single Post to Chatter action.
1POST /services/data/vXX.X/actions/standard/chatterPost
2
3{ "inputs" :
4 [
5 {
6 "subjectNameOrId" : "jsmith@salesforce.com",
7 "type" : "user",
8 "text" : "first chatter post!"
9 },
10 {
11 "subjectNameOrId" : "hsmith@salesforce.com",
12 "type" : "user",
13 "text" : "second chatter post!"
14 }
15 ]
16}Here is the response.
1[ {
2 "actionName" : "chatterPost",
3 "errors" : null,
4 "isSuccess" : true,
5 "outputValues" : {
6 "feedItemId" : "0D5D0000000kynqKBA"
7 }
8}, {
9 "actionName" : "chatterPost",
10 "errors" : null,
11 "isSuccess" : true,
12 "outputValues" : {
13 "feedItemId" : "0D5D0000000kynrKBz"
14 }
15} ]
Standard actions return their name in actionName. The value of actionName varies for custom actions.
| Action | actionName value |
|---|---|
| Flow | The flow name |
| Apex | The class’s invocable method name |
| Quick action |
<object name>.<quick action
name> For a global quick action, there’s no <object name>. prefix. |
| Email alert | <object name>.<email alert name> |