このチュートリアルでは、トリガを使用してユーザーにタグを付ける方法を学習します。また、トリガによってタグが追加されたかどうかも確認できます。
このワークフローには以下のステップが含まれます。
トリガアクションを使用して、ユーザーのプロフィールにユーザータグを直接追加することはできません。回避策として、次のアクションを使用してカスタムワークフローを作成します。リクエスタ | カスタムユーザーフィールド:タグを追加します。
ステップ1:カスタムユーザーフィールドを作成する
- カスタムユーザーフィールドを作成 ドロップダウンフィールドタイプを選択します
- タグを使用してユーザーフィールドの値を追加します。この例では、
vip
userタグを追加します。 - 「保存」をクリックします。
ステップ2:トリガを作成する
- トリガを作成する
- ユーザータグのチケット条件を追加する
- 「アクション」で、「ルックアップリレーションシップ」>「リクエスタ」>「カスタムユーザーフィールド」を追加する | ユーザーフィールドの値を選択する
- 「保存」をクリックします。
トリガは、ユーザーにvip
タグを追加し、そのユーザーからの後続のチケットを追加します。
ステップ3:ユーザータグがトリガによって追加されたかどうかを確認する
次の手順を使用して、ユーザータグがトリガによって追加されたかどうかを確認します。
-
管理センター>「メンバー」>「ユーザーフィールド」に移動し、ユーザーフィールドを開きます。ページ上部のカスタムフィールドIDのすぐ後ろの数字を探します。
- 下のURLを使用して、
fieldID
をポイント1のユーザーフィールドIDに置き換え、yoursubdomain
の代わりにZendeskサブドメインを使用します。
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を探します。
トリガの名前が、カスタムユーザーフィールドの値とタグとともに表示されます。
翻訳に関する免責事項:この記事は、お客様の利便性のために自動翻訳ソフ トウェアによって翻訳されたものです。Zendeskでは、翻訳の正確さを期すために相応の努力を払っておりますが、翻訳の正確性につ いては保証いたしません。
翻訳された記事の内容の正確性に関して疑問が生じた場合は、正式版である英語の記事 を参照してください。
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
サインインしてコメントを残してください。