Newer Version Available
Action Links
An action link is a button on a feed element. Clicking an action link
can take a user to a Web page, initiate a file download, or invoke an API call to
Salesforce or to an external server. An action link includes a URL and an HTTP
method, and can include a request body and header information, such as an OAuth
token for authentication. Use action links to integrate Salesforce and third-party
services into the feed so that users can take action to drive productivity and
accelerate innovation.
Workflow
This feed item contains one action link group with two action links:
Approve and Reject.
The workflow to create and post action links with a feed element:
- (Optional) Create an action link template.
- Make a request to /connect/action-link-group-definitions to define an action link group or to instantiate an action link group from a template. An action link group contains at least one action link.
- Make a request to /chatter/feed-elements to post a feed element and associate the action link with it.
Action Links Resources
Use these resources to work with action links:
| Resource | HTTP Method | Task |
|---|---|---|
| /connect/action-link-group-definitions | POST | Create an action link group definition. To associate an action link with a feed element, first create an action link group definition. Then post a feed element with an associated actions capability. |
| /chatter/feed-elements | POST | Post a feed element with an associated actions capability. Associate up to 10 action link groups with a feed element. |
| /connect/action-links/actionLinkId | GET, PATCH | Get information about or update the status of an action link. The status of the action link in combination with the labelKey property of the Action Link Definition Input determines the text that displays in the UI. To trigger the API request for Api and ApiAsync action links, set the status to PendingStatus. |
| /connect/action-link-group-definitions/actionLinkGroupId | GET, DELETE | Get information about or delete an action link group definition. Deleting an action link group definition removes all references to it from feed elements. To get or delete the action link group definition, the client must be the same connected app that created the definition and the user must either be the user who created the definition or have View all Data permission. |
| /connect/action-link-groups/actionLinkGroupId | GET | Get information about an action link group including state for the context user. |
| /connect/action-links/actionLinkId/diagnostic-info | GET | Get diagnostic information returned when an action link executes. Diagnostic information is given only for users who can access the action link. |
| /chatter/feed-elements/feedElementId/capabilities/associated-actions | GET | Get all the platform actions associated with a feed element. Action links are a type of platform action. |
|
Feeds Resources /chatter/feeds/feedType/userId/feed-elements /chatter/feeds/feedType/feed-elements |
GET | Get the feed elements of a specified feed type. If a feed element has action links associated with it, the action links data is returned in the associated actions capability. |