Zendesk 触发器
Zendesk 触发器是一种连接器事件触发器,可让您根据在 Zendesk 连接中订阅的 Zendesk 事件来调用集成。
准备工作
如果您计划为 Zendesk 触发器创建或配置新连接,请确保您对项目拥有以下 IAM 角色:
- Connector Admin (
roles/connectors.admin)
如需了解如何授予角色,请参阅管理访问权限。
将以下 IAM 角色授予您要用于 Zendesk 触发器的服务账号:
- Application Integration Invoker (
roles/integrations.integrationInvoker)
如需了解如何向服务账号授予角色,请参阅管理对服务账号的访问权限。
添加 Zendesk 触发器
如需向集成添加 Zendesk 触发器,请执行以下步骤:
- 在 Google Cloud 控制台中,前往 Application Integration 页面。
- 在导航菜单中,点击集成
系统会显示集成列表页面,其中列出了 Google Cloud 项目中的所有可用集成。
- 选择现有集成,或点击创建集成以创建新的集成。
如需创建新的集成,请执行以下操作:
- 在创建集成窗格中输入名称和说明。
- 选择集成的区域。
- 为集成选择服务账号。您可以随时在集成工具栏的 集成摘要窗格中更改或更新集成的服务账号详细信息。
- 点击创建。
新创建的集成会在集成编辑器中打开。
- 在集成编辑器导航栏中,点击触发器以查看可用触发器列表。
- 点击 Zendesk 触发器元素,并将其放置到集成编辑器中。
如需配置 Zendesk 触发器,您可以使用 Integration Connectors 中现有的 Zendesk 连接,也可以使用内嵌连接创建选项创建新的 Zendesk 连接。
使用现有连接配置 Zendesk 触发器
您可以使用 Integration Connectors 中的现有 Zendesk 连接来配置 Zendesk 触发器。请注意,Zendesk 触发器是连接器事件触发器,因此您只能使用已启用事件订阅的 Zendesk 连接来配置该触发器。
如需了解如何使用新的 Zendesk 连接配置 Zendesk 触发器,请参阅使用新连接配置 Zendesk 触发器
如需使用现有的 Zendesk 连接配置 Zendesk 触发器,请执行以下步骤:
- 点击集成编辑器中的 Zendesk 触发器元素以打开触发器配置窗格。
- 点击配置触发器。
- 在连接器事件触发器编辑器页面中,提供以下配置详细信息:
- 点击完成以完成触发器配置并关闭页面。
使用新连接配置 Zendesk 触发器
如需使用新的 Zendesk 连接配置 Zendesk 触发器,请执行以下步骤:
- 点击集成编辑器中的 Zendesk 触发器元素以打开触发器配置窗格。
- 点击配置触发器。
- 跳过区域字段。
- 点击连接,然后从下拉菜单中选择创建连接选项。
- 在创建连接窗格中完成以下步骤:
- 在位置步骤中,选择新 Zendesk 连接的位置:
- 区域:从下拉列表中选择一个区域。
- 点击下一步。
- 在连接详情步骤中,提供有关新 Zendesk 连接的详细信息:
- 连接器版本:从下拉列表中选择 Zendesk 连接器的可用版本。
- 连接名称:输入 Zendesk 连接的名称。
- (可选)说明: 输入连接的说明。
- (可选)启用 Cloud Logging:选中此复选框可存储连接的所有日志数据。
- 服务账号:选择具有 Zendesk 连接所需的 IAM 角色的服务账号。
- 启用事件订阅:选择此项可为 Zendesk 连接创建并启用新的事件订阅。您可以仅启用事件订阅,也可以同时启用连接实体、操作和动作。
- (可选)展开高级设置以配置连接节点设置。
如需详细了解 Zendesk 的连接节点设置,请参阅 Zendesk 连接文档。
- (可选)点击 + 添加标签,以键值对的形式向连接添加标签。
- 点击下一步。
-
在目标步骤中,提供 Zendesk 实例详细信息:
- 目标类型:选择主机地址。
- Host:输入 Zendesk 实例的主机名或 IP 地址。
- 点击下一步。
-
在身份验证步骤中,提供 Zendesk 实例的身份验证详细信息:
- 选择所需的身份验证类型,然后输入相关详细信息,以访问提供的 Zendesk 主机网址。
如需了解如何配置这些身份验证类型,请参阅配置身份验证。
- 点击下一步。
- 选择所需的身份验证类型,然后输入相关详细信息,以访问提供的 Zendesk 主机网址。
-
在事件订阅详细信息步骤中,提供将创建事件订阅的 Zendesk 实例的详细信息。
- 目标类型:选择主机地址。
- Host:输入您的 Zendesk 实例的注册网址。系统将为此网址创建事件订阅。
- 用户名:输入用于访问所提供的注册网址的用户名。
- 密码:选择包含与用户名关联的密码的 Secret Manager Secret。
- 密文版本:选择密文版本。
- 启用数据丰富化:如果您希望 Zendesk 触发器从 Zendesk 实例检索完整的事件载荷,请选中此复选框。如需查看示例,请参阅触发器输出。
- 点击下一步。
- 检查:检查提供的 Zendesk 连接详细信息。
- 点击创建,以完成创建新的 Zendesk 连接。
- 在位置步骤中,选择新 Zendesk 连接的位置:
- 事件订阅类型:选择触发集成的事件订阅类型。如需了解此触发器支持的事件订阅类型,请参阅支持的事件订阅类型。
- 点击完成,然后关闭该页面。
触发器输出
Zendesk 触发器需要几分钟才能完成事件订阅配置。您可以在触发器配置窗格中的事件订阅详情下查看活动订阅的状态。
Zendesk 触发器使用以下状态来指示事件订阅的状态:
Creating:表示触发器正在订阅事件订阅。Active:表示触发器已成功订阅事件订阅。Error:表示配置的事件订阅存在问题。
除了事件订阅状态之外,“事件订阅详情”部分还会显示其他详细信息,例如连接区域、连接名称、事件订阅名称等。
下图显示了 Zendesk 触发器配置窗格的示例布局:
触发器输出变量
对于每个事件,Zendesk 触发器会生成一个 ConnectorEventPayload 输出变量,您可以在下游任务中使用该变量。输出变量采用 JSON 格式,包含输出 Zendesk 载荷架构。
示例 1:Zendesk 事件的输出载荷:Agent Assignment Changed
{ "description": "The root schema of event that has occurred in Zendesk.", "type": "object", "properties": { "data": { "description": "", "type": "object", "properties": { "accountId": { "description": "Zendesk account ID.", "type": "number", "readOnly": false }, "integration_key": { "description": "Integration Key retrieved from ZIS bundle.", "type": "string", "readOnly": false }, "subdomain": { "description": "Account subdomain.", "type": "string", "readOnly": false }, "input": { "description": "Contains information about events changes.", "type": "object", "properties": { "ticket_event": { "description": "Type of event is ticket event.", "type": "object", "properties": { "meta": { "description": "Metadata about the ticket.", "type": "object", "properties": { "version": { "description": "Event version", "type": ["string", "null"] }, "occurred_at": { "description": "Timestamp when the event occurred.", "type": "string" }, "ref": { "description": "Reference ID", "type": ["string", "null"] }, "sequence": { "description": "Sequence of Occurrence", "type": "object", "properties": { "id": { "description": "", "type": ["string", "null"] }, "position": { "description": "", "type": ["number","null"] }, "total": { "description": "", "type": ["number","null"] } } } } }, "type": { "description": "Type of Ticket Event ", "type": "string" }, "previous": { "description": "Previous ID", "type": ["number","null"] }, "current": { "description": "Current ID", "type": ["number","null"] }, "ticket": { "description": "Properties related to the ticket", "type": "object", "properties": { "id": { "description": "Ticket ID", "type": "number" }, "created_at": { "description": "Timestamp of ticket creation.", "type": "string" }, "updated_at": { "description": "Timestamp of ticket updation.", "type": "string" }, "type": { "description": "Type of ticket", "type": ["string", "null"] }, "priority": { "description": "Priority of ticket.", "type": ["string", "null"] }, "status": { "description": "Status of the ticket.", "type": ["string", "null"] }, "requester_id": { "description": "ID of the ticket requestor.", "type": ["number","null"] }, "submitter_id": { "description": "ID of the ticket submitter.", "type": ["number","null"] }, "assignee_id": { "description": "ID of the ticket assignee.", "type": ["number","null"] }, "organization_id": { "description": "ID of the organization ticket belongs to.", "type": ["number","null"] }, "group_id": { "description": "ID of the group ticket belongs to.", "type": ["number","null"] }, "brand_id": { "description": "ID of the brand ticket belongs to", "type": ["number","null"] }, "form_id": { "description": "ID of the form associated with the ticket.", "type": ["number","null"] }, "external_id": { "description": "", "type": ["string", "null"] }, "tags": { "description": "Tags associated with the ticket.", "type": "array", "items": { "description": "", "type": ["string", "null"] } }, "via": { "description": "Channel via which change was made.", "type": "object", "properties": { "channel": { "description": "", "type": "string" } } } } } } } }, "readOnly": false } } } } }
示例 2:Zendesk 事件“代理分配已更改”的丰富数据输出载荷
{ "description": "The root schema of event that has occurred in Zendesk.", "type": "object", "properties": { "data": { "description": "", "type": "object", "properties": { "accountId": { "description": "Zendesk account ID.", "type": "number", "readOnly": false }, "integration_key": { "description": "Integration Key retrieved from ZIS bundle.", "type": "string", "readOnly": false }, "subdomain": { "description": "Account subdomain.", "type": "string", "readOnly": false }, "input": { "description": "Contains information about events changes.", "type": "object", "properties": { "ticket_event": { "description": "Type of event is ticket event.", "type": "object", "properties": { "meta": { "description": "Metadata about the ticket.", "type": "object", "properties": { "version": { "description": "Event version", "type": [ "string", "null" ] }, "occurred_at": { "description": "Timestamp when the event occurred.", "type": "string" }, "ref": { "description": "Reference ID", "type": [ "string", "null" ] }, "sequence": { "description": "Sequence of Occurrence", "type": "object", "properties": { "id": { "description": "", "type": [ "string", "null" ] }, "position": { "description": "", "type": [ "number", "null" ] }, "total": { "description": "", "type": [ "number", "null" ] } } } } }, "type": { "description": "Type of Ticket Event ", "type": "string" }, "previous": { "description": "Previous ID", "type": [ "number", "null" ] }, "current": { "description": "Current ID", "type": [ "number", "null" ] }, "ticket": { "description": "Properties related to the ticket", "type": "object", "properties": { "id": { "description": "Ticket ID", "type": "number" }, "created_at": { "description": "Timestamp of ticket creation.", "type": "string" }, "updated_at": { "description": "Timestamp of ticket updation.", "type": "string" }, "type": { "description": "Type of ticket", "type": "string" }, "priority": { "description": "Priority of ticket.", "type": [ "string", "null" ] }, "status": { "description": "Status of the ticket.", "type": [ "string", "null" ] }, "requester_id": { "description": "ID of the ticket requestor.", "type": [ "number", "null" ] }, "submitter_id": { "description": "ID of the ticket submitter.", "type": [ "number", "null" ] }, "assignee_id": { "description": "ID of the ticket assignee.", "type": [ "number", "null" ] }, "organization_id": { "description": "ID of the organization ticket belongs to.", "type": [ "number", "null" ] }, "group_id": { "description": "ID of the group ticket belongs to.", "type": [ "number", "null" ] }, "brand_id": { "description": "ID of the brand ticket belongs to", "type": [ "number", "null" ] }, "form_id": { "description": "ID of the form associated with the ticket.", "type": [ "number", "null" ] }, "external_id": { "description": "", "type": [ "string", "null" ] }, "tags": { "description": "Tags associated with the ticket.", "type": "array", "items": { "description": "", "type": [ "string", "null" ] } }, "via": { "description": "Channel via which change was made.", "type": "object", "properties": { "channel": { "description": "", "type": "string" } } } } } } } }, "readOnly": false } } }, "context-data": { "description": "", "type": "object", "properties": { "Id": { "type": "number", "readOnly": false, "description": "Automatically assigned when the ticket is created." }, "Subject": { "type": [ "string", "null" ], "readOnly": false, "description": "The value of the subject field for this ticket. When used in WHERE clause: The text in the ticket subject" }, "RawSubject": { "type": [ "string", "null" ], "readOnly": false, "description": "The dynamic content placeholder, if present, or the subject value, if not." }, "Description": { "type": [ "string", "null" ], "readOnly": false, "description": "The first comment on the ticket. When used in WHERE clause: The text in the tickets description and comments" }, "Type": { "type": [ "string", "null" ], "readOnly": false, "description": "The type of this ticket. Possible values: problem, incident, question or task." }, "Priority": { "type": [ "string", "null" ], "readOnly": false, "description": "The urgency with which the ticket should be addressed. Possible values: urgent, high, normal, low." }, "Status": { "type": [ "string", "null" ], "readOnly": false, "description": "The state of the ticket. Possible values: new, open, pending, hold, solved, closed." }, "Recipient": { "type": [ "string", "null" ], "readOnly": false, "description": "The original recipient e-mail address of the ticket." }, "HasIncidents": { "type": [ "boolean", "null" ], "readOnly": false, "description": "Is true of this ticket has been marked as a problem, false otherwise." }, "DueAt": { "type": [ "string", "null" ], "readOnly": false, "description": "If this is a ticket of type task it has a due date. Due date format uses ISO 8601 format." }, "RequesterId": { "type": [ "number", "null" ], "readOnly": false, "description": "The user who requested this ticket." }, "SubmitterId": { "type": [ "number", "null" ], "readOnly": false, "description": "The user who submitted the ticket. The submitter always becomes the author of the first comment on the ticket. " }, "AssigneeId": { "type": [ "number", "null" ], "readOnly": false, "description": "The agent currently assigned to the ticket." }, "OrganizationId": { "type": [ "string", "null" ], "readOnly": false, "description": "The organization of the requester. You can only specify the ID of an organization associated with the requester." }, "GroupId": { "type": [ "number", "null" ], "readOnly": false, "description": "The group this ticket is assigned to. When used in WHERE clause: The assigned agents group name." }, "CollaboratorIds": { "type": [ "string", "null" ], "readOnly": false, "description": "The ids of users currently cc-ed on the ticket." }, "FollowerIds": { "type": [ "string", "null" ], "readOnly": false, "description": "Agents currently following the ticket." }, "ForumTopicId": { "type": [ "number", "null" ], "readOnly": false, "description": "The topic this ticket originated from, if any." }, "ProblemId": { "type": [ "number", "null" ], "readOnly": false, "description": "For tickets of type incident, the ID of the problem the incident is linked to." }, "ExternalId": { "type": [ "string", "null" ], "readOnly": false, "description": "An id you can use to link Zendesk Support tickets to local records." }, "FollowupIds": { "type": [ "string", "null" ], "readOnly": false, "description": "Closed tickets only. The ids of the followups created from this ticket." }, "ViaFollowupSourceId": { "type": [ "string", "null" ], "readOnly": false, "description": "POST requests only. The id of a closed ticket when creating a follow-up ticket.." }, "MacroIds": { "type": [ "string", "null" ], "readOnly": false, "description": "POST requests only. List of macro IDs to be recorded in the ticket audit." }, "TicketFormId": { "type": [ "number", "null" ], "readOnly": false, "description": "Enterprise only. The id of the ticket form to render for the ticket." }, "BrandId": { "type": [ "number", "null" ], "readOnly": false, "description": "Enterprise only. The id of the brand this ticket is associated with." }, "Tags": { "type": [ "string", "null" ], "readOnly": false, "description": "The array of tags applied to this ticket." }, "ViaChannel": { "type": [ "string", "null" ], "readOnly": false, "description": "This tells you how the ticket or event was created. Examples: web, mobile, rule, system." }, "ViaSource": { "type": [ "string", "null" ], "readOnly": false, "description": "The tickets source. " }, "CustomFields": { "type": [ "string", "null" ], "readOnly": false, "description": "Custom fields for the ticket.The values of custom field are set and get dynamically" }, "SatisfactionRating": { "type": [ "string", "null" ], "readOnly": false, "description": "The satisfaction rating of the ticket, if it exists, or the state of satisfaction, offered or unoffered." }, "SharingAgreementIds": { "type": [ "string", "null" ], "readOnly": false, "description": "The ids of the sharing agreements used for this ticket." }, "AllowChannelback": { "type": [ "boolean", "null" ], "readOnly": false, "description": "Is false if channelback is disabled, true otherwise. Only applicable for channels framework ticket." }, "IsPublic": { "type": [ "boolean", "null" ], "readOnly": false, "description": "Is true if any comments are public, false otherwise." }, "CreatedAt": { "type": [ "string", "null" ], "readOnly": false, "description": "When this record was created." }, "UpdatedAt": { "type": [ "string", "null" ], "readOnly": false, "description": "When this record last got updated." }, "Url": { "type": [ "string", "null" ], "readOnly": false, "description": "The API url of this ticket." }, "View_Id": { "type": [ "number", "null" ], "readOnly": false, "description": "The view that tickets belong to." }, "User_Id": { "type": [ "number", "null" ], "readOnly": false, "description": "The user that tickets belong to." }, "Assignee": { "type": [ "string", "null" ], "readOnly": false, "description": "The assigned agent or other entity. You can specify none, me, user name (full name or partial), email address, user ID, or phone number" }, "GroupName": { "type": [ "string", "null" ], "readOnly": false, "description": "The assigned agents group name." }, "Requester": { "type": [ "string", "null" ], "readOnly": false, "description": "The ticket requester. You can specify none, me, user name (full name or partial), email address, user ID, or phone number." }, "Submitter": { "type": [ "string", "null" ], "readOnly": false, "description": "The ticket submitter. This may be different than the requester if the ticket was submitted by an agent on behalf of the requester. You can specify none, me, user name (full name or partial), email address, user ID, or phone number. ." }, "Brand": { "type": [ "string", "null" ], "readOnly": false, "description": "Search for a specific Brand on a ticket." }, "Via": { "type": [ "string", "null" ], "readOnly": false, "description": "The tickets source, which can be any of the following:mail, api, phone, etc." }, "Commenter": { "type": [ "string", "null" ], "readOnly": false, "description": "People who have added comments to tickets. You can specify none, me, user name (full name or partial), email address, user ID, or phone number." }, "Cc": { "type": [ "string", "null" ], "readOnly": false, "description": "People who have been CCd on tickets. You can specify none, me, user name (full name or partial), email address, user ID, or phone number." }, "HasAttachment": { "type": [ "boolean", "null" ], "readOnly": false, "description": "Search for all tickets with or without attachments using true or false." }, "Ticket status": { "type": [ "string", "null" ], "readOnly": false } } } } }
查看活动订阅
如需在 Integration Connectors 中查看和管理与连接关联的所有事件订阅,请执行以下操作:
- 前往集成连接器 > 连接页面。
- 点击要查看订阅的连接。
- 点击活动订阅标签页。
此命令会显示相应连接的所有事件订阅。
修改 Zendesk 触发器
您可以修改 Zendesk 触发器,以更改或更新连接配置和事件订阅详细信息。
如需修改 Zendesk 触发器,请执行以下步骤:
- 点击集成编辑器中的 Zendesk 触发器元素以打开触发器配置窗格。
- 点击配置 Zendesk 触发器。
- 在连接器事件触发器编辑器页面中,执行以下操作:
- 如需保留之前配置的事件订阅,请点击保留;否则,请点击删除。
- 根据需要更新连接配置和事件订阅详细信息。
- 点击完成。
您可以在触发器配置窗格中的事件订阅详情下查看更新后的连接和事件订阅详情。
支持的事件订阅类型
您可以使用 Zendesk 触发器来针对以下事件订阅类型调用集成:
| 事件订阅类型 | 说明 |
|---|---|
organization.ExternalChanged
|
组织的外部 ID 已更改。 |
organization.OrganizationCreated
|
组织已创建。 |
organization.TagsChanged
|
组织的标记已更改。 |
ticket.AgentAssignmentChanged
|
支持人员将工单重新分配给另一位客服人员。 |
ticket.AttachmentLinkedToComment
|
附件已关联到支持服务中的工单评论。 |
ticket.AttachmentRedactedFromComment
|
附件已从工单中的现有评论中涂改。 |
ticket.BrandChanged
|
品牌已更改。品牌是面向客户的身份,可以表示为多种产品或服务,也可以表示为公司拥有的多个品牌。 |
ticket.CcsChanged
|
用户已添加到工单或已从工单中移除。 |
ticket.CommentAdded
|
在创建或更新支持服务工单时添加注释。 |
ticket.CommentMadePrivate
|
在支持服务工单中添加了一条不公开评论。 |
ticket.CommentRedacted
|
从工单评论中永久移除了字词或字符串。 |
ticket.DescriptionChanged
|
工单中的说明已更改。 |
ticket.ExternalIdChanged
|
外部工单 ID 已更改。 |
ticket.FollowersChanged
|
工单中的关注者已更改。 |
ticket.GroupAssignmentChanged
|
工单被重新分配给另一组客服人员。 |
ticket.MarkedAsSpam
|
工单被标记为垃圾内容。 |
ticket.OrganizationChanged
|
工单中的组织已更改。 |
ticket.PriorityChanged
|
工单的优先级已更改。 |
ticket.ProblemLinkChanged
|
与事件类型工单关联的问题 ID 已更改。 |
ticket.RequesterChanged
|
更改了工单的请求者。 |
ticket.StatusChanged
|
工单的状态已更改。 |
ticket.SubjectChanged
|
工单的主题已更改。 |
ticket.SubmitterChanged
|
工单提交者已更改。 |
ticket.TagsChanged
|
工单中的标签已更改。 |
ticket.TaskDueAtChanged
|
工单上的任务截止日期和时间已更改。 |
ticket.TicketCreated
|
系统会创建支持服务工单。 |
ticket.TicketFormChanged
|
工单中的表单已更改。 |
ticket.TicketMerged
|
工单已与其他工单合并。 |
ticket.TicketPermanentlyDeleted
|
票券已被永久删除。 |
ticket.TicketSoftDeleted
|
删除工单后,任何用户(包括使用产品界面或 API 的管理员)都无法看到该工单。 |
ticket.TicketTypeChanged
|
机票类型已更改。 |
ticket.TicketUndeleted
|
工单已取消删除。 |
user.CustomRoleChanged
|
用户的自定义角色已更改。 |
user.ExternalidChanged
|
用户的外部 ID 已更改。 |
user.LastLoginChanged
|
用户的上次登录时间已更改。 |
user.OnlyPrivateCommentsChanged
|
用户创建公开评论的能力发生了变化。 |
user.TageChanged
|
用户的标记已更改。 |
userTimeZoneChanged
|
用户的时区已更改。 |
user.UserAliasChanged
|
用户的别名已更改。 |
user.UserCreated
|
创建用户。 |
user.UserDetailsChanged
|
用户详细信息已更改。 |
user.UserGroupAdded
|
用户被添加到群组。 |
user.UserGroupRemoved
|
从群组中移除了用户。 |
user.UserIdentityChanged
|
用户的身份已更改。 |
user.UserIdentityCreated
|
创建了用户的身份。 |
user.UserIdentityRemoved
|
用户的身份信息被删除。 |
user.UserActiveChanged
|
用户的活跃状态已更改。 |
user.UserMerged
|
用户与另一用户合并。 |
user.UserNameChanged
|
用户的姓名已更改。 |
user.UserNotesChanged
|
用户的备注已更改。 |
user.UserOrganizationAdded
|
将用户添加到组织。 |
user.UserOrganizationRemoved
|
用户从组织中移除。 |
user.UserPhotoChanged
|
用户的照片已更改。 |
user.UserRoleChanged
|
用户的角色已更改。 |
配额和限制
如需详细了解配额和限制,请参阅配额和限制。