Workflow: How to add a tag to a user with a trigger action

Learn how to tag a user using a trigger. This tutorial also explains how to identify if a trigger added a tag.

The workflow includes the steps below:

Step 1: Create a custom user field

Step 2: Create a trigger

Step 3: Verify if a user tag was added by a trigger

Note: You can't add user tags to a profile directly with a trigger action. Triggers act on ticket-level objects, not user-level data. To get the same result, link the trigger to a custom user field for the requester. When you update the custom user field, the user's tags update.

Step 1: Create a custom user field

Create a custom user field and select the drop-down field type

Add the user field values with tags. This example adds the vip user tag

Click Save

Step 2: Create a trigger

Create a trigger

Add the ticket conditions for the user tag

Under Actions, add Lookup relationships > Requester > Your custom user field | Select the user field value

Click Save

The trigger adds the vip tag to the user and any subsequent tickets from that user.

Note: The Requester is the user who created or sent the ticket, and the trigger uses the Requester as the link to reach the user profile, where a custom user field stores additional information such as category tags that automatically updates the user’s tags whenever the field value changes.

Step 3: Verify if a user tag was added by a trigger

To verify if a trigger added a user tag:

Go to Admin Center > People > User fields > Open your user field, and locate the digits right after the Custom field ID at the top of the page.

Use the URL below and replace fieldID with the user field ID found in step 1, and your Zendesk subdomain instead of yoursubdomain:

https://yoursubdomain.zendesk.com/api/v2/user_fields/fieldID

In the results, note the numerical value that appears after "id".

Using the URL below, replace yoursubdomain with your actual Zendesk subdomain:

https://yoursubdomain.zendesk.com/api/v2/triggers/active.json?active=true&page=1

On that page, look for the value ID from step 2 in the trigger list. The name of the trigger appears, along with the custom user field value and tag: