在本教程中,您将了解如何使用触发器为用户添加标签。您还将找到工单标签是否由触发器添加。
此工作流程包括以下步骤。
使用触发器操作时,您无法直接将 用户工单标签 添加到用户的个人资料中。解决方法是使用以下操作创建自定义工作流程:请求者 | 自定义用户字段,这将添加一个标签。
第 1 步:创建自定义用户字段
- 创建 自定义用户字段,选择下拉字段类型
- 使用标签添加用户字段值。此示例添加
vip
用户工单标签 - 单击 保存
第 2 步:创建触发器
- 创建触发器
- 为您的用户工单标签添加工单条件
- 操作下,添加 查找关系 > 请求者 > 您的自定义用户字段 |选择用户字段值
- 单击保存
触发器将添加 vip
为该用户以及来自该用户的任何后续工单添加标签。
第 3 步:验证用户工单标签是否由触发器添加
使用以下步骤可验证用户工单标签是否已由触发器添加。
- 前往 管理中心 > 人员 > 用户字段 > 打开您的用户字段,然后找到页面顶部 自定义字段 ID 之后的 数字
- 使用下面的 URL 并将
fieldID
替换为第 1 点中的用户字段 ID,以及您的 Zendesk 子域名, 而不是yoursubdomain
https://yoursubdomain.zendesk.com/api/v2/user_fields/fieldID
在结果中,记下将在 后显示的数值"id"
- 使用下面的此 URL,将
yoursubdomain
替换为您的实际 Zendesk 子域名:https://yoursubdomain.zendesk.com/api/v2/triggers/active.json?active=true&page=1
- 在该页面的触发器列表中查找从第 2 点开始的值 ID
将显示触发器的名称,以及自定义用户字段值和标签:
翻译免责声明:本文章使用自动翻译软件翻译,以便您了解基本内容。 我们已采取合理措施提供准确翻译,但不保证翻译准确性
如对翻译准确性有任何疑问,请以文章的英语版本为准。
6 条评论
Alik Fedorenko
We are also running into the need to automatically tag users when an organization is assigned to a user.
0
Victoria Thrash
1263082103229 the issue is that triggers only work when there is a ticket. we need to be able to update users regardless if there is a ticket.
1
Christine Diego
At the moment, there's no trigger action that can add a tag on the user profile, however you can use the custom user field option and use it on the trigger to add a user tag on the user profile. The trigger will add the tag to the user and any subsequent tickets from that user.
You can also post this as a feature request in feedback forum. Our Product Team reviews this forum regularly and it has inspired many of the enhancements we've made to Zendesk over the years.
0
Support Admin
Hello 1263082103229,
No, I did not try the custom field approach because it won't work for assigning a user to a user segment. That assignment is only based on "real" tags (no support for user fields). In other words, this method doesn't accomplish what the title says.
All this method does is to provide a way to initiate a trigger based on a custom user field (sort of the wrong direction ;-) ).
So is there another way to add a user to a user segment via a trigger?
0
Christine Diego
Unfortunately, there's no trigger action that will allow you to add tags on the user profile. Tags are added to tickets via triggers. Have you created the custom user field as mentioned on the article and trigger? Please take note that the trigger will fire when a ticket has been created.
0
Support Admin
Sorry, but I am not seeing how this adds a tag to the user profile. Are some steps missing?
My use case (as it is for many others) is to trigger off the user tag to assign a user to user segment (which only works off tags, and not any other fields), for example, to control visibility to articles.
How can automatically add a tag to the user profile?
0
登录再写评论。