Update a ticket's organization id

Answered

8 Comments

  • Dwight Bussman
    Comment actions Permalink

    Hi Andrew,

    The ID of Organizations (or any object) within Zendesk is a read-only field: they're set by the system and cannot be adjusted manually.

    If you're looking to store an ID of your own (potentially an ID of a related record from another system), I recommend using the external_id field, or creating your own custom-organization field as described in this article: https://support.zendesk.com/hc/en-us/articles/203662076-Adding-custom-fields-to-organizations.

    Hope this helps!

    0
  • Andrew Schreiner
    Comment actions Permalink

    How are tickets associated with different orgs then. They have to be allowed to be changed somehow. 

     

    https://support.zendesk.com/hc/en-us/articles/203690926-Updating-ticket-requesters-and-organizations

    0
  • Dwight Bussman
    Comment actions Permalink

    Goodness, I must apologize! I completely misread your original question (missed the word "ticket", both in the title & the question itself). Please forgive my haste.

    It should definitely be possible to update the organization_id within a ticket. The only requirement of which I'm aware is that the requester of the ticket must belong to the organization to which it's being set. Within the article you linked, that's this line: "You can only choose an organization that the requester belongs to"

    If the requester of the ticket in question is in the organization you're trying to apply, I'd love to create a ticket to look into this more closely. 

    Please let me know if I should do so and I can reach out to you therein shortly.

    Thanks!

    0
  • Andrew Schreiner
    Comment actions Permalink

    No problem. I'd love to get a ticket spun up for this. I've tested this locally and was unable to get it to work with a put request after the ticket was created

    0
  • Dwight Bussman
    Comment actions Permalink

    Sounds good! I'll ping you over there momentarily.

    0
  • Andrew Schreiner
    Comment actions Permalink

    I was able to get this working by using the following with a PUT request to the ticket. 

    {
      "ticket": {
        "organization_id": orgid
      }
    }
    0
  • Nicole - Community Manager
    Comment actions Permalink

    Thanks for sharing, Andrew. 

     

    0
  • Jessie Schutz
    Comment actions Permalink

    Thanks for sharing your solution, Andrew!

    0

Please sign in to leave a comment.

Powered by Zendesk