Newer Version Available
Update the Status of an Action Link or Invoke an Action Link
- Usage
- Use this resource to update the status property of an action link. To invoke an Api or an ApiAsync action link, set the status to PendingStatus. 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.
-
Different types of action links have different status workflows:
- Api
- To invoke an Api action link from an app, make a PATCH request to mark the link PendingStatus. 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 SuccessfulStatus or FailedStatus based on the HTTP status code returned by your server.
- ApiAsync
- To invoke this action from an app, make a PATCH request to mark the link PendingStatus. 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 PendingStatus unless the call returned an error status code, in which case it sets status to FailedStatus. When your server has finished the asynchronous processing it should call back and PATCH the action link to SuccessfulStatus or FailedStatus.
- Download and Ui
- Direct the user to download or visit the UI from the link in the actionUrl of the Platform Action response body. Your application must decide when to make a PATCH request to set status to SuccessfulStatus or FailedStatus.
- Resource
- /connect/action-links/actionLinkId
- HTTP method
- PATCH
- Request body
- Action Link Input
- Request parameter
- status
- Request body example
-
1{ "status":"SuccessfulStatus" } - Request parameter example
-
1/services/data/v36.0/connect/action-links/actionLinkId?status=SuccessfulStatus - Returns
- Platform Action