What value should I use for custom fields when making an update via API?

Return to top
Have more questions? Submit a request

6 Comments

  • Heather Rommel
    Community Moderator

    Ticket Fields have IDs but User Fields have keys. Not having any luck using the user field key...

    0
  • Heather Rommel
    Community Moderator

    There is a field ID -- I just found out how to find it. Went to my browser after logging in to my account and entered

    https://MYDOMAIN.zendesk.com/api/v2/user_fields.json

    And that gave me a list of my user fields and their related IDs.

    I wish Zendesk would include user field IDs in the admin settings and not make us have to do this!

    0
  • Rishabh Kumar

    Hi,

    I am also trying to work with the user fields. I am trying to update the user field but apparently it is not updating. Could you please advise what am I missing here?

    Below is the script that I am using:

    curl https://domain.zendesk.com/api/v2/users/create_or_update_many.json ^-d "{\"users\": [{\"id\": \"1111111\",\"email\": \"user@testuser.com\",\"user_fields\": {\"Manager\": \"Test\"},\"organization\": {\"name\": \"Test123\"}}]}" ^-H "Content-Type: application/json" -X POST ^-v -u abc@abc.com:Password

    0
  • Bryan - Community Manager
    Zendesk Developer Support

    Hi Rishabh Kumar. I posted some ideas over in the cross post made at https://develop.zendesk.com/hc/en-us/community/posts/360001644288-Updating-custom-user-fields-on-User-object-via-API?page=1#community_comment_360014096673. Check those out and see if the info there helps.

    0
  • Ahmad Dahlan

    Hi, 

     

    Can the API lookup numbers from 2 different User and Organization Fields using the same Field key.

    0
  • Bryan - Community Manager
    Zendesk Developer Support

    Hi Ahmad Dahlan. AND and OR combinations are somewhat limited but any repeated use of a keyword will typically create an OR condition (ex:type:user phone:5551112222 phone:5553334444). However, if you're trying to search across two different types (ex: type:user name:acme) in the same query call, that's not currently supported. If that info is off the mark, please give more use case specifics. Thanks!

    0

Please sign in to leave a comment.

Powered by Zendesk