BotBlock

Represents the configuration details for a specific Einstein Bot block, including dialogs and variables.

Where possible, we changed noninclusive terms to align with our company value of Equality. We maintained certain terms to avoid any effect on customer implementations.

Important

Parent Type 

This type extends Metadata and inherits its fields.

File Suffix and Directory Location 

BotBlock components have the suffix .botBlock and are stored in the botBlocks folder.

Version 

Introduced in API version 58.0.

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 

botBlockVersions 

  • Type: BotBlockVersion[]
  • Required: No
  • Description: The configuration details for specific Einstein Bot block versions, including dialogs and variables.

description 

  • Type: string
  • Required: No
  • Description: A description of the bot block.

icon 

  • Type: string
  • Required: No

masterLabel 

  • Type: string

  • Required: Yes

  • Description: Required.

    A user-friendly label for BotBlock, which is defined when the block is created.

richContentEnabled 

  • Type: boolean
  • Required: No
  • Description: Indicates whether the block is available for enhanced bots (true) or for only standard bots (false). The default is false.

BotBlockVersion Type 

Represents the configuration details for an Einstein Bot block version, including dialogs and variables.

Parent Type 

This type extends Metadata and inherits its fields.

Fields 

botDialogs 

  • Type: BotDialog[]
  • Required: No
  • Description: The list of dialogs in this bot block.

conversationGoals 

conversationLanguages 

  • Type: string

  • Required: Yes

  • Description: Required.

    Specifies the language of the bot block.

conversationVariables 

  • Type: ConversationVariable[]
  • Required: No
  • Introduced: API version 44.0
  • Description: A container that stores a specific piece of data collected from the customer. You can use variables within dialog actions as both inputs and outputs.

description 

  • Type: string
  • Required: No
  • Description: A description of the bot block.

mlDomain 

  • Type: LocalMlDomain

  • Required: Yes

  • Description: Required.

    The Einstein Intent Set that groups intents, entities, and variables associated with a block.

permissionSet 

  • Type: string
  • Required: No
  • Introduced: API version 59.0
  • Description: The permission set associated with the bot block.

status 

  • Type: ConvDefBlockVersionStatus (enumeration of type string)

  • Required: Yes

  • Description: Required.

    Indicates whether a block is published or is a draft.

    Values are:

  • Possible values:

    • Published

BotDialog Type 

Fields 

botDialogGroup 

  • Type: string
  • Required: No

botSteps 

description 

  • Type: string
  • Required: No
  • Description: A description of this component. The description should explain the component’s purpose and behavior so that administrators and developers understand when to use it.

developerName 

  • Type: string
  • Required: Yes
  • Description: The unique developer name of this component. Used as an API reference and must follow Salesforce identifier rules.

isPlaceholderDialog 

  • Type: boolean
  • Required: No

label 

  • Type: string
  • Required: Yes
  • Description: The label that identifies this component in the Salesforce UI and in metadata listings. Character limits and translation behavior follow the enclosing type.

mlIntent 

  • Type: string
  • Required: No

mlIntentTrainingEnabled 

  • Type: boolean
  • Required: No

showInFooterMenu 

  • Type: boolean
  • Required: No

ConversationVariable Type 

Fields 

collectionType 

  • Type: ConversationVariableCollectionType (enumeration of type string)
  • Required: No

dataType 

  • Type: ConversationDataType (enumeration of type string)
  • Required: Yes

description 

  • Type: string
  • Required: No
  • Description: A description of this component. The description should explain the component’s purpose and behavior so that administrators and developers understand when to use it.

developerName 

  • Type: string
  • Required: Yes
  • Description: The unique developer name of this component. Used as an API reference and must follow Salesforce identifier rules.

includeInPrompt 

  • Type: boolean
  • Required: No

label 

  • Type: string
  • Required: Yes
  • Description: The label that identifies this component in the Salesforce UI and in metadata listings. Character limits and translation behavior follow the enclosing type.

SObjectType 

  • Type: string
  • Required: No

visibility 

  • Type: ConversationVariableVisibilityType (enumeration of type string)
  • Required: No

SynonymGroup Type 

Represents a group of synonymous words or phrases.

Fields 

languages 

  • Type: Language (enumeration of type string)[]
  • Required: No

terms 

  • Type: string[]
  • Required: No

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 &quot;End Chat&quot; 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&apos;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&apos;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.