Newer Version Available
Bot
Represents a definition of an Einstein Bot configuration that
can have one or more versions. Only one version can be active.
This type extends the Metadata
metadata type and inherits its fullName field.
File Suffix and Directory Location
Bot components have the suffix .bot and are stored in the bot folder.
Version
Bot components are available in API version 43.0 and later.
Special Access Rules
Bot is available only if Live Agent and Einstein Bots are enabled in your org.
Fields
| Field Name | Field Type | Description |
|---|---|---|
| botMlDomain | LocalMlDomain | Represents the Einstein intent set that groups intents, entities, and variables associated with a bot. All Einstein Bot versions under the same bot now share an intent set. Available in API version 44.0 and later. |
| botVersions | BotVersion | Represents the configuration details for a specific Einstein Bots version, including dialogs, intents, entities, and variables. |
| description | string | A description of the bot. |
| label | string | Label that identifies the bot throughout the Salesforce user interface. |
LocalMlDomain
An Einstein Intent Set local to the current bot version.
| Field Name | Field Type | Description |
|---|---|---|
| label | string | Label that represents an Einstein Intent Set local to the current bot version throughout the Salesforce user interface. |
| mlIntents | MlIntent[] | List of intents associated with this local intent set. |
| mlSlotClasses | MlSlotClass[] | List of entities associated with this local intent set. |
| name | string | Required. This unique name prevents conflicts with other local Einstein Intent Sets. This name can contain only underscores and alphanumeric characters and must be unique in your org. It must begin with a letter, not include spaces, not end with an underscore, and not contain two consecutive underscores. |
Declarative Metadata Sample Definition
The following is an example of a Bot. This example has been trimmed to make it easier to read.
1<?xml version="1.0" encoding="UTF-8"?>
2<Bot xmlns="http://soap.sforce.com/2006/04/metadata">
3 <botMlDomain>
4 <label>Astros Pizza</label>
5 <mlIntents>
6 <developerName>New_Order</developerName>
7 <label>New Order</label>
8 <mlIntentUtterances>
9 <utterance>Today is pie day so I want pie</utterance>
10 </mlIntentUtterances>
11 </mlIntents>
12 <mlSlotClasses>
13 <developerName>Size</developerName>
14 <extractionType>Value</extractionType>
15 <label>Size</label>
16 <mlSlotClassValues>
17 <synonymGroup>
18 <languages>en_US</languages>
19 <terms>Big</terms>
20 <terms>Extra Large</terms>
21 <terms>X-Large</terms>
22 <terms>Grande</terms>
23 <terms>Huge</terms>
24 </synonymGroup>
25 <value>Large</value>
26 </mlSlotClassValues>
27 </mlSlotClasses>
28 <name>Astros_Pizza_ld3</name>
29 </botMlDomain>
30 <botVersions>
31 <fullName>Astros_Pizza_v3</fullName>
32 <botDialogGroups>
33 <developerName>Order_Management</developerName>
34 <label>Order Management</label>
35 </botDialogGroups>
36 <botDialogs>
37 <botDialogGroup>Order_Management</botDialogGroup>
38 <botSteps>
39 <botMessages>
40 <message>🍕🍕🍕Pizza Time! 🍕🍕🍕</message>
41 </botMessages>
42 <type>Message</type>
43 </botSteps>
44 <botSteps>
45 <botStepConditions>
46 <leftOperandName>Verified_User</leftOperandName>
47 <leftOperandType>ConversationVariable</leftOperandType>
48 <operatorType>Equals</operatorType>
49 <rightOperandValue>false</rightOperandValue>
50 </botStepConditions>
51 <botSteps>
52 <botNavigation>
53 <botNavigationLinks>
54 <targetBotDialog>Customer_Verification</targetBotDialog>
55 </botNavigationLinks>
56 <type>Call</type>
57 </botNavigation>
58 <type>Navigation</type>
59 </botSteps>
60 <type>Group</type>
61 </botSteps>
62 <botSteps>
63 <botStepConditions>
64 <leftOperandName>Location</leftOperandName>
65 <leftOperandType>ConversationVariable</leftOperandType>
66 <operatorType>IsNotSet</operatorType>
67 </botStepConditions>
68 <botSteps>
69 <botNavigation>
70 <botNavigationLinks>
71 <targetBotDialog>Select_Location</targetBotDialog>
72 </botNavigationLinks>
73 <type>Call</type>
74 </botNavigation>
75 <type>Navigation</type>
76 </botSteps>
77 <type>Group</type>
78 </botSteps>
79 <botSteps>
80 <botVariableOperation>
81 <botInvocation>
82 <invocationActionName>CreateOrderService</invocationActionName>
83 <invocationActionType>apex</invocationActionType>
84 <invocationMappings>
85 <parameterName>customer</parameterName>
86 <type>Input</type>
87 <variableName>Contact</variableName>
88 <variableType>ConversationVariable</variableType>
89 </invocationMappings>
90 <invocationMappings>
91 <parameterName>location</parameterName>
92 <type>Input</type>
93 <variableName>Location</variableName>
94 <variableType>ConversationVariable</variableType>
95 </invocationMappings>
96 <invocationMappings>
97 <parameterName>output</parameterName>
98 <type>Output</type>
99 <variableName>Pizza_Order</variableName>
100 <variableType>ConversationVariable</variableType>
101 </invocationMappings>
102 </botInvocation>
103 <type>Set</type>
104 </botVariableOperation>
105 <type>VariableOperation</type>
106 </botSteps>
107 <botSteps>
108 <botMessages>
109 <message>Perfect, let's work on your order from our {!Location.Name} location</message>
110 </botMessages>
111 <type>Message</type>
112 </botSteps>
113 <botSteps>
114 <botNavigation>
115 <botNavigationLinks>
116 <targetBotDialog>Add_Items_to_Order</targetBotDialog>
117 </botNavigationLinks>
118 <type>Redirect</type>
119 </botNavigation>
120 <type>Navigation</type>
121 </botSteps>
122 <developerName>New_Order</developerName>
123 <label>New Order</label>
124 <mlIntent>New_Order</mlIntent>
125 <showInFooterMenu>false</showInFooterMenu>
126 </botDialogs>
127 <conversationVariables>
128 <dataType>Object</dataType>
129 <developerName>Contact</developerName>
130 <label>Contact</label>
131 </conversationVariables>
132 <conversationVariables>
133 <dataType>Text</dataType>
134 <developerName>Delivery_Address</developerName>
135 <label>Delivery Address</label>
136 </conversationVariables>
137 <conversationVariables>
138 <dataType>Object</dataType>
139 <developerName>Pizza_Order</developerName>
140 <label>Pizza Order</label>
141 </conversationVariables>
142 <entryDialog>Welcome</entryDialog>
143 <mainMenuDialog>Main_Menu</mainMenuDialog>
144 </botVersions>
145 <label>Astro's Pizza</label>
146</Bot>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>Pizza_Bot</members>
5 <name>Bot</name>
6 </types>
7 <version>44.0</version>
8</Package>