BotVersion
ファイルのサフィックスおよびディレクトリの場所
BotVersion コンポーネントのサフィックスは .bot で、bot フォルダに保存されます。BotVersion はボットの最上位の子で、そのサフィックスとファイルディレクトリを共有します。
バージョン
BotVersion コンポーネントは、API バージョン 43.0 以降で使用できます。
特別なアクセスルール
BotVersion を使用できるのは、組織で Live Agent と Einstein Bots が有効になっている場合のみです。
項目
| 項目名 | 項目種別 | 説明 |
|---|---|---|
| botDialogGroups | BotDialogGroup[] | このボットバージョンのダイアロググループのリスト。 |
| botDialogs | BotDialog[] | このボットバージョンのダイアログのリスト。 |
| entryDialog | string | 必須。ボットで顧客に表示する最初のダイアログへの参照。例: Welcome (ようこそ) |
| localMlDomain | LocalMlDomain | 必須。ボットバージョンに関連付けられた Intent、エンティティ、スロットをグループ化するボットバージョンのローカルの Einstein Intent セット。 |
| mainMenuDialog | string | 必須。メインメニューダイアログとして識別するダイアログへの参照。例: Main Menu (メインメニュー) |
| responseDelayMilliseconds | int | 入力をシミュレーションするための、各ボット応答後のデフォルトまたはカスタムの遅延 (省略可能)。 |
BotDialogGroup
このボットバージョンのダイアロググループのリスト。
| 項目名 | 項目種別 | 説明 |
|---|---|---|
| description | string | ボットダイアロググループの説明。 |
| developerName | string | 必須。ボットダイアロググループの一意の名前を使用して、同じボットバージョンに関連付けられた他のダイアロググループとの競合を回避します。この名前は、アンダースコアと英数字のみを使用でき、組織内で一意にする必要があります。最初が文字である、空白を使用しない、最後にアンダースコアを使用しない、2 つ続けてアンダースコアを使用しないという制約があります。 |
| label | string | 必須。Salesforce ユーザインターフェース全体でダイアロググループを識別する表示ラベル。 |
BotDialog
このボットバージョンのダイアログのリスト。
| 項目名 | 項目種別 | 説明 |
|---|---|---|
| botDialogGroup | string | このボットダイアログを含むボットダイアロググループ。 |
| botSteps | BotStep[] | ダイアログの一部として実行するステップのリスト。 |
| description | string | ボットダイアログの説明。 |
| developerName | string | 必須。一意の名前を使用して、同じボットバージョンに関連付けられた他のダイアログとの競合を回避します。この名前は、アンダースコアと英数字のみを使用でき、組織内で一意にする必要があります。最初は文字であること、空白は使用しない、最後にアンダースコアを使用しない、2 つ続けてアンダースコアを使用しないという制約があります。 |
| label | string | 必須。Salesforce ユーザインターフェース全体でダイアログを識別する表示ラベル。 |
| mlIntent | string | 必須。ダイアログに関連付けられた Intent の名前。 |
| showInFooterMenu | boolean | このダイアログをボットオプションメニューに表示します。デフォルト値は、false です。 |
BotStep
ダイアログの一部として実行するステップ。
| 項目名 | 項目種別 | 説明 |
|---|---|---|
| booleanFilter | string | この項目は、将来の使用のために予約されています。 |
| botInvocation | BotInvocation | Invocation 種別の BotStep で使用するボット呼び出し。 |
| botMessages | BotMessage[] | Message 種別の BotStep で使用するボットメッセージのリスト。 |
| botNavigation | BotNavigation | Navigation 種別の BotStep で使用するボットナビゲーション。 |
| botStepConditions | BotStepCondition[] | Group 種別の BotStep に関連付けられた BotStep 条件のリスト。 |
| botSteps | BotStep[] | Group 種別のボットステップに関連付けられた BotStep のリスト。 |
| botVariableOperation | BotVariableOperation[] | VariableOperation 種別の BotStep で使用するボット変数操作。 |
| type | BotStepType (string 型の列挙) | 必須。有効な値は、次のとおりです。
|
BotInvocation
Invocation 種別の BotStep で使用するボット呼び出し。
| 項目名 | 項目種別 | 説明 |
|---|---|---|
| apexClass | string | 必須。ボット呼び出しで使用する Apex クラスの名前。 |
| invocationMappings | BotInvocationMapping[] | ボット呼び出しの対応付けのリスト。 |
BotInvocationMapping
ボット呼び出しの対応付けのリスト。
| 項目名 | 項目種別 | 説明 |
|---|---|---|
| botVariable | string | 呼び出しの対応付けの一部として使用するボット変数の名前。 |
| parameterName | string | 必須。親のボット呼び出し対象の入力/出力パラメータの名前。 |
| type | BotInvocationMappingType (string 型の列挙) | 必須。有効な値は、次のとおりです。
|
BotMessage
Message 種別の BotStep で使用するボットメッセージ。
| 項目名 | 項目種別 | 説明 |
|---|---|---|
| message | string | 必須。ボットから顧客への送信メッセージの一部として表示するメッセージ。 |
Navigation 種別の BotStep で使用するボットナビゲーション。
| 項目名 | 項目種別 | 説明 |
|---|---|---|
| botNavigationLinks | BotNavigationLink[] | Call または Redirect 種別のボットナビゲーションに関連付けられたボットナビゲーションリンクのリスト。 |
| type | BotNavigationType (string 型の列挙) | 必須。有効な値は、次のとおりです。
|
Call または Redirect 種別のボットナビゲーションに関連付けられたボットナビゲーションリンクのリスト。
| 項目名 | 項目種別 | 説明 |
|---|---|---|
| label | string | Redirect 種別のボットナビゲーションで複数のボットナビゲーションリンクが使用可能な場合に表示する表示ラベル。表示ラベルが指定されていない場合、対象のダイアログの表示ラベルが使用されます。 |
| targetBotDialog | string | 必須。このボットナビゲーションリンクの一部としてコールする対象のダイアログの名前。 |
BotStepCondition
Group 種別の BotStep に関連付けられた BotStep 条件のリスト。
| 項目名 | 項目種別 | 説明 |
|---|---|---|
| leftOperandBotVariable | string | 必須。条件操作の左側で使用するボット変数の名前。 |
| operatorType | BotStepConditionOperatorType (string 型の列挙) | 必須。有効な値は、次のとおりです。
|
| rightOperandValue | string | 条件操作の右側で使用する値。IsSet および IsNotSet 演算子を使用する場合、この値は無視されます。 |
BotVariableOperation
VariableOperation 種別の BotStep で使用するボット変数操作。
| 項目名 | 項目種別 | 説明 |
|---|---|---|
| botInvocation | BotInvocation | Collect 種別であり quickReplyType が Dynamic のボット変数操作で、動的選���肢を提供するために使用するボット呼び出し。 |
| botMessages | BotMessage[] | Collect 種別のボット変数操作でプロンプトメッセージとして使用するボットメッセージのリスト。 |
| botQuickReplyOptions | BotQuickReplyOption[] | Collect 種別であり quickReplyType が Static のボット変数操作で使用する静的選択肢オプションのリスト。 |
| botVariableOperands | BotVariableOperand[] | Set または Unset 種別のボット変数に関連付けられたボット変数オペランドのリスト。 |
| invalidInputBotNavigation | BotNavigation | Collect 種別のボット変数操作で使用するボットナビゲーション。このナビゲーションは、関連付けられたボット呼び出しがオプションを返さない場合に実行されます。 |
| quickReplyOptionTemplate | string | Object 種別の動的選択肢オプションの表示ラベルを解決するために使用する数式テンプレート。 |
| quickReplyType | BotQuickReplyType (string 型の列挙) | 有効な値は、次のとおりです。
|
| quickReplyWidgetType | BotWidgetType (string 型の列挙) | 有効な値は、次のとおりです。
|
| type | 必須。BotVariableOperationType (string 型の列挙) | 有効な値は、次のとおりです。
|
BotQuickReplyOption
Collect 種別であり quickReplyType が Static のボット変数操作で使用する静的選択肢オプションのリスト。
| 項目名 | 項目種別 | 説明 |
|---|---|---|
| literalValue | string | 必須。メニューまたはボタンの選択肢として顧客に表示する値。 |
BotVariableOperand
Set または Unset 種別のボット変数に関連付けられたボット変数オペランドのリスト。
| 項目名 | 項目種別 | 説明 |
|---|---|---|
| botVariable | string | オペランドの一部として使用するボット変数の名前。 |
| disableAutoFill | boolean | Collect 種別のボット変数操作でのボット変数の自動入力動作を無効にします。 |
| field | string | オペランドの一部として使用する SObject 項目の API 参照名。 |
| operandType | BotVariableOperandType (string 型の列挙) | 必須。有効な値は、次のとおりです。
|
| sobjectType | string | オペランドの一部として定義する項目プロパティの SObject 型。使用できる値は LiveChatTranscript のみです。 |
| value | 文字列型 | この項目は、将来の使用のために予約されています。 |
LocalMlDomain
現在のボットバージョンのローカルの Einstein Intent セット。
| 項目名 | 項目種別 | 説明 |
|---|---|---|
| label | string | Salesforce ユーザインターフェース全体で、現在のボットバージョンのローカルの Einstein Intent セットを表す表示ラベル。 |
| mlIntents | MlIntent[] | このローカル Intent セットに関連付けられた Intent のリスト。 |
| mlSlotClasses | MlSlotClass[] | このローカル Intent セットに関連付けられたエンティティのリスト。 |
| mlSlots | MlSlot[] | このローカル Intent セットに関連付けられたスロットのリスト。 |
| name | 文字列型 | 必須。一意の名前を使用して、特定の組織内の他のローカル Einstein Intent セットとの競合を回避します。この名前は、アンダースコアと英数字のみを使用でき、組織内で一意にする必要があります。最初は文字であること、空白は使用しない、最後にアンダースコアを使用しない、2 つ続けてアンダースコアを使用しないという制約があります。 |
MlSlot
このローカル Intent セットに関連付けられたスロット。
| 項目名 | 項目種別 | 説明 |
|---|---|---|
| developerName | string | 必須。一意の名前を使用して、ボットバージョンのローカル Intent セット内の他のスロットとの競合を回避します。この名前は、アンダースコアと英数字のみを使用でき、組織内で一意にする必要があります。最初は文字であること、空白は使用しない、最後にアンダースコアを使用しない、2 つ続けてアンダースコアを使用しないという制約があります。 |
| label | string | Salesforce ユーザインターフェース全体でスロットを識別する表示ラベル。 |
| mlSlotClass | string | 必須。このスロットで使用するエンティティ種別の名前。 |
宣言的なメタデータの定義のサンプル
次に、BotVersion の例を示します。
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 <botDialogGroups>
6 <developerName>Order_Management</developerName>
7 <label>Order Management</label>
8 <description>Order Management</description>
9 </botDialogGroups>
10 <botDialogs>
11 <botSteps>
12 <botMessages>
13 <message>Hi! I'm your helpful bot.</message>
14 </botMessages>
15 <type>Message</type>
16 </botSteps>
17 <botSteps>
18 <botSteps>
19 <botVariableOperation>
20 <botVariableOperands>
21 <botVariable>Contact_Id</botVariable>
22 <operandType>Target</operandType>
23 </botVariableOperands>
24 <botVariableOperands>
25 <sobjectType>LiveChatTranscript</sobjectType>
26 <field>ContactId</field>
27 <operandType>Source</operandType>
28 </botVariableOperands>
29 <type>Set</type>
30 </botVariableOperation>
31 <type>VariableOperation</type>
32 </botSteps>
33 <botSteps>
34 <botNavigation>
35 <type>TransferToAgent</type>
36 </botNavigation>
37 <type>Navigation</type>
38 </botSteps>
39 <type>Group</type>
40 </botSteps>
41 <botSteps>
42 <botNavigation>
43 <botNavigationLinks>
44 <targetBotDialog>Main_Menu</targetBotDialog>
45 </botNavigationLinks>
46 <type>Redirect</type>
47 </botNavigation>
48 <type>Navigation</type>
49 </botSteps>
50 <developerName>Welcome</developerName>
51 <label>Welcome</label>
52 <mlIntent>Welcome</mlIntent>
53 <showInFooterMenu>false</showInFooterMenu>
54 </botDialogs>
55 <botDialogs>
56 <botSteps>
57 <botMessages>
58 <message>What would you like to do?</message>
59 </botMessages>
60 <type>Message</type>
61 </botSteps>
62 <botSteps>
63 <botNavigation>
64 <botNavigationLinks>
65 <label>Track Order</label>
66 <targetBotDialog>Track_Order</targetBotDialog>
67 </botNavigationLinks>
68 <botNavigationLinks>
69 <label>New Order</label>
70 <targetBotDialog>New_Order</targetBotDialog>
71 </botNavigationLinks>
72 <botNavigationLinks>
73 <targetBotDialog>Update_Order</targetBotDialog>
74 </botNavigationLinks>
75 <type>Redirect</type>
76 </botNavigation>
77 <type>Navigation</type>
78 </botSteps>
79 <developerName>Main_Menu</developerName>
80 <label>Main Menu</label>
81 <mlIntent>Main_Menu</mlIntent>
82 <showInFooterMenu>false</showInFooterMenu>
83 </botDialogs>
84 <botDialogs>
85 <botSteps>
86 <botNavigation>
87 <type>TransferToAgent</type>
88 </botNavigation>
89 <type>Navigation</type>
90 </botSteps>
91 <developerName>Transfer_To_Agent</developerName>
92 <label>Transfer To Agent</label>
93 <mlIntent>Transfer_To_Agent</mlIntent>
94 <showInFooterMenu>false</showInFooterMenu>
95 </botDialogs>
96 <botDialogs>
97 <botSteps>
98 <botMessages>
99 <message>Goodbye! Click the "End Chat" button to end this chat</message>
100 </botMessages>
101 <type>Message</type>
102 </botSteps>
103 <botSteps>
104 <type>Wait</type>
105 </botSteps>
106 <developerName>End_Chat</developerName>
107 <label>End Chat</label>
108 <mlIntent>End_Chat</mlIntent>
109 <showInFooterMenu>false</showInFooterMenu>
110 </botDialogs>
111 <botDialogs>
112 <botDialogGroup>Order_Management</botDialogGroup>
113 <botSteps>
114 <botVariableOperation>
115 <botMessages>
116 <message>What is the size?</message>
117 </botMessages>
118 <botQuickReplyOptions>
119 <literalValue>Small</literalValue>
120 </botQuickReplyOptions>
121 <botQuickReplyOptions>
122 <literalValue>Medium</literalValue>
123 </botQuickReplyOptions>
124 <botQuickReplyOptions>
125 <literalValue>Large</literalValue>
126 </botQuickReplyOptions>
127 <botVariableOperands>
128 <botVariable>Burrito_Size</botVariable>
129 <disableAutoFill>false</disableAutoFill>
130 <operandType>Target</operandType>
131 </botVariableOperands>
132 <quickReplyType>Static</quickReplyType>
133 <quickReplyWidgetType>Buttons</quickReplyWidgetType>
134 <type>Collect</type>
135 </botVariableOperation>
136 <type>VariableOperation</type>
137 </botSteps>
138 <botSteps>
139 <botVariableOperation>
140 <botMessages>
141 <message>What type of salsa would you like?</message>
142 </botMessages>
143 <quickReplyType>Dynamic</quickReplyType>
144 <quickReplyWidgetType>Buttons</quickReplyWidgetType>
145 <botInvocation>
146 <apexClass>GetSalsaTypes</apexClass>
147 <invocationMappings>
148 <parameterName>output</parameterName>
149 <type>Output</type>
150 </invocationMappings>
151 </botInvocation>
152 <quickReplyOptionTemplate>{!name} - {!spiceLevel}</quickReplyOptionTemplate>
153 <invalidInputBotNavigation>
154 <botNavigationLinks>
155 <label>Main Menu</label>
156 <targetBotDialog>Main_Menu</targetBotDialog>
157 </botNavigationLinks>
158 <type>Redirect</type>
159 </invalidInputBotNavigation>
160 <type>Collect</type>
161 <botVariableOperands>
162 <botVariable>Salsa_Type</botVariable>
163 <disableAutoFill>false</disableAutoFill>
164 <operandType>Target</operandType>
165 </botVariableOperands>
166 </botVariableOperation>
167 <type>VariableOperation</type>
168 </botSteps>
169 <botSteps>
170 <botInvocation>
171 <apexClass>NewOrderService</apexClass>
172 <invocationMappings>
173 <botVariable>Burrito_Size</botVariable>
174 <parameterName>order</parameterName>
175 <type>Input</type>
176 </invocationMappings>
177 </botInvocation>
178 <type>Invocation</type>
179 </botSteps>
180 <botSteps>
181 <botVariableOperation>
182 <botInvocation>
183 <apexClass>NewOrderService</apexClass>
184 <invocationMappings>
185 <botVariable>Burrito_Size</botVariable>
186 <parameterName>order</parameterName>
187 <type>Input</type>
188 </invocationMappings>
189 <invocationMappings>
190 <botVariable>Order_Number</botVariable>
191 <parameterName>output</parameterName>
192 <type>Output</type>
193 </invocationMappings>
194 </botInvocation>
195 <type>Set</type>
196 </botVariableOperation>
197 <type>VariableOperation</type>
198 </botSteps>
199 <botSteps>
200 <botStepConditions>
201 <leftOperandBotVariable>Order_Number</leftOperandBotVariable>
202 <operatorType>IsNotSet</operatorType>
203 </botStepConditions>
204 <botSteps>
205 <botVariableOperation>
206 <botVariableOperands>
207 <botVariable>Burrito_Size</botVariable>
208 <operandType>Target</operandType>
209 </botVariableOperands>
210 <type>Unset</type>
211 </botVariableOperation>
212 <type>VariableOperation</type>
213 </botSteps>
214 <botSteps>
215 <botNavigation>
216 <type>TransferToAgent</type>
217 </botNavigation>
218 <type>Navigation</type>
219 </botSteps>
220 <type>Group</type>
221 </botSteps>
222 <botSteps>
223 <botStepConditions>
224 <leftOperandBotVariable>Burrito_Size</leftOperandBotVariable>
225 <operatorType>Equals</operatorType>
226 <rightOperandValue>Godzilla</rightOperandValue>
227 </botStepConditions>
228 <botSteps>
229 <botNavigation>
230 <type>TransferToAgent</type>
231 </botNavigation>
232 <type>Navigation</type>
233 </botSteps>
234 <type>Group</type>
235 </botSteps>
236 <botSteps>
237 <type>Wait</type>
238 </botSteps>
239 <developerName>New_Order</developerName>
240 <label>New Order</label>
241 <mlIntent>New_Order</mlIntent>
242 <showInFooterMenu>false</showInFooterMenu>
243 </botDialogs>
244 <botDialogs>
245 <botDialogGroup>Order_Management</botDialogGroup>
246 <botSteps>
247 <type>Wait</type>
248 </botSteps>
249 <developerName>Track_Order</developerName>
250 <label>Track Order</label>
251 <mlIntent>Track_Order</mlIntent>
252 <showInFooterMenu>false</showInFooterMenu>
253 </botDialogs>
254 <botDialogs>
255 <description>Order Management</description>
256 <botDialogGroup>Order_Management</botDialogGroup>
257 <botSteps>
258 <type>Wait</type>
259 </botSteps>
260 <developerName>Update_Order</developerName>
261 <label>Update Order</label>
262 <mlIntent>Update_Order</mlIntent>
263 <showInFooterMenu>false</showInFooterMenu>
264 </botDialogs>
265 <entryDialog>Welcome</entryDialog>
266 <localMlDomain>
267 <label>TacoCat Bot</label>
268 <mlIntents>
269 <developerName>End_Chat</developerName>
270 <label>End Chat</label>
271 <description>End Chat</description>
272 </mlIntents>
273 <mlIntents>
274 <developerName>Main_Menu</developerName>
275 <label>Main Menu</label>
276 </mlIntents>
277 <mlIntents>
278 <developerName>New_Order</developerName>
279 <label>New Order</label>
280 </mlIntents>
281 <mlIntents>
282 <developerName>Track_Order</developerName>
283 <label>Track Order</label>
284 </mlIntents>
285 <mlIntents>
286 <developerName>Transfer_To_Agent</developerName>
287 <label>Transfer To Agent</label>
288 </mlIntents>
289 <mlIntents>
290 <developerName>Update_Order</developerName>
291 <label>Update Order</label>
292 <mlIntentUtterances>
293 <utterance>I want to order a burrito</utterance>
294 </mlIntentUtterances>
295 <mlIntentUtterances>
296 <utterance>I want to place an order</utterance>
297 </mlIntentUtterances>
298 <mlIntentUtterances>
299 <utterance>Do you have tacos and burritos</utterance>
300 </mlIntentUtterances>
301 <mlIntentUtterances>
302 <utterance>Create a new order</utterance>
303 </mlIntentUtterances>
304 <mlIntentUtterances>
305 <utterance>I want to start a new order</utterance>
306 </mlIntentUtterances>
307 <relatedMlIntents>
308 <relatedMlIntent>RestaurantDomain.Update_Order</relatedMlIntent>
309 </relatedMlIntents>
310 </mlIntents>
311 <mlIntents>
312 <developerName>Welcome</developerName>
313 <label>Welcome</label>
314 </mlIntents>
315 <mlSlotClasses>
316 <developerName>Burrito_Size</developerName>
317 <description>Size of Burrito</description>
318 <extractionType>Value</extractionType>
319 <label>Burrito Size</label>
320 </mlSlotClasses>
321 <mlSlotClasses>
322 <developerName>Order_Number</developerName>
323 <extractionRegex>/bO[0-9]{4}/b</extractionRegex>
324 <extractionType>Pattern</extractionType>
325 <label>Order Number</label>
326 </mlSlotClasses>
327 <mlSlotClasses>
328 <developerName>location</developerName>
329 <extractionType>Value</extractionType>
330 <label>location</label>
331 <mlSlotClassValues>
332 <synonymGroup>
333 <languages>en_US</languages>
334 <terms>San Francisco</terms>
335 <terms>The City</terms>
336 </synonymGroup>
337 <value>SF</value>
338 </mlSlotClassValues>
339 <mlSlotClassValues>
340 <synonymGroup>
341 <languages>en_US</languages>
342 <terms>Oakland</terms>
343 <terms>The Town</terms>
344 </synonymGroup>
345 <value>OAK</value>
346 </mlSlotClassValues>
347 </mlSlotClasses>
348 <mlSlots>
349 <developerName>Burrito_Size</developerName>
350 <label>Burrito Size</label>
351 <mlSlotClass>Burrito_Size</mlSlotClass>
352 </mlSlots>
353 <mlSlots>
354 <developerName>Order_Number</developerName>
355 <label>Order Number</label>
356 <mlSlotClass>Order_Number</mlSlotClass>
357 </mlSlots>
358 <mlSlots>
359 <developerName>Salsa_Type</developerName>
360 <label>Salsa Type</label>
361 <mlSlotClass>_Object</mlSlotClass>
362 </mlSlots>
363 <mlSlots>
364 <developerName>Contact_Id</developerName>
365 <label>Contact Id</label>
366 <mlSlotClass>_Text</mlSlotClass>
367 </mlSlots>
368 <name>TacoCat_Bot_ld1</name>
369 </localMlDomain>
370 <mainMenuDialog>Main_Menu</mainMenuDialog>
371 <responseDelayMilliseconds>100</responseDelayMilliseconds>
372 </botVersions>
373 <description>This is the perfect bot</description>
374 <label>TacoCat Bot</label>
375</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>TacoCat_Bot.v1</members>
5 <name>BotVersion</name>
6 </types>
7 <version>43.0</version>
8</Package>