Pulling custom Org fields into ticket | The place for Zendesk users to come together and share
Skip to main content
March 1, 2018
Question

Pulling custom Org fields into ticket

  • March 1, 2018
  • 17 replies
  • 92 views

Has anyone tried or accomplished being able to pull information from custom organization fields to display in a ticket? 

 

eg: if for Customer ABC I have a custom field in the Organization profile where IT information is supplied, is there a way to put that info into every ticket as read-only? 

    This topic has been closed for replies.

    17 replies

    June 2, 2019

    Thanks for the info in this thread folks - it works!

    Couple of things to be aware of:

    1. Make sure the 'type' of the organization field and ticket field is the same (e.g. both 'decimal')
    2. The HTTP target must be 'PUT' method to update a ticket
    3. You can use 'basic auth' credentials in your HTTP Target settings with an API token - the 'Username' field should be an email address for a full agent account in the form: YOUR_EMAIL/token (note the '/token' after the email address) and the Password field will be a Zendesk API token that you have created. 
    Nicole17
    Employee
    June 3, 2019

    Thanks for sharing those pointers, Tom!

    December 20, 2019

    Hello Everyone,

    I tried to use the rules/workflow described here to copy an Org value to a ticket value without success.

    These are my triggers and HTTP target:

     

    Based on my rules, I want to notify an HTTP target with this trigger:

    {
    "ticket": {
    "custom_fields": [{
    "id": "{{custom_ticket_360006439420}}", // my custom ticket filed 
    "value": "{{ticket.requester.organization.custom_fields.customer_acv}}" //my org field
    }]
    }
    }

    And I created a target like that:
    URL is: https://MYDOMAIN//api/v2/tickets/{{ticket.id}}.json

     

    However it i snot working, do you know why?

    Dan32
    December 23, 2019

    Hey Alexandre,

    You need to enable authentication on the target. If you're trying to update a zendesk ticket via the API, you need to have access to do so. 

    By providing a username/password for the user that will be performing the update to the ticket, you should be able to proceed.

    December 30, 2019

    Hello Dan,

    Thank you for your update, I still no more have issue regarding authentication. I have no more error also. However the value from organisation filed is not copied to my ticket field.

     

    Trigger will call an external target with this:

     

    {
    "ticket": {
    "custom_fields": [{
    "id": "{{custom_ticket_360006439420}}", // my custom ticket filed (type numeric)
    "value": "{{ticket.requester.organization.custom_fields.customer_acv}}" //my org field (type numeric)
    }]
    }
    }

    And I created an HTTP target like that:
    https://Domain/api/v2/tickets/{{id}}.json+-u+myemail@mydomain.com/token:MyToken

    Instead of https://Domain/api/v2/tickets/{{ticket.id}}.json+-u+myemail@mydomain.com/token:MyToken

    Do you know what is going wrong here?

    Dan32
    January 2, 2020

    Hey Alexandre,

    Happy new year!

     

    Can you try {{ticket.organization.custom_fields.customer_acv}} instead? The placeholder docs show these two methods as being the way to get to that data. 

    ticket.organization.custom_fields.<key_name>

    ticket.organization.custom_fields.<field_key>.title

     

    Let us know how it goes!

    Maria17
    April 1, 2020

    Hi.

    Thanks everybody to give me that excellent idea!

    I fill a ticket field using extension option:

    The URL is my domain on zendesk as:

    https://domain.zendesk.com/api/v2/tickets/{{ticket.id}}.json

    Then on the message body I put the sentence:

    In this way I put a text value on the text ticket field.

    You also can take this value on an other ticket field.

    Thank you guys!!!!.

    Maria