Newer Version Available

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

Action Link

Get information about or update the status of an action link.

Action Links are currently available to select customers through a pilot program. To be nominated to join this pilot program, contact salesforce.com. Additional terms and conditions may apply to participate in the pilot program. Please note that pilot programs are subject to change, and as such, we cannot guarantee acceptance into this pilot program or a particular time frame in which this feature can be enabled. Any unreleased services or features referenced in this document, press releases, or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make their purchase decisions based upon features that are currently available.

Note

This image shows two action links. The status of the action link in combination with the labelKey of the Action Link Definition Input determine the text that displays in the UI. In this image, the status of both action links is New.Action links in the UI

If Pam Smith clicks Confirm, the action link status is set to Successful and results in the feed item shown in this image.Status message in the UI

Different types of action links have different workflows to set the status:
Api
Platform Action response bodies for Api action links don’t include the actionUrl that was provided in the Action Link Definition Input. If you want to invoke an Api action link from an app, make a PATCH request to mark the link Pending. Salesforce handles the call out to the actionUrl that was provided in the Action Link Definition Input. For an Api action link, Salesforce sets the status to Successful or Failed based on the HTTP status code returned by your server.
ApiAsync
Platform Action response bodies for ApiAsync action links don’t include the actionUrl that was provided in the Action Link Definition Input. If you want to invoke this action from an app, make a PATCH request to mark the link Pending. Salesforce handles the call out to the actionUrl that was provided in the Action Link Definition Input. For an ApiAsync action link, the callout starts an asynchronous operation on your server. Salesforce sets status to Pending unless the call returned an error status code, in which case it sets status to Failed. When your server has finished the asynchronous processing it should call back and PATCH the action link to Successful or Failed.
Download and Ui
Platform Action response bodies for Download and Ui action links include the actionUrl that was provided in the Action Link Definition Input. Your app can direct the user to download or visit the UI from that link. If your application decides to stop exposing that link, make a PATCH request to set status to Successful.

You can’t PATCH the status of an action link:

  • Back to New from a different status.
  • From a terminal status (Failed or Successful) to New or Pending.
  • When the action link belongs to an action link group whose executionsAllowed property is Unlimited.
  • For an Api or ApiAsync action link whose executionsAllowed property is Once, when a user PATCHes the status to Pending for the first time, the callout is made to the action link. If the same user PATCHes it to Pending again, Salesforce returns the current action link information. However, if another user PATCHes the status to Pending, Salesforce throws an error. In both cases, the callout to the action link is not resent.

Note

Resource
1/connect/action-links/actionLinkId
Available since release
31.0
Requires Chatter
No
HTTP methods
GET, PATCH, HEAD
Request body for PATCH
Root XML tag
<actionLink>
JSON example
1{  "status" : "Successful"  }
Properties
Name Type Description Required or Optional Available Version
status String The current status of the action. Values are:
  • Failed—The action link execution failed.
  • New—The action link is ready to be executed. Available for Download and Ui action links only.
  • Pending—The action link is executing. Choosing this value triggers the API call for Api and ApiAsync action links.
  • Successful—The action link executed successfully.
Required 31.0
Request parameters for PATCH
Name Type Description Available Version
status String Values are:
  • Failed—The action link execution failed.
  • New—The action link is ready to be executed. Available for Download and Ui action links only.
  • Pending—The action link is executing. Choosing this value triggers the API call for Api and ApiAsync action links.
  • Successful—The action link executed successfully.
31.0
Response body for GET or PATCH
Platform Action
Example for PATCH
1PATCH /connect/action-links/0AnRR0000004CTS0A2?status=Failed