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

BotTemplate

ダイアログや変数など、特定の Einstein ボットテンプレートの設定の詳細を表します。

可能な場合は、Equality の会社の値に一致するように、含めない用語を変更しました。顧客の実装に対する影響を回避するために、一部の用語は変更されていません。

重要

親種別

Metadata メタデータ型を拡張し、その fullName 項目を継承します。

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

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

バージョン

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

特別なアクセスルール

BotTemplate を使用できるのは、組織でチャットと Einstein Bots が有効になっている場合のみです。

項目

項目名 説明
botDialogGroups
項目の型
BotDialogGroup[]
説明
このボットテンプレートのダイアロググループのリスト。
botDialogs
項目の型
BotDialog[]
説明
このボットテンプレートのダイアログのリスト。
conversationLanguages
項目の型
string
説明

必須。

ボットテンプレートの言語を指定します。
contextVariables
項目の型
ConversationContextVariable[]
説明
チャネルに関係なくボットで顧客情報を収集できるようにするコンテキスト変数を表します。
conversationGoals
項目の型
ConversationDefinitionGoal[]
説明
このボットテンプレートの目標のリスト。API バージョン 57.0 以降で使用できます。
conversationSystemDialogs
項目の型
ConversationSystemDialog[]
説明
ダイアログに割り当てられているシステム機能。
conversationVariables
項目の型
ConversationVariable[]
説明
顧客から収集した特定のデータを保存するコンテナ。ダイアログアクション内の変数を入力と出力の両方で使用できます。
description
項目の型
string
説明
ボットテンプレートの説明。
entryDialog
項目の型
string
説明
ボットで顧客に表示する最初のダイアログへの参照。例: Welcome (ようこそ)。
icon
項目の型
string
説明
テンプレートの識別に使用するアイコン。
mainMenuDialog
項目の型
string
説明
メインメニューダイアログとして識別するダイアログへの参照。例: Main Menu (メインメニュー)。
masterLabel
項目の型
string
説明

必須。

BotTemplate のわかりやすい表示ラベルで、BotTemplate の作成時に定義されます。
mlDomain
項目の型
LocalMlDomain
説明

必須。

テンプレートに関連付けられたインテント、エンティティ、変数をグループ化する Einstein Intent セットを表します。
permissionSet
項目の型
string
説明
ボットテンプレートに関連付けられた権限セット。API バージョン 59.0 以降で利用できます。
richContentEnabled
項目の型
boolean
説明
テンプレートを拡張ボットで使用できるか (true)、または標準ボットで使用できるか (false) を示します。デフォルトは、false です。

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

BotTemplate コンポーネントの例を次に示します。

