Newer Version Available
Action Link Definition Input
Usage
| Context Variable | Description |
|---|---|
| {!actionLinkId} | The ID of the action link the user executed. |
| {!actionLinkGroupId} | The ID of the action link group containing the action link the user executed. |
| {!communityId} | The ID of the site in which the user executed the action link. The value for your internal org is the empty key "000000000000000000". |
| {!communityUrl} | The URL of the site in which the user executed the action link. The value for your internal org is empty string "". |
| {!orgId} | The ID of the org in which the user executed the action link. |
| {!userId} | The ID of the user that executed the action link. |
- Root XML tag
- <actionLinkDefinition>
- JSON example
- This example doesn’t use a
template:
1{ 2 "actionType":"Api", 3 "actionUrl":"/services/data/v53.0/chatter/feed-elements", 4 "groupDefault":"true", 5 "labelKey":"Post", 6 "method":"Post", 7 "requiresConfirmation":"true", 8 "requestBody":"{\"subjectId\": \"me\",\"feedElementType\": \"FeedItem\",\"body\": {\"messageSegments\": [{\"type\": \"Text\",\"text\": \"Testing a post created via an API action link.\"}]}}", 9 "headers":[ 10 { 11 "name":"Content-Type", "value":"application/json" 12 }] 13} - This example uses a
template:
1{ 2 "templateId":"07gD00000004C9r", 3 "templateBindings":[ 4 { 5 "key":"Bindings.version", 6 "value":"v33.0" 7 } 8 ] 9} - Properties
-
Name Type Description Required or Optional Available Version actionType String Defines the type of action link. Values are: - Api—The action link calls a synchronous API at the action URL. Salesforce sets the status to SuccessfulStatus or FailedStatus based on the HTTP status code returned by your server.
- ApiAsync—The action link calls an asynchronous API at the action URL. The action remains in a PendingStatus state until a third party makes a request to /connect/action-links/actionLinkId to set the status to SuccessfulStatus or FailedStatus when the asynchronous operation is complete.
- Download—The action link downloads a file from the action URL.
- Ui—The action link takes the user to a web page at the action URL.
Use Ui if you need to load a page before the user performs an action, for example, to have the user provide input or view something before the action happens.
Required Can be defined in an action link template.
33.0 actionUrl String The action link URL. For example, a Ui action link URL is a Web page. A Download action link URL is a link to the file to download. Ui and Download action link URLs are provided to clients. An Api or ApiAsync action link URL is a REST resource. Api and ApiAsync action link URLs aren’t provided to clients. Links to Salesforce can be relative. All other links must be absolute and start with https://. Required Can be defined in an action link template.
33.0 excludedUserId String ID of a single user to exclude from performing the action. If you specify an excludedUserId, you can’t specify a userId. Optional Can be defined in an action link template using the User Visibility and Custom User Alias fields.
33.0 groupDefault Boolean true if this action is the default action link in the action link group; false otherwise. There can be only one default action link per action link group. The default action link gets distinct styling in the Salesforce UI. Optional Can be defined in an action link template.
33.0 headers Request Header Input[] The request headers for the Api and ApiAsync action link types. See Authentication.
Optional Can be defined in an action link template.
33.0 labelKey String Key for the set of labels to show in the user interface. A set includes labels for these states: NewStatus, PendingStatus, SuccessStatus, FailedStatus. For example, if you use the Approve key, you get these labels: Approve, Pending, Approved, Failed. For a complete list of keys and labels, see Action Links Labels.
If none of the predefined labels work for your action link, use a custom label. To use a custom label, create an action link template. See Create Action Link Templates.
Required Can be defined in an action link template.
33.0 method String One of these HTTP methods: - HttpDelete—Returns HTTP 204 on success. Response body or output class is empty.
- HttpGet—Returns HTTP 200 on success.
- HttpHead—Returns HTTP 200 on success. Response body or output class is empty.
- HttpPatch—Returns HTTP 200 on success or HTTP 204 if the response body or output class is empty.
- HttpPost—Returns HTTP 201 on success or HTTP 204 if the response body or output class is empty. Exceptions are the batch posting resources and methods, which return HTTP 200 on success.
- HttpPut—Return HTTP 200 on success or HTTP 204 if the response body or output class is empty.
Required Can be defined in an action link template.
33.0 requestBody String The request body for Api and ApiAsync action link types. Optional Can be defined in an action link template.
33.0 requiresConfirmation Boolean true to require the user to confirm the action; false otherwise. Required Can be defined in an action link template.
33.0 userId String The ID of the user who can execute the action. If not specified or null, any user can execute the action. If you specify a userId, you can’t specify an excludedUserId. Optional Can be defined in an action link template using the User Visibility and Custom User Alias fields.
33.0