ConnectApi.ActionLinkDefinitionInput
Usage
The available context variables are:
| 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. |
| Property | Type | Description | Required or Optional | Available Version |
|---|---|---|---|---|
| actionType | ConnectApi.ActionLinkType | Defines the type of action link. Values are:
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. Invoking ApiAsync action links from an app requires a call to set the status. However, there isn’t currently a way to set the status of an action link using Apex. To set the status, use Connect REST API. See the Action Link resource in the Connect REST API Developer Guidefor more information. |
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://. Tip: To avoid issues due to upgrades or changing functionality in your API, we recommend using a versioned API for actionUrl, for example, https://www.example.com/api/v1/exampleResource. If your API isn’t versioned, you can use the expirationDate property of the ConnectApi.ActionLinkGroupDefinitionInput class to avoid issues due to upgrades or changing functionality in your API. | 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 | List<ConnectApi.RequestHeaderInput> | The request headers for the Api and ApiAsync action link types. | 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 | ConnectApi.HttpRequestMethod | One of these HTTP methods:
|
Required Can be defined in an action link template. |
33.0 |
| requestBody | String | The request body for Api action links. Escape quotation mark characters in the requestBody value. | 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 |