Suite | 任意服务模式 |
按条件的分支步骤基础知识
当您将新的 按条件分支 步骤添加到回答工作流程时,将包括以下设置:
- 标识画布上步骤的名称 。
-
在发布回答流程之前,必须配置两个默认分支 :
- 如果:如果满足此分支的条件,对话将按照此分支的步骤进行。
- 其它:如果不匹配任何其他分支的条件,对话将按照此分支的步骤进行
按条件的分支最多可以有六个分支,包括 Else 分支。Else 分支是必需的,无法从该步骤中移除。您可以额外添加 4-6 个分支。
要添加其他分支,单击 添加分支 ,然后为每个分支配置以下设置:
- 描述分支条件的名称 。此名称显示为画布上的分支名称。
-
包含以下元素的条件 :
- 变量:将评估以确定是否满足条件的数据。
- 运算符:如何比较来自变量和值的数据。包括 是、 不是 、包含、 不包含。
- 值:由运算符指定的条件的预期值。
有关更多信息,请参阅 条件元素 。
您可以使用 AND/OR 下拉菜单组合条件作为分支。例如,以下分支可检查用户是位于澳大利亚还是美国。
一场对话只能遵循一个分支。分支按照其包含在步骤中的顺序进行评估。满足多个分支条件的终端用户将被发送到第一个符合匹配条件的分支,在该步骤的配置面板中从上到下,或在画布中从左到右。通过拖动画布上的条件窗格,可对分支重新排序。
条件元素
关于变量
在条件中,将变量的值与静态值进行比较。变量使用下拉菜单添加到条件。
有关变量类型和创建变量的更多信息,请参阅 使用变量自定义人工智能专员回复。关于运算符
运算符确定如何将变量的数据与值进行比较。使用下拉菜单将运算符添加到条件中。
有以下运算符可用。所有运算符匹配项都不区分大小写。
当我在智能机器人生成器中使用条件步骤时…… | 空闲运算符 |
---|---|
我希望能够评估以 数字形式存储的数据 |
用于评估数字的 Zendesk 已知用例运算符:
|
我希望能够评估存储为 字符串的数据 |
用于评估字符串的 Zendesk 已知用例运算符:
|
关于值
值是与变量进行比较的静态数据。它表示变量的预期数据。例如,在检查客户的 membership_status
为 "白金","白金" 是值。
用于指定条件值的输入字段因变量而异。对于 已通过身份验证状态 变量,您可以使用布尔下拉字段指定条件的值。对于其它变量,您需要使用文本输入字段来指定条件的值。
嵌套条件
嵌套条件是指内部包含两个或更多条件的条件。您可以使用嵌套条件来建立依赖于多个条件的复杂逻辑。特别适用于同时使用 AND 和 OR组合条件的情况。
- 用户的成员身份为“白金”,并且
- 用户位于以下国家/地区之一:
- 澳大利亚或
- 美国
条件嵌套最多仅三层。每个级别(包括顶级)可包含最多六个条件。
翻译免责声明:本文章使用自动翻译软件翻译,以便您了解基本内容。 我们已采取合理措施提供准确翻译,但不保证翻译准确性
如对翻译准确性有任何疑问,请以文章的英语版本为准。
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
test.zendesk
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
登录再写评论。