In this tutorial, you'll learn how to tag a user using a trigger. You will also find if a tag was added by a trigger.

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

Using a trigger action, you can't directly add user tags to the profile of a user. As a workaround, create a custom workflow using this action: Requester | Custom user field, which will then add a tag.

Step 1: Create a custom user field

  1. Create a custom user field select the drop-down field type
  2. Add the user field values with tags. This example adds the vip user tag
  3. Click Save

Step 2: Create a trigger

  1. Create a trigger
  2. Add the ticket conditions for your user tag
  3. Under Actions, add Lookup relationships > Requester > Your custom user field | Select the user field value
  4. Click Save
    Action

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

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

Use the below steps to verify if a user tag has been added by a trigger.

  1. 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

    1.png

  2. Use the URL below and replace fieldID with the user field ID found in point 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 will appear after "id"

    2.png

  3. Using this URL below, replace yoursubdomain with your actual Zendesk subdomain:
    https://yoursubdomain.zendesk.com/api/v2/triggers/active.json?active=true&page=1
  4. On that page, look for the value ID from point 2 in the trigger list
    The name of the trigger will appear, along with the custom user field value and tag:

    3.png

Powered by Zendesk