Newer Version Available

This content describes an older version of this product. View Latest

Invoking Actions

All actions are invoked using the same JSON body format. The following example request shows two Chatter posts made with a single Post to Chatter action.

1{ "inputs" :
2  [
3  {
4    "subjectNameOrId" : "jsmith@salesforce.com",
5    "type" : "user",
6    "text" : "first chatter post!"
7  },
8  {
9    "subjectNameOrId" : "hsmith@salesforce.com",
10    "type" : "user",
11    "text" : "second chatter post!"
12  }
13  ]
14}

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>