Newer Version Available

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

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
botVersions BotVersion Represents the configuration details for a specific Einstein Bots version, including dialogs, intents, entities, and slots.
description string A description of the bot.
label string Label that identifies the bot throughout the Salesforce user interface.

Declarative Metadata Sample Definition

The following is an example of a Bot.

1<?xml version="1.0" encoding="UTF-8"?>
2<Bot xmlns="http://soap.sforce.com/2006/04/metadata">
3    <botVersions>
4        <fullName>v1</fullName>
5        <botDialogs>
6            <botSteps>
7                <botMessages>
8                    <message>Hi! I&apos;m your helpful bot.</message>
9                </botMessages>
10                <type>Message</type>
11            </botSteps>
12            <botSteps>
13                <botNavigation>
14                    <botNavigationLinks>
15                        <targetBotDialog>Main_Menu</targetBotDialog>
16                    </botNavigationLinks>
17                    <type>Redirect</type>
18                </botNavigation>
19                <type>Navigation</type>
20            </botSteps>
21            <developerName>Welcome</developerName>
22            <label>Welcome</label>
23            <mlIntent>Welcome</mlIntent>
24            <showInFooterMenu>false</showInFooterMenu>
25        </botDialogs>
26        <botDialogs>
27            <botSteps>
28                <type>Wait</type>
29            </botSteps>
30            <developerName>Main_Menu</developerName>
31            <label>Main Menu</label>
32            <mlIntent>Main_Menu</mlIntent>
33            <showInFooterMenu>false</showInFooterMenu>
34        </botDialogs>
35        <botDialogs>
36            <botSteps>
37                <botNavigation>
38                    <type>TransferToAgent</type>
39                </botNavigation>
40                <type>Navigation</type>
41            </botSteps>
42            <developerName>Transfer_To_Agent</developerName>
43            <label>Transfer To Agent</label>
44            <mlIntent>Transfer_To_Agent</mlIntent>
45            <showInFooterMenu>false</showInFooterMenu>
46        </botDialogs>
47        <botDialogs>
48            <botSteps>
49                <botMessages>
50                    <message>Goodbye! Click the &quot;End Chat&quot; button to end this chat</message>
51                </botMessages>
52                <type>Message</type>
53            </botSteps>
54            <botSteps>
55                <type>Wait</type>
56            </botSteps>
57            <developerName>End_Chat</developerName>
58            <label>End Chat</label>
59            <mlIntent>End_Chat</mlIntent>
60            <showInFooterMenu>false</showInFooterMenu>
61        </botDialogs>
62        <entryDialog>Welcome</entryDialog>
63        <localMlDomain>
64            <label>Pizza Bot</label>
65            <mlIntents>
66                <developerName>End_Chat</developerName>
67                <label>End Chat</label>
68            </mlIntents>
69            <mlIntents>
70                <developerName>Main_Menu</developerName>
71                <label>Main Menu</label>
72            </mlIntents>
73            <mlIntents>
74                <developerName>Transfer_To_Agent</developerName>
75                <label>Transfer To Agent</label>
76            </mlIntents>
77            <mlIntents>
78                <developerName>Welcome</developerName>
79                <label>Welcome</label>
80            </mlIntents>
81            <name>Pizza_Bot_ld1</name>
82        </localMlDomain>
83        <mainMenuDialog>Main_Menu</mainMenuDialog>
84    </botVersions>
85    <description>This is a test bot</description>
86    <label>Pizza Bot</label>
87</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>43.0</version>
8</Package>