View a markdown version of this page

使用 Connect 客户 API 创建或管理规则时,为某些参数指定变量 - Amazon Connect Customer

本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。

使用 Connect 客户 API 创建或管理规则时,为某些参数指定变量

当您使用 Connect Customer API(例如CreateRuleUpdateRule)以编程方式创建或管理规则时,您可以为某些参数指定变量。当触发操作时,将根据EventSourceName参数的值在运行时解析变量。

例如,假设您正在设置任务操作,并且希望添加更多上下文。以下示例说明了如何能够使用变量注入在任务的 Description 字段中包含联系的 ID 和座席的 ID:

  • 客户对电话呼叫不满意。在与联系 $.ContactLens.PostCall.ContactId 中的座席 $.ContactLens.PostCall.Agent.AgentId 的对话过程中检测到脏话

当触发操作时,他的字符串将解析为“客户对电话呼叫不满意”。在与联系 87654321-1234-1234-1234-EXAMPLEID345" 中的座席 12345678-1234-1234-1234-EXAMPLEID012 的对话过程中检测到脏话

下表列出了每个事件源以及用于可支持变量注入的字段的 JSONPath。

EventSourceName JSONPath 引用

OnPostCallAnalysisAvailable

$.ContactLens.PostCall.ContactId

$.ContactLens.PostCall.Agent.AgentId

$.ContactLens.PostCall.Queue.QueueId

OnRealTimeCallAnalysisAvailable

$.ContactLens.RealTimeCall.ContactId

$.ContactLens.RealTimeCall.Agent.AgentId

$.ContactLens.RealTimeCall.Queue.QueueId

OnPostChatAnalysisAvailable

$.ContactLens.PostChat.ContactId

$.ContactLens.PostChat.Agent.AgentId

$.ContactLens.PostChat.Queue.QueueId

OnSalesforceCaseCreate

$.ThirdParty.Salesforce.CaseCreate.CaseNumber

$.ThirdParty.Salesforce.CaseCreate.Name

$.ThirdParty.Salesforce.CaseCreate.Email

$.ThirdParty.Salesforce.CaseCreate.Phone

$.ThirdParty.Salesforce.CaseCreate.Company

$.ThirdParty.Salesforce.CaseCreate.Type

$.ThirdParty.Salesforce.CaseCreate.Reason

$.ThirdParty.Salesforce.CaseCreate.Origin

$.ThirdParty.Salesforce.CaseCreate.Subject

$.ThirdParty.Salesforce.CaseCreate.Priority

$.ThirdParty.Salesforce.CaseCreate.CreatedDate

$.ThirdParty.Salesforce.CaseCreate.Description

OnZendeskTicketCreate

$.ThirdParty.Zendesk.TicketCreate.Id

$.ThirdParty.Zendesk.TicketCreate.Priority

$.ThirdParty.Zendesk.TicketCreate.CreatedAt

OnZendeskTicketStatusUpdate

$.ThirdParty.Zendesk.TicketStatusUpdate.Id

$.ThirdParty.Zendesk.TicketStatusUpdate.Priority

$.ThirdParty.Zendesk.TicketStatusUpdate.CreatedAt