Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.
BotBlock
Parent Type
File Suffix and Directory Location
BotBlock components have the suffix .botBlock and are stored in the botBlocks folder.
Version
BotBlock components are available in API version 58.0 and later.
Special Access Rules
BotBlock is available only if Chat and Einstein Bots are enabled in your org.
Bot metadata deployment and retrieval are not supported for Lead Nurturing and Sales Coach Agents.
Fields
| Field Name | Description |
|---|---|
| botBlockVersions |
|
| description |
|
| masterLabel |
|
| richContentEnabled |
|
BotBlockVersion
Represents the configuration details for an Einstein Bot block version, including dialogs and variables.
| Field Name | Description |
|---|---|
| botDialogs |
|
| conversationGoals |
|
| conversationLanguages |
|
| conversationVariables |
|
| description |
|
| mlDomain |
|
| permissionSet |
|
| status |
|
Declarative Metadata Sample Definition
The following is an example of a BotBlock component.
1<?xml version="1.0" encoding="UTF-8"?>
2<BotBlock xmlns="http://soap.sforce.com/2006/04/metadata">
3 <access xsi:nil="true"/>
4 <botBlockVersions>
5 <fullName>Published</fullName>
6 <botDialogs>
7 <developerName>Test_Dialog_1646070168572</developerName>
8 <label>Test_Dialog_1646070168572</label>
9 <showInFooterMenu>false</showInFooterMenu>
10 </botDialogs>
11 <botDialogs>
12 <developerName>Test_Dialog_1646070168926</developerName>
13 <label>Test_Dialog_1646070168926</label>
14 <showInFooterMenu>false</showInFooterMenu>
15 </botDialogs>
16 <botDialogs>
17 <botSteps>
18 <stepIdentifier>s4</stepIdentifier>
19 <type>Wait</type>
20 </botSteps>
21 <developerName>Main_Menu</developerName>
22 <label>Main Menu</label>
23 <mlIntent>Main_Menu</mlIntent>
24 <showInFooterMenu>false</showInFooterMenu>
25 </botDialogs>
26 <botDialogs>
27 <botSteps>
28 <botMessages>
29 <message>Goodbye! Click the "End Chat" button to end this chat</message>
30 <messageIdentifier>m2</messageIdentifier>
31 </botMessages>
32 <stepIdentifier>s6</stepIdentifier>
33 <type>Message</type>
34 </botSteps>
35 <botSteps>
36 <stepIdentifier>s7</stepIdentifier>
37 <type>Wait</type>
38 </botSteps>
39 <developerName>End_Chat</developerName>
40 <label>End Chat</label>
41 <mlIntent>End_Chat</mlIntent>
42 <showInFooterMenu>false</showInFooterMenu>
43 </botDialogs>
44 <botDialogs>
45 <botSteps>
46 <botMessages>
47 <message>Unfortunately, there are no agents available at the moment</message>
48 <messageIdentifier>m3</messageIdentifier>
49 </botMessages>
50 <stepIdentifier>s8</stepIdentifier>
51 <type>Message</type>
52 </botSteps>
53 <botSteps>
54 <stepIdentifier>s9</stepIdentifier>
55 <type>Wait</type>
56 </botSteps>
57 <developerName>No_Agent_Available</developerName>
58 <label>No Agent</label>
59 <showInFooterMenu>false</showInFooterMenu>
60 </botDialogs>
61 <botDialogs>
62 <botSteps>
63 <botMessages>
64 <message>Hi! I'm your helpful bot.</message>
65 <messageIdentifier>m1</messageIdentifier>
66 </botMessages>
67 <stepIdentifier>s1</stepIdentifier>
68 <type>Message</type>
69 </botSteps>
70 <botSteps>
71 <conversationRecordLookup>
72 <SObjectType>Account</SObjectType>
73 <conditions>
74 <leftOperand>Account.Phone</leftOperand>
75 <operatorType>Equal</operatorType>
76 <rightOperandValue>Value</rightOperandValue>
77 <sortOrder>0</sortOrder>
78 </conditions>
79 <lookupFields>
80 <fieldName>Account.Phone</fieldName>
81 </lookupFields>
82 <lookupFields>
83 <fieldName>Account.OwnerId</fieldName>
84 </lookupFields>
85 <maxLookupResults>1</maxLookupResults>
86 <sourceVariableName>_LastCustomerInput</sourceVariableName>
87 <sourceVariableType>ConversationVariable</sourceVariableType>
88 <targetVariableName>MyCustomVariable</targetVariableName>
89 </conversationRecordLookup>
90 <stepIdentifier>s2</stepIdentifier>
91 <type>RecordLookup</type>
92 </botSteps>
93 <botSteps>
94 <botNavigation>
95 <botNavigationLinks>
96 <targetBotDialog>Main_Menu</targetBotDialog>
97 <targetVariable xsi:nil="true"/>
98 <targetVariableType xsi:nil="true"/>
99 </botNavigationLinks>
100 <type>Redirect</type>
101 </botNavigation>
102 <stepIdentifier>s3</stepIdentifier>
103 <type>Navigation</type>
104 </botSteps>
105 <developerName>Welcome</developerName>
106 <label>Welcome</label>
107 <mlIntent>Welcome</mlIntent>
108 <showInFooterMenu>false</showInFooterMenu>
109 </botDialogs>
110 <conversationLanguages>en_US</conversationLanguages>
111 <conversationVariables>
112 <dataType>Text</dataType>
113 <developerName>TestVariableABC</developerName>
114 <label>TestVariableABC</label>
115 </conversationVariables>
116 <conversationVariables>
117 <dataType>Text</dataType>
118 <developerName>TestVariableXYZ</developerName>
119 <label>TestVariableXYZ</label>
120 </conversationVariables>
121 <conversationVariables>
122 <collectionType>List</collectionType>
123 <dataType>Object</dataType>
124 <developerName>MyCustomVariable</developerName>
125 <label>MyCustomVariable</label>
126 </conversationVariables>
127 <description>Created for testing.</description>
128 <mlDomain>
129 <label>vPub</label>
130 <mlIntents>
131 <developerName>End_Chat</developerName>
132 <label>End Chat</label>
133 <mlIntentUtterances>
134 <language>es</language>
135 <utterance>Utterance1</utterance>
136 </mlIntentUtterances>
137 <mlIntentUtterances>
138 <language>es</language>
139 <utterance>Utterance2</utterance>
140 </mlIntentUtterances>
141 <mlIntentUtterances>
142 <language>es</language>
143 <utterance>Utterance3</utterance>
144 </mlIntentUtterances>
145 </mlIntents>
146 <mlIntents>
147 <description>Main Menu Intent</description>
148 <developerName>Main_Menu</developerName>
149 <label>Main Menu</label>
150 </mlIntents>
151 <mlIntents>
152 <description>Welcome Intent</description>
153 <developerName>Welcome</developerName>
154 <label>Welcome</label>
155 </mlIntents>
156 <name>blockDevName0001_vPub</name>
157 </mlDomain>
158 <status>Published</status>
159 </botBlockVersions>
160 <description>Collects the user's first name, last name, email address, phone number, and company name.</description>
161 <masterLabel>User Info Collection Block</masterLabel>
162 <richContentEnabled>true</richContentEnabled>
163</BotBlock>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 <types>
4 <members>AgentTransfer</members>
5 <name>BotBlock</name>
6 </types>
7 <version>58.0</version>
8</Package>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.