Newer Version Available

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

RecordActionDeployment

Represents configuration settings for the Actions & Recommendations component. For example, you can have a deployment that specifies which types of actions to display, default actions for channels, and the actions that users can add at runtime. If the component shows Next Best Action recommendations, the deployment configures which strategies to use and how recommendations appear. This type extends the Metadata metadata type and inherits its fullName field.

File Suffix and Directory Location

RecordActionDeployment values are stored in the developer_name.deployment file in the recordActionDeployments directory.

We don’t recommend programmatically changing the API name of a RecordActionDeployment.

Note

Version

RecordActionDeployment is available in API version 45.0 and later.

Fields

Field Name Field Type Description
channelConfigurations RecordActionDeploymentChannel Specifies configuration settings for different channels in an Actions & Recommendations deployment.
deploymentContexts RecordActionDeploymentContext Specifies the object context for quick actions and Next Best Action strategies. Available in API version 46.0 and later.
hasGuidedActions boolean Specifies that the component shows standard actions; for example, flows and quick actions. Available in API version 46.0 and later.
hasRecommendations boolean Specifies that the component shows recommendations from a Next Best Action strategy. Available in API version 46.0 and later.
masterLabel string Required. Specifies the name of the deployment.
recommendation RecordActionRecommendation Specifies settings for how Next Best Action recommendations appear in the component. Available in API version 46.0 and later.
selectableItems RecordActionSelectableItem Specifies the actions that users can add at runtime.
shouldLaunchActionOnReject boolean Required. If true, launch the flow when the recommendation is rejected
 by the agent. Available in API version 48.0 and later.

RecordActionDefaultItem

Represents actions and attributes specified as channel defaults in a deployment.

Field Name Field Type Description
action string Required. Specifies the API name of an action. For example, the API name of a flow, such as Verify_Information.
isMandatory boolean Specifies whether the action is marked as mandatory. The default value is false.
isUiRemoveHidden boolean Specifies whether the remove option is hidden in the UI. The default value is false. If true, the UI hides the ability to remove the action from the list.
pinned PinnedAction (enumeration of type string) Required. Indicates whether the action is pinned to the Top or Bottom, or unpinned (None). The default value is None.
position int Required. Indicates the order of the action among all actions associated with this record.
type RecordActionType (enumeration of type string) Required. The type of action that’s associated with the record. Valid values are:
  • Flow
  • QuickAction (Available in API version 46.0 and later.)

RecordActionDeploymentChannel

Specifies channel-specific defaults to show in the Actions & Recommendations component. The component displays the channel defaults when the list is otherwise empty.

Field Name Field Type Description
channel ChannelSource (enumeration of type string) Required. Specifies the channel. Valid values are Phone, Chat, or Default.
channelItems RecordActionDefaultItem Specifies default actions for a channel and attributes for each action, such as whether the action is pinned to the list top or bottom or whether an action is considered mandatory.
isAutopopEnabled boolean Specifies whether the first action in the list is launched when the record page opens. If true, the first action is launched. The default value is false.

RecordActionDeploymentContext

Specifies an object that provides context for quick actions and Next Best Action strategies. When the component appears on this type of page, it includes object-specific quick actions and uses an object-specific strategy to filter recommendations. Available in API version 46.0 and later.

We support a maximum of 10 objects that provide context within a deployment.

Note

Field Name Field Type Description
entityName string Required. Specifies the API name of an object to use as context.
recommendationStrategy string Specifies the API name of a Next Best Action strategy that overrides the default strategy on this page. A strategy is a metadata type RecommendationStrategy.

RecordActionRecommendation

Specifies settings to display Next Best Action recommendations in the component. Available in API version 46.0 and later.

Field Name Field Type Description
defaultStrategy string Specifies the API name of the default Next Best Action strategy, which is a metadata type RecommendationStrategy.
hasDescription boolean Required. If true, display the description for the recommendation.
hasImage boolean Required. If true, display the image for the recommendation.
hasRejectAction boolean Required. If true, display the label that the user clicks to reject the recommendation.
hasTitle boolean Required. If true, display the title for the recommendation.
maxDisplayRecommendations int Required. Specifies the maximum number of recommendations to display. Valid values are 1–4.

RecordActionSelectableItem

Represents the set of actions available for users to add to the component at runtime.

Field Name Field Type Description
action string Required. Specifies the API name of an action. For example, the API name of a flow, such as Verify_Information.
type RecordActionType (enumeration of type string) Required. The type of action that’s associated with the record. Valid values are:
  • Flow
  • QuickAction (Available in API version 46.0 and later.)

Wildcard Support in the Manifest File

This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.

Declarative Metadata Sample Definition

The following is a sample of a recordActionDeployment file.

1<RecordActionDeployment xmlns="http://soap.sforce.com/2006/04/metadata">
2    <channelConfigurations>
3        <channel>Phone</channel>
4        <channelItems>
5            <action>Sample_Flow</action>
6            <isMandatory>false</isMandatory>
7            <isUiRemoveHidden>false</isUiRemoveHidden>
8            <position>1</position>
9            <pinned>Top</pinned>
10            <type>Flow</type>
11        </channelItems>
12        <channelItems>
13            <action>Another_Sample_Flow</action>
14            <isMandatory>false</isMandatory>
15            <isUiRemoveHidden>true</isUiRemoveHidden>
16            <position>2</position>
17            <pinned>Top</pinned>
18            <type>Flow</type>
19        </channelItems>
20        <isAutopopEnabled>true</isAutopopEnabled>
21    </channelConfigurations>
22    <masterLabel>Sample Deployment</masterLabel>
23    <selectableItems>
24        <action>Sample_Flow</action>
25        <type>Flow</type>
26    </selectableItems>
27    <selectableItems>
28        <action>Sample_Flow_2</action>
29        <type>Flow</type>
30    </selectableItems>
31    <hasGuidedActions>true</hasGuidedActions>
32    <hasRecommendations>true</hasRecommendations>
33    <recommendation>
34        <defaultStrategy>Sample_Global_Strategy</defaultStrategy>
35        <maxDisplayRecommendations>4</maxDisplayRecommendations>
36        <hasImage>true</hasImage>
37        <hasDescription>true</hasDescription>
38        <hasRejectAction>true</hasRejectAction>
39        <hasTitle>true</hasTitle>
40    </recommendation>
41    <deploymentContexts>
42        <entityName>Case</entityName>
43        <recommendationStrategy>Sample_Case_Strategy</recommendationStrategy>
44    </deploymentContexts>
45    <deploymentContexts>
46        <entityName>Account</entityName>
47        <recommendationStrategy>Sample_Acc_Strategy</recommendationStrategy>
48    </deploymentContexts>
49</RecordActionDeployment>

The following is an example package.xml that references the previous definition.

1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3    <fullName>SecondTest</fullName>
4    <types>
5        <members>Sample_Flow</members>
6        <members>Another_Sample_Flow</members>
7        <members>Sample_Flow_2</members>
8        <name>Flow</name>
9    </types>
10    <types>
11        <members>SampleDeployment</members>
12        <name>RecordActionDeployment</name>
13    </types>
14    <version>45.0</version>
15</Package>