Pulling custom Org fields into ticket
Answered
Posted Mar 01, 2018
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?
2
17
17 comments
Maky
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
0
Dan Ross
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!
0
System Message
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?
0
Dan Ross
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.
0
System Message
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?
0
Nicole Saunders
Thanks for sharing those pointers, Tom!
0
Tom Atkins
Thanks for the info in this thread folks - it works!
Couple of things to be aware of:
0
Mark Powell
@Martin
Thanks for looking into this. I've got it to work!! What a genius :) Here's what my trigger looks like.
{"ticket":
{"custom_fields":
[{"id":24090935,
"value":"{{ticket.requester.organization.custom_fields.test}}"}]
}
}
0
Martin Seo
Hey Mark and Randy,
I was able to figure this out after Googling and Frankensteining a couple Community posts together.
The json used in my trigger was:
{"ticket":
{"custom_fields":
[{"id":custom_ticket_field_id,
"value":"{{ticket.requester.organization.custom_fields.field_key}}"}]
}
}
The bolded portions are what you should be filling out with a custom value.
For the ticket, the id is the custom field ID
For the organization, however, the field key is NOT the field id. You have to go to Manage > Organization Fields and use the Field key that pops up on the right when you click on an organization field.
Let me know if this works out for you guys.
0
Randy Schreck
Hi Mark,
No, I was not. And, unfortunately, if I remember Zendesk's response, it's currently impossible and if you do manage it, it's not supported. The reason was something silly like a field merge issue... Even though my requires are explicit in regards to when the Ticket Field is set...
The only solution is to use Tags. Doing so is not pretty; it requires duplicate setup and doesn't work if anything changes (i.e. the value in the Org field changes, the Ticket field in an old ticket doesn't update). However, for all new tickets, it's flawless. We needed this functionality for two different fields. One is fairly constant and just under 100 values, so we went with the Tags solutions. However, the other would have required an ever-evolving list of over 800 values; we gave up on that and just refer to the Org field...
0
Post is closed for comments.