SqlQuery

根据数据库连接器源运行 SQL 语句并返回动态数据对象。

依赖关系

  • 必须首先设置数据库提供程序,然后才可以使用该提供程序。
  • 在使用此操作之前,不需要使用 Setdb action

支持的脚本类型

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.

通用

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

属性

属性

说明

Caption

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

GroupName

CXone 管理员所配置的数据库提供程序的名称。 此属性区分大小写。 输入数据库提供程序名称,而不是服务名称。 服务名称将在您设置数据库提供程序时使用。

SQLStatement

要提交到数据库服务器的 SQL 语句。 预计此语句应当会返回记录。

StartRecord

来自查询结果集的您希望以其为开始的记录。

MaxRecords

要检索的记录的最大数量。 默认为 100
Timeout 查询超时之前的秒数。 默认为 10。 支持的最大秒数为 30(尽管实际上可以在字段中输入更大的数字)。

输出属性

此操作会将结果数据集存储在动态数据对象中。 根据查询和返回的数据量,每个数据对象都将是唯一的。

属性

说明

Result (out) 这是您希望将数据存储在其中的动态数据对象的名称。

结果分支条件

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

条件

说明

Default 除了脚本满足条件要求其接受其他分支的情况之外,所要采用的路径。 如果未定义操作的其他分支,也会执行此操作。
OnNoRecords 指定的属性没有值时所采用的路径。 这种情况会在数据未从数据库返回时发生。
OnError 操作无法正确执行时所采用的路径。 例如,出现连接不良、语法错误等意外问题时。 _ERR 变量以单个下划线字符填充,应包含对问题的简要解释。 如果 SQL 查询无效,则会发生这种情况。
OnTimeout 在指定的秒数内没有响应时所采用的路径。