この文章は Salesforce 機械翻訳システムを使用して翻訳されました。詳細はこちらをご参照ください。
英語に切り替える

ボット

1 つ以上のバージョンを使用できる Einstein Bot 設定の定義を表します。有効にできるバージョンは 1 つのみです。Metadata メタデータ型を拡張し、その fullName 項目を継承します。

ファイルのサフィックスおよびディレクトリの場所

Bot コンポーネントのサフィックスは .bot で、bot フォルダに保存されます。

バージョン

Bot コンポーネントは、API バージョン 43.0 以降で使用できます。

特別なアクセスルール

Bot を使用できるのは、組織で Live Agent と Einstein Bots が有効になっている場合のみです。

項目

項目名 項目種別 説明
botMlDomain LocalMlDomain ボットに関連付けられたインテント��エンティティ、変数をグループ化する Einstein Intent セットを表します。同じボットのすべての Einstein ボットバージョンは、インテントセットを共有するようになりました。API バージョン 44.0 以降で利用できます。
botVersions BotVersion ダイアログ、インテント、エンティティ、変数など、特定の Einstein ボットバージョンの設定の詳細を表します。
description string ボットの説明。
label string Salesforce ユーザインターフェース全体でボットを識別する表示ラベル。

LocalMlDomain

現在のボットバージョンのローカルの Einstein Intent セット。

項目名 項目種別 説明
label string Salesforce ユーザインターフェース全体で、現在のボットバージョンのローカルの Einstein Intent セットを表す表示ラベル。
mlIntents MlIntent[] このローカルインテントセットに関連付けられたインテントのリスト。
mlSlotClasses MlSlotClass[] このローカルインテントセットに関連付けられたエンティティのリスト。
name string 必須。一意の名前を使用して、他のローカル Einstein Intent セットとの競合を回避します。この名前は、アンダースコアと英数字のみを使用でき、組織内で一意にする必要があります。最初は文字であること、空白は使用しない、最後にアンダースコアを使用しない、2 つ続けてアンダースコアを使用しないという制約があります。

宣言的なメタデータの定義のサンプル

次に、ボットの例を示します。この例は、見やすくするために一部省略されています。

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&apos;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&apos;s Pizza</label>
146</Bot>

前の定義を参照する package.xml の例を次に示します。

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>