RecordActionDeployment configures the Actions & Recommendations, Action Launcher, and Bulk Action Panel components. It controls which categories of actions appear, channel-specific defaults, actions users can add at runtime, and the strategies and presentation used for Next Best Action recommendations.
A deployment references action implementations and recommendation strategies; it does not contain their logic. Its action lists control placement and availability, not a workflow execution sequence. However, settings can launch an action automatically when a record page opens or when a user rejects a recommendation.
Key Elements
| Element | What the Element Controls |
|---|---|
componentName |
Identifies the component: ActionsAndRecommendations, ActionLauncher, or BulkActionPanel. |
channelConfigurations |
Defines defaults for Actions & Recommendations. Its required channel identifies the channel. Salesforce documents Phone, Chat, and Default; see the enumeration discrepancy below. |
action |
Required API name of an action in either channelItems or selectableItems. Interpret it together with the sibling type. |
type |
Required action category. Salesforce documents Flow, QuickAction, OmniScript, LWC, SvcCatalogItemDef, and WebLink. The exposed enumeration differs in its OmniScript spelling. |
isAutopopEnabled |
Within a channel configuration, launches the first action when the record page opens if true. Defaults to false. |
position |
Required order of a channel-default action among the actions associated with the record. |
pinned |
Required placement setting for a channel-default action: Top, Bottom, or None. Defaults to None. |
isMandatory |
Marks a channel-default action as mandatory. Defaults to false; it is separate from hiding the removal option. |
isUiRemoveHidden |
Hides the UI option for removing a channel-default action when true. Defaults to false. |
selectableItems |
Defines actions users can add at runtime, rather than channel defaults. Each entry identifies an action by action and type. |
deploymentContexts |
Defines object-page context for quick actions and recommendations. Each entry requires the object's API name in entityName and can specify an overriding recommendationStrategy. A deployment supports at most 10 object contexts. |
defaultStrategy |
Within recommendation, identifies the default Next Best Action strategy by API name. An applicable object-specific strategy can override it. |
maxDisplayRecommendations |
Required within recommendation. Accepts 1 through 4 and limits how many recommendations appear, not how many a strategy can produce. |
hasRejectAction |
Required within recommendation. Controls whether the user sees the label used to reject a recommendation. |
shouldLaunchActionOnReject |
Launches the recommendation's flow on rejection when true. Salesforce documents it as required at the deployment level, but its nesting differs in the exposed schema. |
Behavior and Constraints
Content switches select what the component shows. hasGuidedActions enables standard actions such as flows and quick actions. hasRecommendations enables recommendations from a Next Best Action strategy. hasOmniscripts includes OmniScripts and defaults to false. hasComponents indicates whether the deployment includes components.
Channel defaults only fill an otherwise empty list. The channelItems entries under channelConfigurations are defaults for Actions & Recommendations. They do not unconditionally replace an existing action list.
For each channel-default action, position controls order and pinned controls top, bottom, or unpinned placement. Neither setting defines an execution sequence. Placement does affect launch behavior when isAutopopEnabled is true, because opening the record page launches the first action.
Mandatory marking and removal visibility are independent. isMandatory marks the action as mandatory; isUiRemoveHidden hides the removal option. Setting one does not describe the other, and both default to false.
Runtime choices are separate from defaults. selectableItems determines which actions users can add while using the component. Within these entries, isFrequentAction and frequentActionSequenceNbr apply only to Action Launcher. They identify frequently used actions and their displayed sequence.
Object context can change recommendation behavior. When hasRecommendations is enabled, recommendation configures presentation and the default strategy. A matching deploymentContexts entry supplies object-specific quick actions and can override recommendation.defaultStrategy through recommendationStrategy. That object-specific strategy filters recommendations for the page's context.
A deployment supports a maximum of 10 object contexts. Each context uses the object's API name in entityName. Inspecting only the default strategy is therefore insufficient to determine which strategy an object's page uses.
Recommendation display and rejection behavior are separate controls. Within recommendation, the required booleans hasDescription, hasImage, and hasTitle control those visible details. maxDisplayRecommendations limits the displayed results to between one and four; it does not limit the strategy's output.
recommendation.hasRejectAction controls the visible rejection label. shouldLaunchActionOnReject controls whether rejection launches the recommendation's flow. Rejection can therefore execute an action rather than merely dismiss a suggestion.
Deployment and Retrieval
RecordActionDeployment values are stored as developer_name.deployment files in the recordActionDeployments directory. The deployment inherits fullName as its metadata identity. Its required masterLabel is the deployment's name label, not a replacement for that identity. Salesforce recommends against programmatically changing a RecordActionDeployment API name.
In package.xml, use RecordActionDeployment as the type name and the deployment's API name as the member. The type supports the wildcard member *, so a retrieval manifest can request all deployments.
Actions and strategies remain separate definitions. For example, referenced flows are Flow members, not embedded flow definitions inside the deployment file. An action reference requires both its API name in action and its category in type; the name alone does not identify which kind of implementation is intended.
When diagnosing serialization differences, preserve exact enumeration spelling and element scope. In particular, do not silently replace Default with Other, change OmniScript to Omniscript, or move shouldLaunchActionOnReject between the deployment and recommendation. These differences are described below.
Relationships
Action references occur in both channelConfigurations.channelItems and selectableItems. The sibling type determines the action category; LWC corresponds to the LightningWebComponent association. Recommendation strategies are referenced separately from actions, while entityName supplies the object-context connection.
References
-
CustomObject:entityName. -
Flow:action. -
LightningWebComponent:action, with action typeLWC. -
OmniScript:action. -
QuickAction:action. -
RecommendationStrategy:defaultStrategy,recommendationStrategy. -
SvcCatalogItemDef:action. -
WebLink:action.
Documentation Inconsistencies
Three differences affect how the definition is interpreted and serialized:
-
Channel values: Salesforce documents
Phone,Chat, andDefault. The exposedchannelenumeration listsChat,Other, andPhone. Do not assumeDefaultandOtherare interchangeable. -
OmniScript spelling: Salesforce documents the action type value
OmniScript, while the exposed enumeration usesOmniscript. The other exposed values areFlow,LWC,QuickAction,SvcCatalogItemDef, andWebLink. -
Rejection-setting scope: Salesforce documents required
shouldLaunchActionOnRejectat theRecordActionDeploymentlevel. The exposed schema places it insiderecommendation. This is a nesting discrepancy, not a difference in the documented behavior:truelaunches the flow when the recommendation is rejected.
Reported Issues
-
Direct Apex queries may not provide an inspection route. A 2021 community report listed
RecordActionDeploymentamong Tooling API objects that were unavailable in the ApexSchemanamespace and could not be queried directly with Apex SOQL, Salesforce's object query language. This was a report about Apex query availability, not a Metadata API retrieval failure. See the Apex query availability discussion.
Common Questions
Why aren't my channel default actions appearing?
Actions & Recommendations displays channelConfigurations.channelItems defaults when the action list is otherwise empty. Those defaults do not unconditionally replace an existing list.
How do I stop an action from launching when a record page opens?
Set the applicable channel configuration's isAutopopEnabled to false, which is also its default. When it is true, opening the page launches the first action in the list.
Why does an object page use a different Next Best Action strategy?
A matching deploymentContexts entry can override recommendation.defaultStrategy through recommendationStrategy. Check the entry whose entityName matches the object's API name.
Does rejecting a recommendation only dismiss it?
Not necessarily. hasRejectAction controls the visible rejection label, while shouldLaunchActionOnReject controls whether rejection launches the recommendation's flow.
How do I retrieve all RecordActionDeployment definitions?
Use RecordActionDeployment as the type name and * as the member in package.xml. The definitions are stored in the recordActionDeployments directory with the .deployment suffix.