1<?xml version="1.0" encoding="UTF-8"?>
2<BotTemplate xmlns="http://soap.sforce.com/2006/04/metadata">
3    <botDialogGroups>
4        <developerName>dialog_group1</developerName>
5        <label>dialog group1</label>
6    </botDialogGroups>
7    <botDialogs>
8        <developerName>Test_Dialog_1</developerName>
9        <label>Test_Dialog_1</label>
10        <showInFooterMenu>false</showInFooterMenu>
11    </botDialogs>
12    <botDialogs>
13        <developerName>Test_Dialog_2</developerName>
14        <label>Test_Dialog_2</label>
15        <showInFooterMenu>false</showInFooterMenu>
16    </botDialogs>
17    <botDialogs>
18        <botSteps>
19            <botMessages>
20                <message>Hi! I&apos;m your helpful bot.</message>
21                <messageIdentifier>m1</messageIdentifier>
22            </botMessages>
23            <stepIdentifier>s1</stepIdentifier>
24            <type>Message</type>
25        </botSteps>
26        <botSteps>
27           <conversationRecordLookup>
28               <SObjectType>Account</SObjectType>
29               <conditions>
30                   <leftOperand>Account.Phone</leftOperand>
31                   <operatorType>Equal</operatorType>
32                   <rightOperandValue>Value</rightOperandValue>
33                   <sortOrder>0</sortOrder>
34               </conditions>
35               <lookupFields>
36                   <fieldName>Account.Phone</fieldName>
37               </lookupFields>
38               <lookupFields>
39                   <fieldName>Account.OwnerId</fieldName>
40               </lookupFields>
41               <maxLookupResults>1</maxLookupResults>
42               <sourceVariableName>_LastCustomerInput</sourceVariableName>
43               <sourceVariableType>ConversationVariable</sourceVariableType>
44               <targetVariableName>MyCustomVariable</targetVariableName>
45           </conversationRecordLookup>
46           <stepIdentifier>s2</stepIdentifier>
47           <type>RecordLookup</type>
48        </botSteps>
49        <botSteps>
50            <botNavigation>
51                <botNavigationLinks>
52                    <targetBotDialog>Main_Menu</targetBotDialog>
53                </botNavigationLinks>
54                <type>Redirect</type>
55            </botNavigation>
56            <stepIdentifier>s3</stepIdentifier>
57            <type>Navigation</type>
58        </botSteps>
59        <developerName>Welcome</developerName>
60        <label>Welcome</label>
61        <mlIntent>Welcome</mlIntent>
62        <showInFooterMenu>false</showInFooterMenu>
63    </botDialogs>
64    <botDialogs>
65        <botSteps>
66            <stepIdentifier>s4</stepIdentifier>
67            <type>Wait</type>
68        </botSteps>
69        <developerName>Main_Menu</developerName>
70        <label>Main Menu</label>
71        <mlIntent>Main_Menu</mlIntent>
72        <showInFooterMenu>false</showInFooterMenu>
73    </botDialogs>
74    <botDialogs>
75        <botSteps>
76            <botMessages>
77                <message>Goodbye! Click the &quot;End Chat&quot; button to end this chat</message>
78                <messageIdentifier>m2</messageIdentifier>
79            </botMessages>
80            <stepIdentifier>s6</stepIdentifier>
81            <type>Message</type>
82        </botSteps>
83        <botSteps>
84            <stepIdentifier>s7</stepIdentifier>
85            <type>Wait</type>
86        </botSteps>
87        <developerName>End_Chat</developerName>
88        <label>End Chat</label>
89        <mlIntent>End_Chat</mlIntent>
90        <showInFooterMenu>false</showInFooterMenu>
91    </botDialogs>
92    <botDialogs>
93        <botSteps>
94            <botMessages>
95                <message>Unfortunately, there are no agents available at the moment</message>
96                <messageIdentifier>m3</messageIdentifier>
97            </botMessages>
98            <stepIdentifier>s8</stepIdentifier>
99            <type>Message</type>
100        </botSteps>
101        <botSteps>
102            <stepIdentifier>s9</stepIdentifier>
103            <type>Wait</type>
104        </botSteps>
105        <developerName>No_Agent_Available</developerName>
106        <label>No Agent</label>
107        <showInFooterMenu>false</showInFooterMenu>
108    </botDialogs>
109    <contextVariables>
110        <contextVariableMappings>
111            <SObjectType>LiveChatTranscript</SObjectType>
112            <fieldName>LiveChatTranscript.ChatKey</fieldName>
113            <messageType>WebChat</messageType>
114        </contextVariableMappings>
115        <dataType>Text</dataType>
116        <developerName>ChatKey</developerName>
117        <label>Chat Key</label>
118    </contextVariables>
119    <conversationLanguages>en_US</conversationLanguages>
120    <conversationSystemDialogs>
121        <dialog>No_Agent_Available</dialog>
122        <type>TransferFailed</type>
123    </conversationSystemDialogs>
124    <conversationSystemDialogs>
125        <dialog>Test_Dialog_1</dialog>
126        <type>ErrorHandling</type>
127    </conversationSystemDialogs>
128    <conversationVariables>
129        <dataType>Text</dataType>
130        <developerName>TestVariableXYZ</developerName>
131        <label>TestVariableXYZ</label>
132    </conversationVariables>
133    <conversationVariables>
134        <collectionType>List</collectionType>
135        <dataType>Object</dataType>
136        <developerName>MyCustomVariable</developerName>
137        <label>MyCustomVariable</label>
138    </conversationVariables>
139    <description>Description of BotTemplate</description>
140    <entryDialog>Test_Dialog_1</entryDialog>
141    <icon>AA8qwqXXXXX</icon>
142    <mainMenuDialog>Test_Dialog_2</mainMenuDialog>
143    <masterLabel>Astro Bot</masterLabel>
144    <mlDomain>
145        <label>Astro Bot</label>
146        <mlIntents>
147            <developerName>End_Chat</developerName>
148            <label>End Chat</label>
149            <mlIntentUtterances>
150                <utterance>Utterance1</utterance>
151                <language>es</language>
152            </mlIntentUtterances>
153            <mlIntentUtterances>
154                <utterance>Utterance2</utterance>
155                <language>es</language>
156            </mlIntentUtterances>
157            <mlIntentUtterances>
158                <utterance>Utterance3</utterance>
159                <language>es</language>
160            </mlIntentUtterances>
161        </mlIntents>
162        <mlIntents>
163            <developerName>Main_Menu</developerName>
164            <label>Main Menu</label>
165            <description>Main Menu Intent</description>
166        </mlIntents>
167        <mlIntents>
168            <developerName>Welcome</developerName>
169            <label>Welcome</label>
170            <description>Welcome Intent</description>
171        </mlIntents>
172        <name>Astro_Bot_ld1</name>
173    </mlDomain>
174    <richContentEnabled>true</richContentEnabled>
175</BotTemplate>

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

1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3    <types>
4        <members>*</members>
5        <name>BotTemplate</name>
6    </types>
7    <version>55.0</version>
8</Package>

マニフェストファイル内のワイルドカードのサポート

このメタデータ型では、package.xml マニフェストファイル内のワイルドカード文字 * (アスタリスク) がサポートされます。マニフェストファイルの使用���ついての詳細は、「zip ファイルを使用したメタデータのリリースと取得」を参照してください。