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 the Metadata metadata type and inherits its fullName field.

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.

Fields

Field Name Description
botBlockVersions
Field Type
BotBlockVersion[]
Description
The configuration details for specific Einstein Bot block versions, including dialogs and variables.
description
Field Type
string
Description
A description of the bot block.
masterLabel
Field Type
string
Description

Required.

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

richContentEnabled
Field Type
boolean
Description
Indicates whether the block is available for enhanced bots (true) or for only standard bots (false). The default is false.

BotBlockVersion

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

Field Name Description
botDialogs
Field Type
BotDialog[]
Description
The list of dialogs in this bot block.
conversationGoals
Field Type
ConversationDefinitionGoal[]
Description
The list of goals in this bot block. Available in API version 57.0 and later.
conversationLanguages
Field Type
string
Description

Required.

Specifies the language of the bot block.
conversationVariables
Field Type
ConversationVariable[]
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. Available in API version 44.0 and later.
description
Field Type
string
Description
A description of the bot block.
mlDomain
Field Type
LocalMlDomain
Description

Required.

The Einstein Intent Set that groups intents, entities, and variables associated with a block.
permissionSet
Field Type
string
Description
The permission set associated with the bot block. Available in API version 59.0 and later.
status
Field Type
ConvDefBlockVersionStatus (enumeration of type string)
Description

Required.

Indicates whether a block is published or is a draft.

Values are:

  • Published

Declarative Metadata Sample Definition

The following is an example of a BotBlock component.

<?xml version="1.0" encoding="UTF-8"?>
<BotBlock xmlns="http://soap.sforce.com/2006/04/metadata">
    <access xsi:nil="true"/>
    <botBlockVersions>
        <fullName>Published</fullName>
        <botDialogs>
            <developerName>Test_Dialog_1646070168572</developerName>
            <label>Test_Dialog_1646070168572</label>
            <showInFooterMenu>false</showInFooterMenu>
        </botDialogs>
        <botDialogs>
            <developerName>Test_Dialog_1646070168926</developerName>
            <label>Test_Dialog_1646070168926</label>
            <showInFooterMenu>false</showInFooterMenu>
        </botDialogs>
        <botDialogs>
            <botSteps>
                <stepIdentifier>s4</stepIdentifier>
                <type>Wait</type>
            </botSteps>
            <developerName>Main_Menu</developerName>
            <label>Main Menu</label>
            <mlIntent>Main_Menu</mlIntent>
            <showInFooterMenu>false</showInFooterMenu>
        </botDialogs>
        <botDialogs>
            <botSteps>
                <botMessages>
                    <message>Goodbye! Click the &quot;End Chat&quot; button to end this chat</message>
                    <messageIdentifier>m2</messageIdentifier>
                </botMessages>
                <stepIdentifier>s6</stepIdentifier>
                <type>Message</type>
            </botSteps>
            <botSteps>
                <stepIdentifier>s7</stepIdentifier>
                <type>Wait</type>
            </botSteps>
            <developerName>End_Chat</developerName>
            <label>End Chat</label>
            <mlIntent>End_Chat</mlIntent>
            <showInFooterMenu>false</showInFooterMenu>
        </botDialogs>
        <botDialogs>
            <botSteps>
                <botMessages>
                    <message>Unfortunately, there are no agents available at the moment</message>
                    <messageIdentifier>m3</messageIdentifier>
                </botMessages>
                <stepIdentifier>s8</stepIdentifier>
                <type>Message</type>
            </botSteps>
            <botSteps>
                <stepIdentifier>s9</stepIdentifier>
                <type>Wait</type>
            </botSteps>
            <developerName>No_Agent_Available</developerName>
            <label>No Agent</label>
            <showInFooterMenu>false</showInFooterMenu>
        </botDialogs>
        <botDialogs>
            <botSteps>
                <botMessages>
                    <message>Hi! I&apos;m your helpful bot.</message>
                    <messageIdentifier>m1</messageIdentifier>
                </botMessages>
                <stepIdentifier>s1</stepIdentifier>
                <type>Message</type>
            </botSteps>
            <botSteps>
                <conversationRecordLookup>
                    <SObjectType>Account</SObjectType>
                    <conditions>
                        <leftOperand>Account.Phone</leftOperand>
                        <operatorType>Equal</operatorType>
                        <rightOperandValue>Value</rightOperandValue>
                        <sortOrder>0</sortOrder>
                    </conditions>
                    <lookupFields>
                        <fieldName>Account.Phone</fieldName>
                    </lookupFields>
                    <lookupFields>
                        <fieldName>Account.OwnerId</fieldName>
                    </lookupFields>
                    <maxLookupResults>1</maxLookupResults>
                    <sourceVariableName>_LastCustomerInput</sourceVariableName>
                    <sourceVariableType>ConversationVariable</sourceVariableType>
                    <targetVariableName>MyCustomVariable</targetVariableName>
                </conversationRecordLookup>
                <stepIdentifier>s2</stepIdentifier>
                <type>RecordLookup</type>
            </botSteps>
            <botSteps>
                <botNavigation>
                    <botNavigationLinks>
                        <targetBotDialog>Main_Menu</targetBotDialog>
                        <targetVariable xsi:nil="true"/>
                        <targetVariableType xsi:nil="true"/>
                    </botNavigationLinks>
                    <type>Redirect</type>
                </botNavigation>
                <stepIdentifier>s3</stepIdentifier>
                <type>Navigation</type>
            </botSteps>
            <developerName>Welcome</developerName>
            <label>Welcome</label>
            <mlIntent>Welcome</mlIntent>
            <showInFooterMenu>false</showInFooterMenu>
        </botDialogs>
        <conversationLanguages>en_US</conversationLanguages>
        <conversationVariables>
            <dataType>Text</dataType>
            <developerName>TestVariableABC</developerName>
            <label>TestVariableABC</label>
        </conversationVariables>
        <conversationVariables>
            <dataType>Text</dataType>
            <developerName>TestVariableXYZ</developerName>
            <label>TestVariableXYZ</label>
        </conversationVariables>
        <conversationVariables>
            <collectionType>List</collectionType>
            <dataType>Object</dataType>
            <developerName>MyCustomVariable</developerName>
            <label>MyCustomVariable</label>
        </conversationVariables>
        <description>Created for testing.</description>
        <mlDomain>
            <label>vPub</label>
            <mlIntents>
                <developerName>End_Chat</developerName>
                <label>End Chat</label>
                <mlIntentUtterances>
                    <language>es</language>
                    <utterance>Utterance1</utterance>
                </mlIntentUtterances>
                <mlIntentUtterances>
                    <language>es</language>
                    <utterance>Utterance2</utterance>
                </mlIntentUtterances>
                <mlIntentUtterances>
                    <language>es</language>
                    <utterance>Utterance3</utterance>
                </mlIntentUtterances>
            </mlIntents>
            <mlIntents>
                <description>Main Menu Intent</description>
                <developerName>Main_Menu</developerName>
                <label>Main Menu</label>
            </mlIntents>
            <mlIntents>
                <description>Welcome Intent</description>
                <developerName>Welcome</developerName>
                <label>Welcome</label>
            </mlIntents>
            <name>blockDevName0001_vPub</name>
        </mlDomain>
        <status>Published</status>
    </botBlockVersions>
    <description>Collects the user&apos;s first name, last name, email address, phone number, and company name.</description>
    <masterLabel>User Info Collection Block</masterLabel>
    <richContentEnabled>true</richContentEnabled>
</BotBlock>

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

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>AgentTransfer</members>
        <name>BotBlock</name>
    </types>
    <version>58.0</version>
</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.