Suite | すべてのプラン |
この記事では、次のトピックについて説明します。
「条件で分岐」ステップの基本
回答フローに新しく作成した「条件で分岐」ステップには、次の設定が含まれています。
- 名前:キャンバス内でステップを識別するために名前を付けます。
-
2つのデフォルトの分岐:回答フローを公開する前に構成する必要があります。
- 該当する場合:分岐の条件が満たされた場合、会話はその分岐のステップに従います。
- それ以外の場合:会話が他のどの分岐の条件も満たさない場合場合、会話はこの分岐のステップに従います。
「条件で分岐」には、「それ以外の場合」を含め、最大で6つの分岐を作成することができます。「それ以外の場合」分岐は必ず含める必要があり、ステップから削除することはできません。分岐をさらに4個まで追加し、最大で6個の分岐を含めることができます。
分岐を追加する場合は、「分岐を追加」をクリックし、各分岐に対して以下の設定を行います。
- 名前:分岐の条件にわかりやすい名前を付けます。この名前が、キャンバス上に分岐名として表示されます。
-
条件:次の要素が含まれています。
- 変数:条件を満たすかどうかを評価するデータ。
- 演算子:変数と値のデータをどのように比較するか。「=」、「≠」、「次を含む」、「次を含まない」があります。
- 値:演算子によって指定された条件に対して期待される値。
詳細については、「条件の要素」を参照してください。
「AND/OR」ドロップダウンを使って、分岐条件を組み合わせることができます。たとえば、次の分岐は、ユーザーがオーストラリアまたは米国にいるかどうかをチェックします。
会話は1つの分岐にのみ進みます。分岐は、ステップに含まれた順に評価されます。複数の分岐条件を満たすエンドユーザーは、ステップの設定パネルでは上から下へ、キャンバスでは左から右へ、満たした条件のうち最初の分岐に進みます。分岐は、キャンバスの条件パネルをドラッグすることで、順番を変えることができます。
条件の要素
変数について
条件では、変数の値が静的な値と比較されます変数は、ドロップダウンメニューを使用して条件に追加します。
変数のタイプと変数の作成の詳細については、「変数を使用してAIエージェントの回答をパーソナライズする方法」を参照してください。演算子について
変数のデータと値を比較する方法を決定するのが演算子です。ドロップダウンメニューを使用して、演算子を条件に追加します。
以下の演算子を追加できます。演算子による一致では、大文字と小文字は区別されません。
ボットビルダーで条件付きステップを使用しているとき... | 使用できる演算子 |
---|---|
数値として格納されたデータを評価したい |
次のZendeskの演算子が、数値を評価するために使用されます。
|
文字列として格納されたデータを評価したい |
次のZendeskの演算子が、文字列を評価するために使用されます。
|
値について
値は、変数と比較される静的なデータであり、変数に期待されるデータを表します。たとえば、カスタマーのmembership_status
が「platinum」であるかどうかをチェックする条件では、「platinum」が値となります。
条件の値を指定するために使用される入力フィールドは、変数によって異なります。認証済みステータス変数の場合、ブール値のドロップダウンフィールドを使用して条件の値を指定します。その他の変数の場合は、テキスト入力フィールドを使用して条件の値を指定します。
ネストされた条件
ネスト条件とは、その中に2つ以上の条件を含む条件のことです。ネスト条件を使用すると、複数の条件に依存する複雑なロジックを構築することができます。特に、ANDとORの両方を使用する条件を組み合わせることができます。
- ユーザーが「プラチナ」会員であること AND
- ユーザーが以下のいずれかの国に居住していること。
- オーストラリア OR
- アメリカ
条件をネストできるのは3階層までです。最上位レベルも含め、各レベルに最大6つの条件を含めることができます。
22件のコメント
Josue Boix Pozuelo
Hello,
I have the same issue that 5104622711706 is describing, but unfortunately the solution from 5935813700634 doesn't work for me.
In my case, “booking_id” is a variable that may be set or not.
When it's not defined, this condition always goes to the wrong side of the tree.
If I print the value afterwards,
I get the following message:
How can this be possible?
0
Jason Kadlec
I plan to set custom fields or tags using the Core API:
zE("messenger:set", "conversationFields", [
{ id: "123456789", value: 100.50 }
])
How do I get the conversationField, or tag to show up in the conditions of the branch by condition?
For ticket fields, I only see email and name.
Messaging Metadata shows only Provided name, Provided email, Authenticated external ID and Authenticated Status.
I know I can set variables using REST api calls to my server, but in this case it's all about what page of my web application the user is on, and/or some button they clicked on, which I need to ‘hard set’ to go to an Answer that is specific to that.
Let's say I have a page of my site called “Playing in sandboxes” and they initiate their chat from this page.
I would
zE("messenger:set", "conversationFields", [
{ id: "123456789", value: sandboxes }
])
And then I would have an answer set as my default_open which would have as the first step a branch by condition which would check for this Ticket Field. If it was “sandboxes” I'm going to route to the answer where the first Send Message says: Hey I see you are playing in the sandbox! Great! Do you have a question for yourself, or your kid?
I don't want to have every interaction with the chat start with “how can I help you” when throughout my app there are pages where.. if the chat is initiated from that page there is a 99% chance I don't need to ask them how I can help.
The specific use case is more like a - click this button to connect to a Sandbox Expert… then the chat bot will load a form which gathers some pre-conversation questions.. then transfers to a live agent.
How do I do this?
0
Martine Hirth
5935813700634 Thank you, it's working now !
0
Viachaslau
5104622711706 It's possible
1
Martine Hirth
Is it planned to add a condition for an empty/ not empty variable? Thanks :)
2
Shree
Thanks for the development on the Zendesk bot so far, it's really nice.
Is it not possible to compare two variables? It is so limited that we have to enter the values to compare with variables manually, what if we want users to make a selection and compare it with the values obtained via API call which is stored in a variable?
0
Stephen White
Looking for some assistance here please. I'm looking to use this feature to validate customer information by comparing two variables.
Email = provided by the customer through ‘ask for details’
customeremail = retrieved through a prior API call and stored as a variable
Is this possible? Or perhaps there's a different way to compare info collected with known information stored from API responses?
1
Viachaslau
We would like this limit to be increased. For example, we have 10 transaction types and need a condition for each, with this limit (maximum 6) we can't create a proper custom flow
0
Dainne Kiara Lucena-Laxamana
Hi Jhamine,
We do offer Answer Bot analytics in Explore but are limited to the following: Analyzing your Flow Builder activity. Hope this helps!
0
Jham Bernardino
I have recently implemented adding conditions to my flow using a dropdown option. Is there a way for the chatbot analytics to capture the choices I added in the dropdown fields? Additionally, how can I track those interactions that did not result in a handover?
0
サインインしてコメントを残します。