Viewing related tickets via lookup relationship field | Community
Skip to main content

Viewing related tickets via lookup relationship field

  • October 13, 2023
  • 2 replies
  • 0 views

Chris19

Hi All

I've been playing around with some of the added functionality to lookup fields and custom objects in general. I really like the idea of creating a tree of related tickets and I'm looking for some use cases for my org. 

 

Question:

If I have one or more source tickets linked to a related ticket, and I have the related ticket open, how do I see all of the source tickets it's related to?

 

Example:

Ticket A (source) has a lookup field with ticket Z (related) selected.

Ticket B has a lookup field with ticket Z selected.

Ticket C has a lookup field with ticket Z selected. 

If I'm looking at ticket A, B, or C, I can see ticket Z in the lookup relationship field. 

If I'm looking at ticket Z, I am not able to see tickets A, B, or C. 

Maybe I'm missing something?

 

Use case:

(layer 1) Employee Onboarding request

(layer 2) Tickets handled by different groups for: Laptop, Software, order home equipment, all related to layer 1 ticket

It was be great to look at the primary employee onboard request and see all of the related tasks associated with it.

2 replies

  • November 13, 2023
Hi Chris,

You can use the Zendesk API to retrieve lookup relationship data. For example, you can request a list of all tickets related to ticket Z. To learn more, see Retrieving lookup relationship data with the API in the developer docs.

An example you can call would be something like:

GET
https://yoursubdomain.zendesk.com/api/v2/zen:ticket/target_ticket_ID/relationship_fields/ticket_field_ID/zen:ticket

You should then get a list of all the tickets related to the target ticket. 

I hope this helps! 

Would love to native functionality in ZD to see related ticket the say way you can for problem tickets with linked incidents. I love that functionality but want it for other use cases.