A lookup relationship field is a custom field that you can use to establish relationships between tickets, users, organizations, and custom objects.
You can use the Zendesk API to retrieve lookup relationship data. For example, you can request a list of all tickets related to a specific support manager. To learn more, see Retrieving lookup relationship data with the API in the developer docs.
Understanding lookup relationship fields
A lookup relationship field is a type of custom field that you can add to users, organizations, tickets, and custom objects in Zendesk. After adding a lookup relationship field, team members can use it to establish relationships with other users, organizations, tickets, or custom objects.
You can add a lookup relationship field to ticket forms, user profiles, organization pages, and custom object schemas. When you do, agents can use this field to look up and select from a list of users, organizations, tickets, or custom object records in your Zendesk account.
You can use lookup fields in creative ways that serve your specific business needs. For example, you could create a lookup field called Manager, tie that lookup field to your account's users, and add the field to your ticket form. Your agents could then use this field on a ticket to select a manager from a list of your organization's users.
Topics covered in this section:
Understanding the custom field
A lookup relationship field is a custom field that lets you look up and select from a list of users, organizations, tickets, or custom object records in your Zendesk account. The following example shows a lookup relationship field on a ticket. When a team member clicks the field, an auto-populated list of options is provided as you type in the field. You don't have to define the options yourself, as you do for other dropdown custom fields, although you can filter the available options when defining the field.
After selecting a record in a ticket lookup relationship that points to a custom object, you can preview the record details within the ticket.
After selecting a record in a user, organization, or custom object lookup relationship field, you can view the record details by clicking the field name:
You can add lookup relationship fields to the following pages in the Zendesk interface:
- Tickets or the support request form in your help center
- The user profile page
- The organization page
- Custom objects
These pages represent the possible source object of a relationship. For example, a user displayed in the user profile page can be the source object of a relationship with another user, organization, ticket or custom object. The lookup relationship field lets you select the other object — also known as the related object — in the relationship.
You can make a lookup relationship field conditional so that it only appears to agents under certain circumstances. See Creating conditional ticket fields and Configuring agent access to custom object records.
Understanding the relationships
A lookup relationship can be expressed as follows:
source object → related object
The source object is the Zendesk object that contains the lookup relationship field (among other fields). It can be a user, organization, ticket, or custom object. The related object is the object specified by the lookup relationship field. It can also be a user, organization, ticket, or custom object. Lookup relationships with legacy custom objects are not supported.
A lookup relationship can be any combination of a user, organization, ticket, or custom object with another user, organization, ticket, or custom object.
If you create a relationship between a source ticket and a related user, the ticket record will have a lookup relationship field identifying the user. However, the corresponding user record will not have a field identifying the ticket. Instead of a field, the user record will have a Related tab listing the ticket along with all the other source objects it’s related to.
Each source object can be related to only one related object. However, many source objects can be related to one related object. For example, after adding an organization lookup relationship field to users, you could then establish many relationships between users and one organization. Example:
- User 1 - Org A
- User 2 - Org A
- User 3 - Org A
- ...
You can view the relationships in ticket forms, user profiles, organization pages, and custom object record details.
You can also use the Zendesk API to list the users, organizations, tickets, or custom object records related to a specific related object. For example, you can request a list of all tickets related to a specific support manager. To learn more, see Retrieving lookup relationship data with the API in the developer docs.
Searching records by lookup relationship field values is not supported.
Examples
There are many ways you can use lookup relationship fields to build out complex relationship ecosystems within Zendesk Support. The following are some examples to help you start thinking about ways you can use these custom fields:
-
You're an admin for a trucking company and you want to associate shippers, drivers, and recipients with tickets. You add three filtered lookup relationship fields to tickets: a user field named Drivers, an organization field named Shippers, and another organization field named Recipients.
-
Your company is in the business-to-business (B2B) space and interacts with many other companies. You want to track the relationships these companies have with each other. You decide to use organization lookup relationship fields to create and track these relationships. For example, you might have a field named Partner, a second named Subsidiary, and a third named Competitor.
-
In another business-to-business scenario, each of your account managers works with a key stakeholder at each of your customer companies. You create a user lookup relationship field named Account Manager to establish relationships between the stakeholders and your account managers.
-
You want to designate emergency contacts for members on your team in case a member is not available. You decide to use a user lookup field named Emergency Contact to create these user-to-user relationships. In a more complex use case, you could add additional user fields, for example Backup 1 and Backup 2, to establish a priority of backups for each person.
- You run an IT desk and want users to select the asset about which they are
submitting a ticket within the ticket form. To accomplish this, you define a
ticket lookup relationship field named Related asset that points to a
custom object named Asset. The lookup field is configured to filter
results so that only records pertaining to the user are available for
selection, and it's marked as required on the IT ticket form.Note: Lookup fields in ticket forms are only visible to end users who are signed in.
Adding lookup relationship fields
Tickets, users, and organizations can each have up to ten active lookup relationship fields. Custom objects have plan-based limits on lookup relationships per custom object. The fields are displayed on pages in the Zendesk interface.
You can also create lookup relationship fields with the Zendesk API. See Lookup Relationships in the API reference docs.
If you delete a lookup relationship field, the data in the field isn't preserved. To preserve the data, deactivate the field rather than deleting it.
To create a lookup relationship field
- Start by adding a custom field to your users, organizations, tickets, or
custom object and select Lookup relationship as the custom field
type. For more information, see:
- Adding custom fields to your tickets and ticket forms
- Adding custom fields to users
- Adding custom fields to organizations
- Defining a custom object's schema with custom fields
Example:
- Set the Display name, Field key, and Description as described in the articles linked from step 1.
- Select a related object to list in the lookup relationship field.
This can be a Ticket, User, Organization, or the name of a custom object. For example, if you select User as the related object, the lookup relationship field will display a list of Zendesk users.
- Click Add filter to define one or more filters to reduce the number
of options that the field can display.
You can filter objects by any number of tags or custom fields. For more information, see Filtering the field's options.
- Click Save.
Filtering the field's options
Your account could have thousands or even millions of ticket, user, organization, and custom object records. In most cases, you'll want a defined subset of records for the options in your lookup relationship fields. For example, you might want to list only users who are account managers.
All lookup relationship fields that target standard objects can filter the
records of the related object by tag. For example, to list only users who are
account managers, you could add an "account_manager" tag to the user profiles of
your account managers and then define the following filter condition for the
lookup relationship field: Tags | Contain at least one of the following
| account_manager
. This isn't possible for lookup fields that
target custom objects.
- Lookup fields that target tickets have the following additional default filters are available: Status, Type, Priority, Assignee, Requester, Form, Organization, and Channel.
- Lookup fields that target users have an additional Role filter available.
- Ticket lookup relationship fields that target other objects can dynamically restrict the object records available for selection within the lookup field by using additional filters based on the ticket's current user, assignee, requester, and organization.
Lookup relationship fields also support filtering by other custom fields added to
the related object. For example, if you add a Security Clearance custom
checkbox field to the user profile, the Security Clearance field will
appear as a filter option when you add the lookup relationship field. You could
then define the following filter condition for the field: Security
Clearance | Is | Checked
.
You can modify the filters at any time. This won't affect the values previously selected within lookup relationship fields.
To learn more, see About custom fields and Building trigger condition statements.
Viewing lookup relationships
Establishing relationships between records is important for building out your complex data model. However, it's also important to see and interact with those relationships within Zendesk. Each user profile, organization, and custom object record displays a list of related records. For tickets, any related records are visible as values within the ticket fields.
Clicking on lookup relationship fields opens the related record's details in a new tab in Support.
Viewing records related to users and organizations
Each Zendesk Support profile for a team member, end user, or organization includes a Related tab that lists all related source objects. The information is grouped by the type of source object (Tickets, Organizations, Users, or Custom objects) and the specific lookup field.
In the following example of a team member profile, tickets have a lookup relationship field called Driver. If Annie Porter is selected in the Driver field, that ticket appears under the Related tab on her team member profile. It’s grouped by the type of source object, Tickets, and the name of the lookup field, Driver.
The Related tab doesn’t appear on user profiles in your help center.
Viewing records related to tickets
Within a ticket, lookup relationship fields are displayed like any other fields in the ticket field panel.
For lookup fields pointing to organizations, users, or other tickets, clicking on the field opens the record in a new tab in Support. If the lookup field points to a custom object, you can view the record's details within the context panel without navigating away from the ticket you're working on. See Interacting with related object records in tickets.
Viewing records related to custom objects
Similar to users and organizations, when you view a custom object record's details, you'll see all values for all of the object's fields on the left and then a list of related records grouped by the source object's type on the right.
Icon | Source object |
---|---|
Custom object | |
Organization | |
User | |
Ticket |
The following example shows the details for record 256 of the Project custom object. In addition to the specific details about project 256, you can also see that this project is related to 3 tickets via a lookup relationship field on the ticket () named Project Code that points to the Project object.
Using lookup relationship fields in triggers and views
You can use lookup relationship fields to help define triggers and views.
When adding a condition to a trigger or view, any lookup relationship fields also appear in the list of options. In the following example, the first condition of a trigger is a user lookup relationship field named Support Manager. The trigger will only fire for tickets associated with the support manager named Jennifer Hanson.
You can also use lookup relationship fields in the actions of your triggers. In the following example, the action sets the value of the organization lookup relationship field named Company Organization to Northwest Region when the trigger fires.
In addition to using the record name specified in lookup fields in trigger conditions and actions, you can also reference the related record's fields within your conditions and actions. For example, if you have a ticket lookup relationship field named Software requested that points to a custom object named Software, you could use the Software requested lookup field to create conditions and actions around the record selected within the lookup field—as in a record is or isn't present, or the record's name is or isn't set to a specific value—or you can reference other fields within the record, such as a Approval required checkbox being selected or not within the record related to the ticket. For more information about using lookup relationship fields that target custom objects in triggers, see Using custom objects in triggers.
You can also use placeholders to retrieve information about the target record in a lookup relationship field. This is true for lookup fields pointing to other tickets, users (requester), and organizations. The ID can then be used in API requests, such as to assign the ticket to the user specified in a lookup field or notify the manager of the user specified in a lookup field that their approval is required.
87 comments
Mark Ganusevič
Hi!
This is a very cool feature, but I don't see anything related to Explore? When will these fields become reportable in Explore?
Thank you!
6
Brett Bowser
It doesn't look like this is currently on the roadmap but something the team is working with our Explore team on. Currently in early discussions so we don't have any additional information to share at this time.
Let me know if you have any other questions!
0
Shayan Moussawi
Are there any plans to allow this particular option within the Zendesk interface?
"You can also use the Zendesk API to list the users, organizations, or tickets related to a specific related object. For example, you can request a list of all tickets related to a specific support manager. To learn more, see Retrieving lookup relationship data with the API in the developer docs."
Listing all records related to a specific object would be really useful
0
Pedro Cassian
would like to see more use case scenarios of this to see If I get an idea to implement this
13
Bobby Koch
+1 Pedro Cassian - i feel like i have a few ideas where this could be helpful, but nothing that would be too helpful immediately..
2
Serge Mucibabic
Hi,
This is a nice addition.
Can related field be used on the right side of the action in triggers?
For example, I created a user custom 'lookup' field called Deputy Agent, with the intent to use it in case of an absence of the ticket assignee. The Deputy Agent field appears in the agent profiles and any agent name can be picked from the drop-down list, which works just fine.
In my trigger, I'd like to add an action: Assignee = Deputy Agent
Unfortunately, this selection doesn't seem to be possible.
P.S. I am aware of the Out of Office App.
1
Dan Sowden
Hi,
I'm really excited about using this new functionality, but I have some observations about the two biggest challenges I foresee in us adopting this:
Firstly, for user objects we have a drop-down that's hard-coded for a list of our agents to add an "Incident Manager" field on tickets. For this we have triggers to automatically update this value on first assignment and agents maintain their own views of their tickets. We could easily switch this out using a lookup relationship field, except that the main benefit should be to add a view of "My Managed Tickets" where the condition is to have the incident manager = "(current user)" instead of having each agent maintain their own views, but this is not an option. Also, we could retire all of the agent specific triggers with a single one that updates the field to "(current user)", but the same restriction applies here.
Secondly, for ticket objects - for some incidents we always want a problem ticket to be created, so we could use one of these fields for this purpose and make it mandatory for solving the ticket. However, where we currently use problem tickets there's an easy way to view all incidents linked to it - this won't exist using a lookup relationship. The best solution I can find would be to search for "fieldvalue:1234", which may bring back other tickets which have a number the same as the ID in a different field, or the even less convenient search "custom_field_64286819...:1234" and have all agents save the field ID for searching.
I think these would be the two main sticking points I will have with my agents if I try to move us across to this feature - which is a shame because I suspect that these will stop us fully embracing this great new functionality.
Can you confirm if these two cases have been considered or what the roadmap looks like to more fully integrating these fields into other areas of the system?
Thanks in advance!
Dan
3
Michael M. Adams
I have setup an "organization lookup" field.
Currently, when you view an organization, you can see all the tickets and all the users... it would be great if I could view all the associated tickets that have that organization listed.
0
Zack McCarty
Michael M. Adams
Can you shed some light on how you are using the organization lookup field? I recently submitted this product feedback and am wondering if you might have figured out how to achieve this
https://support.zendesk.com/hc/en-us/community/posts/4887954391066-Auto-Populate-Ticket-Form-with-Lookup-Fields-without-having-to-submit
0
Michael M. Adams
For us, one client may have multiple associated vendors and one vendor may have multiple associated clients.
When a vendor submits a ticket, we use the lookup field to associate the applicable client with that ticket. We use that associated field to display in all of our views so we can see the requester and associated organizations (client or vendor) with that ticket. That is my only use case for the moment until Zendesk expands the lookup field functions.
My hope is that Zendesk will allow those associated tickets to show up under the organizations Zendesk page so we can see all the tickets associated with those organizations (and visa versa).
0
Bobby Koch
Just a heads up, the Organization is condition for filtering objects seems to be broken, or I just do not know how to use it.
0
Bobby Koch
Also, it would be cool if the org and requester operations could do something like:
- Requester is "Current end-user" and only show the related tickets for that user and the same for any tickets for that user or that are in the org. Would make it easy to identify related tickets across the same user, i think?
0
Dan Sowden
There appears to be a limitation for this field type which I've not seen for any other ticket fields:
I'm not able to find any documentation explaining this limitation, bit this is a total of 5 such fields including deactivated fields - not just active fields.
1
Shameen Rana
Hi,
Is there any way to notify(send email to) the user in lookup field of Users on Ticket about certain activity on ticket?
1
Bobby Koch
Thomas (internalnote.com) it says in the article that they are supported... but you are a zendesk moderator and have 4 upvotes, which worriesme... or is it just Ticket type of lookup fields is not supporteD?
0
Ahmed Esmat
That is what I am looking for. But I have done some testing and found out If it is of user type:
- Cannot be used in views to filter on “(current user)”
- Cannot be used in trigger actions to send emails
- Cannot be sent an email in automations
So, that is not a complete solution/feature!
Is there any solution to this?
3
Christine
We'll continue to assist you on the ticket you raised with our support team. Kindly check your email for updates. Thanks!
0
Stephen Barbarino
This is great, but I'd love for their to be a lookup field available for end users. For example, a manager submitting an equipment request ticket for an employee would select the employee in a lookup field.
It's a bit crazy this isn't already available.
2
Mason McCoy
Ditto to Marks' comment, we'll also need to be able to report on these fields in Explore.
0
Carlos Santos
Unfortunately, I have to agree that this looks like a half-baked feature. Lots of potential but then (according to Zendesk support on using user lookup fields in views):
(...) you are not able to use end-user identities as a condition. Even if this is within a lookup relationship field with no filters on it. You are able to add a custom lookup relationship field to the columns for a custom view, but you cannot use that field to group or order the view (...)
So forget about having views that show tickets where in the lookup field you have end-user X. And forget about grouping or sorting views using those fields...
Very disappointing.
And I haven't checked Explore yet...
4
Ashwin Raju
Hi Folks.. I do see a few unanswered questions.. Sorry for the delay in responses. Let me start with questions from the top:
Shayan Moussawi - You should have the Related Tab in your Users and Organizations page by now. This will enable you to let's say view the Tickets or Organizations where Shayan was a Relationship Manager. The details have been updated in the article.
Pedro Cassian, Bobby Koch - Since you posted this request, we had added a few examples that we have seen customers using Lookup fields for. Do let us know if there is any specific use case you'd like to validate. We'd be happy to help
Serge Mucibabic - At this point, we don't have any plans to add Lookup fields to the right side of the trigger. I will bring it up internally to see the possibilities of that option. My assumption here is that Deputy Agent is a field in the Agent's profile. And when you assign Serge as the Assignee to the ticket, based on a condition, you want the Assignee to automatically change to the Deputy Agent.
Dan Sowden - For the first point, I definitely see the value of it.. I was however wondering if you could use the Related Lists tab capability for this use case. But I do empathize with the pain point for the Incident manager to go to their user profile to see the list of tickets. For the second point, my understanding is that you are trying to build a ticket->ticket relationship.. You could potentially create a sidebar app to bring out the incident tickets that are associated with the problem ticket. We do have APIs for surfacing this information. Would love to hear your thoughts on this
Michael M. Adams - Was the Related List feature able to solve for your use case?
Thomas (internalnote.com) , Stephen Barbarino - We are currently in the process of discussing the ability for Lookup fields to be accessible from Guide. There are additional nuances around permissions that we need to figure out. Our customers wouldnt always want their end customer to access all your users, organizations or tickets through Lookup fields access. We will have an update on the timelines for you in the first half of next year. BTW - appreciate the use cases you have shared.
Shameen Rana - This is something that we are actively working on. Let me double confirm with the team and ensure that I give you the latest information. Do you mind sharing your use case for sending an email to users associated with a lookup field?
0
Ashwin Raju
Mason McCoy, Mark Ganusevič - The good news is that integration for Lookup fields working with Lookup fields is in the plan for 2023. I will let you know any specific dates once we get to a more specific date range.
0
Ashwin Raju
hi Carlos Santos - I am sorry to hear that you weren't satisfied with the feature.
Could you share your use case on why you wanted to use end user value in a Lookup fields to be used as a condition in a view?
1
Carlos Santos
Hi Ashwin Raju.
We have tons of situations where the ticket is pending on specific users of our Zendesk (approval, participation, clarification, execution, etc). And they may be agents or end-users. So I'm using a lookup field to allow the agents to associate each ticket with the user the topic is pending on and I also record the date. And that part works fine.
However, I need my agents to be able to create views where they have the tickets pending on specific users (one or more) and at this point we can use lookup fields as criteria but we can only search for agents. No good.
Additionally, even if we could specify one or more end-users as criteria, we can't use the lookup field to group or sort the view. If we have a view that lists a lot of tickets pending on a lot of different users, that would come handy. But we can't. Also no good.
On top of that, maybe we could use Explore to generate dashboards to take the place of the views we can't create. Big NO on that one as well.
My workaround: I have a parallel field (simple drop-down) where, using external API automations, I create an option for the user the ticket is pending on. When I change the lookup field, the automation updates the options in the parallel drop-down and updates the ticket with the correct option. Given that the simple drop-down does, in terms of views and Explore, everything the lookup field can't, the issue is resolved.
But let's be honest, it's a major overkill. The lookup field should do it all.
Thank for looking into this.
4
Stephen Barbarino
Hi Ashwin, thanks for taking the time to address all of the questions individually, that's really appreciated. I'm not sure I fully understand the concern though. If a Zendesk customer doesn't want to expose data through lookup fields to their end customer through guide wouldn't they just not use a lookup field then?
Our use case around Zendesk is focused on an internal customer base where having the ability to lookup users would really help. When we were evaluating products to be used as an internal ticketing and service management platform, the Zendesk team said this would be possible but I can honestly see us outgrowing this solution in a few years without this functionality.
0
Bobby Koch
Plus 1^
we have a lot of feedback for this feature, feels like it has a LOT of potential that we are only jsust starting to see.
0
Dan R.
I would love if the Zendesk supported Salesforce Integration could be compatible with Lookup fields. Being able to model parent/child relationships in Zendesk would huge!
3
Guilherme Santi Clair Da Silva
Caros, boa tarde!
Ao utilizar esse campo, não é inserido a tag conforme os demais campos, como por exemplo de lista suspensa que registra a informação selecionada.
Alguém já passou por isso?
0
Ashwin Raju
Carlos Santos - Thank you so much.. This helps.. I was also able to get a few more use cases on this. And have sent it over to the tech team for checking feasibility and effort. Will keep you posted on this.
Stephen Barbarino - Let's take an example. In the very near future you will be able to point Lookup fields to a new version of Custom objects that my team is currently building. Let's assume "Shoe La La" as a hypothetical company that maintains Order information in their custom objects. They associate the specific order in their return process through a Lookup field and want their customers to select the specific order they want to return. John Doe, a customer of Shoe La La, wants to return a shoe that he purchased. John goes to guide, creates a return request and at this point is asked to fill in the order which he wants to return. This lookup field should not pull up all the orders in Shoe La la, but should only pull up orders associated with John..
The whole purpose of the Admin exposing the order lookup field in the return form is reduce the effort of the agent by passing it on the end customer. However, in such a circumstance, it is critical that the Admin has the ability to control what the end user sees.
Dan R. - Totally agreed. Are you thinking mapping the Lookup fields in Salesforce to Lookup fields in Zendesk .. Or the Master detail relationships to something similar in Zendesk?
Guilherme Santi Clair Da Silva - This field does not insert tags into the Ticket, User or Organization like a drop down. Think of this field type as similar to a Requester field or an Assignee field. Was there a specific use-case that you were trying to utilize tags for ?
Google Translated(Hopefully google translated it right :) ) : Este campo não insere tags no ticket, usuário ou organização como um menu suspenso. Pense nesse tipo de campo como semelhante a um campo Solicitante ou Destinatário. Houve um caso de uso específico para o qual você estava tentando utilizar tags?
1
Dan R.
Hi Ashwin Raju
We have parent/child account models in our Salesforce and have a Hierarchy field type on the child accounts that provide an easy link back to the parent. Both accounts are synced to Zendesk, but it would be amazing to be able to also model that relationship. We have the SF Account IDs mapped to the Organization external ID attribute, so it would be great if we could use the external ID being used in that field type to also create the same relationships as part of the sync.
0