Assign

向用户定义的变量分配一个唯一的值。

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

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

属性

说明

Caption

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

Variable 要包含的变量的名称。 the value.
Value 要存储的值或数据。
Type StringNumericDatetime 中选择。您在此处所选择的类型会改变Value属性来解读Value字段中输入的数据。例如,如果选择 String 并输入值 1+1,则分配给变量的实际值为 1+1。但是,如果选择 Numeric 并输入值 1+1,则分配给变量的实际值为 2。
ScreenPop

您创建的变量的属性。设置为 true 时,变量值将显示在坐席的默认弹出屏幕关闭 一个可配置的弹出窗口,包含有关联系人的信息。它在某个事件后出现在坐席的屏幕上,通常在坐席连接到一个联系人时。中。必须为当前的 ACD 技能关闭 用于根据坐席的技能、能力和知识自动传递交互启用使用屏幕弹出功能选项。Select True to enable the display of this value in the default screen pop.默认为 False

SavetoDB

您创建的变量的属性,用于控制变量值是否保存到 CXone 平台数据库。您可以通过两种方式访问​​存储的数据:

Snippet 操作中使用变量时,也可以使用savetodb()变量属性

Select True to enable this value to be saved in the database.默认为 False

MaxStringSize 可以存储的值的最大大小(单位为 KB)。默认大小为 2 KB。

Result Branch Conditions

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

条件

说明

Default 除了脚本满足条件要求其接受其他分支的情况之外,所要采用的路径。如果未定义操作的其他分支,也会执行此操作。
Overflow 当分配给变量的值超过了最大字符串大小时所采用的路径。

Tips & Tricks

  • 使用 Assign 设置字符串或数字变量的内容。
  • 有关使用 Assign 操作添加或编辑变量值的信息,请参阅变量帮助页面。
  • 当变量名匹配且脚本 Assign 操作设置为 ScreenPop = true 时,脚本变量值将自动合并或预先填充到 坐席应用程序 中的 Quick Reply 变量中。如果变量值成功合并,坐席将保留手动修改预先填充的 Quick Reply 字段的能力。配置为 ScreenPop 的变量数据总量不应超过 200 KB。数据量过大可能会降低 坐席应用程序 的性能。
  • 通过在变量名称前包含关键字 global,在子脚本中创建一个全局变量。例如:Global:varName

Script Example

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

Begin triggers a Menu that provides three options, press 1 for Sales, 2 for Support, or 3 for Account Management. When the user selects an option, the script uses a specific Assign action to assign a value for the Skill ID that Countagents uses to determine the number of agents logged in with that skill. The If action then uses an expression, TOTAL=0, to determine which branch to take if agents are logged in. TRUE means the total agents logged in does equal 0 for that ACD skill, and the script will run a separate script for leaving a message. FALSE means the total agents logged in does not equal 0, and Reqagent uses the variable value in Assign to request an agent with the skill (via the Skill ID in Newskill).

Download this script.