Case

允许您根据操作 Variable 的属性值来设置多个自定义分支。

例如,Case 操作可以在聊天脚本中使用,其中聊天窗口会向联系人出示一个预聊天表单。在表单的下拉列表中,联系人从产品列表中选择来进行相关的聊天。产品在该脚本中设置为 Begin 操作中的变量,然后系统会根据联系人选择的产品使用 Case 操作来设置不同的分支。

单个 Case 操作中可以使用的分支数量没有任何限制。

Dependencies

  • 对于每个可能的变量值,都必须创建一个自定义分支条件。
  • 始终连接 Case 操作的 Default分支。如果 Variable 属性中的变量有时可能持有不同或意外的值,这一点尤为重要。连接 Default 分支可以让脚本处理意外值。

Supported Script Types

The icon for a Generic script type - a rectangle with < and > symbols inside it.

The icon for the Email script type - a large @ symbol in a diamond.

The icon for the Chat script type - a chat bubble with an ellipsis inside (...), in a diamond shape.

The icon for the Phone script type - an old-style phone handset with curved lines indicating sound coming out of it.

The icon for the Voicemail script type - a symbol that looks like a cassette tape - two circles sitting on a horizontal line.

The icon for the Work Item script type-a piece of paper with one corner folded down and a bullet list on it.

The icon for the SMS script type - a smart phone with a chat bubble coming out of it.

The icon for the Digital script type - a computer monitor with a smartphone next to it.

通用

电子邮件 聊天 电话 语音信箱 工作项目 短信 数字

Input Properties

这些属性定义操作在执行时使用的数据。

属性

说明

添加 说明文字

输入在脚本中唯一标识此操作的短语。标题显示在脚本画布上的操作图标下方。The default is the action name.

Variable 您希望 CASE 从中提取值的 变量名称。

Result Branch Conditions

结果分支条件允许您在脚本中创建分支,以在执行操作时处理不同的结果。

条件

说明

Default 除了脚本满足条件要求其接受其他分支的情况之外,所要采用的路径。如果未定义操作的其他分支,也会执行此操作。

Add a Variable Branch to a CASE Action

Case variables are added by using the connector or link to the appropriate action.

  1. On the canvas, drag a connector from the Case action to a different action.

    The Pick Branch window will open, as follows:

  2. Click the Plus sign (+) to create a new branch.

  3. Enter the value of the variable that will trigger this branch to be taken, for example '1.'
  4. Click OK.
  5. Repeat as needed for each branch.

Script Example

此示例并非完整的脚本。要使用此操作,需要额外的脚本编写工作。

In this example, Case is connected to three different Runscript actions. If a call comes in with a DNIS关闭 识别联系人在呼入语音呼叫联系您时拨打的号码,以及坐席或系统在呼出语音呼叫时拨打的号码。 of 8881234567, then the Sales Runscript action runs a designated subscript. If the DNIS is 8771234567, then the Collections Runscript action runs a different script. Finally, if call does not come in on either of those DNIS numbers, the Customer Service Runscript action triggers a subscript.

Would you like to download this script?