Creating many-to-many relationships in Zendesk

<body>
<p id="docs-hc-snippet" style="display: none;">This article explains how to use relationship fields to define data-rich many-to-many relationships in Zendesk for tickets and custom objects.</p>
<div class="article-banners">
<div id="docs-wmp-link">
<a href="https://support.zendesk.com/hc/en-us/articles/5411234991258-plan" rel="noopener" target="_blank">What's my plan?</a>
</div>

<div class="article-banner" id="suite_pee">
<table>
<tbody>
<tr>
<td>
<strong>All Suites</strong>
</td>
<td>Professional, Enterprise, or Enterprise Plus</td>
</tr>
</tbody>
</table>
</div>

<div class="article-banner" id="support_e">
<table>
<tbody>
<tr>
<td>
<strong>Support</strong>
</td>
<td>Enterprise</td>
</tr>
</tbody>
</table>
</div>

</div>
<div id="docs-ai-summary">
<p id="docs-ai-summary-toggle">Summary: <span id="up-triangle">◀</span><span id="down-triangle">▼</span></p>
<p id="docs-ai-summary-content">You can create many-to-many relationships between tickets and custom objects using multi-lookup fields or junction objects with parent-child fields. This setup helps manage complex associations like multiple assets assigned to multiple employees. You can view these relationships in ticket fields or related object records, improving data organization and visibility for support teams managing interconnected records such as assets and users.</p>
</div>

<div class="body">

<div class="p">Within Zendesk Support, you can use lookup relationship fields to create many-to-one
relationships between objects. However, there are many scenarios that would be more
accurately represented by a many-to-many relationship. For example:<ul class="ul" id="topic_kvz_zqw_jdc__ul_s4x_dtv_gkc">
<li class="li">Employees might be assigned multiple assets and an individual asset might be
assigned to multiple employees.</li>
<li class="li">Multiple assets might be associated with an individual ticket and multiple
tickets could be opened for a single asset.</li>
</ul>
</div>
<p class="p">This article explains how to use relationship fields to define data-rich many-to-many
relationships in Zendesk for tickets and custom objects.</p>
<div class="p">This article includes the following topics:<ul class="ul" id="topic_kvz_zqw_jdc__ul_w42_lxs_kdc">
<li class="li"><a class="xref" href="#topic_fzy_qvv_gkc">Creating many-to-many relationships with tickets</a></li>
<li class="li"><a class="xref" href="#topic_axv_rvv_gkc">Creating many-to-many relationships with other objects</a></li>
<li class="li"><a class="xref" href="#topic_xmz_ysp_ldc">Viewing many-to-many relationships</a></li>
</ul>
</div>
</div>
<div aria-labelledby="ariaid-title2" class="topic nested1" id="topic_fzy_qvv_gkc">
<h2 class="title topictitle2" id="ariaid-title2">Creating many-to-many relationships with tickets</h2>
<div class="body">
<p class="p">Creating many-to-many relationships for tickets is as simple as adding a custom
multi-lookup field. Before creating a multi-lookup field, review the <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/11157821573402#topic_czm_1dz_hkc" target="_blank">considerations</a> and best practices.</p>
<div class="p">
<strong class="ph b">To create many-to-many relationships with tickets</strong><ol class="ol" id="topic_fzy_qvv_gkc__ol_o1d_cwv_gkc">
<li class="li"><span class="ph">In <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4581766374554#topic_hfg_dyz_1hb" target="_blank">Admin Center</a>, click <img class="image" id="topic_fzy_qvv_gkc__image_hkq_x3c_ksb" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/ac_objects_rules_icon.png">
<strong class="ph b">Objects and rules</strong> in the sidebar, then select <strong class="ph b">Tickets &gt; Fields</strong>.</span></li>
<li class="li">Click <strong class="ph b">Add field</strong>.</li>
<li class="li">From the list of field types, select <strong class="ph b">Multi-lookup</strong>.</li>
<li class="li">Enter a <strong class="ph b">Display name</strong>.<p class="p">When naming custom fields, don't use reserved
system or feature names such as "channel." These names are reserved by
Zendesk and won't work in custom fields.</p>
</li>
<li class="li">(Optional) Enter a <strong class="ph b">Description</strong> for the custom field. This is visible
to admins only.</li>
<li class="li">Under <strong class="ph b">Permissions</strong>, select an option:<div class="p">
<ul class="ul" id="topic_fzy_qvv_gkc__ul_lcv_y2c_cdb">
<li class="li">
<strong class="ph b">Agents can edit</strong>: Only agents can view and edit the field.
It appears in tickets.</li>
<li class="li" dir="ltr">
<strong class="ph b">Customers can edit</strong>: Agents and end users can view and
edit the field. It appears in tickets and in the support request
form in the help center.</li>
<li class="li">
<strong class="ph b">Customers can view</strong>: Agents can view and edit the field.
End users can only view the field. It appears in tickets and on
end users' <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408846805530#topic_qgd_mqd_yy" target="_blank">requests</a>, but isn't
included in the support request form in the help center.
</li>
</ul>
</div>
<p class="p">For a single ticket form, the new field
automatically appears in your ticket form. If you use multiple ticket
forms, you'll have to manually add the field to any ticket forms you'd
like to include it in.</p>
</li>
<li class="li">Under <strong class="ph b">Related object</strong>, select the standard or custom object you want
to relate to tickets.<p class="p">Each multi-lookup field can have a maximum of 20
related objects.</p>
</li>
<li class="li">(Optional) Click <strong class="ph b">Add filter</strong> to define one or more filters to reduce
the number of options the field can display.<p class="p">You can filter objects by any
number of tags or custom fields. For more information, see <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4591924111770?Z2#topic_t14_w3l_5tb" target="_blank">Filtering relationship field
options</a>.</p>
</li>
<li class="li">Click <strong class="ph b">Save</strong>.</li>
</ol>
</div>
</div>
</div>
<div aria-labelledby="ariaid-title3" class="topic nested1" id="topic_axv_rvv_gkc">
<h2 class="title topictitle2" id="ariaid-title3">Creating many-to-many relationships with other objects</h2>
<div class="body">
<p class="p">To create custom many-to-many relationships between objects other than tickets, you
must use a custom object with parent-child relationship fields. This is accomplished
through the creation of an object that is used as an intermediary or <em class="ph i">junction</em>
object. Specifically, you must take the following steps to build this sort of
relational model.</p>
<div class="p">
<strong class="ph b">To create many-to-many relationships using custom objects</strong><ol class="ol" id="topic_axv_rvv_gkc__ol_grb_fvt_kdc">
<li class="li">Identify the two objects you want to build a many-to-many relationship
between. Think of these as the primary objects.</li>
<li class="li">Create an intermediary custom object (the junction object) with two
parent-child relationship fields, one pointing to the first primary object
and another pointing to the second primary object, as well as any other
custom fields you might want.</li>
<li class="li">Create records for the junction object.<p class="p">The records will be visible as
related under both primary objects.</p>
</li>
</ol>
</div>
</div>
<div aria-labelledby="ariaid-title4" class="topic nested2" id="topic_hj4_mxs_kdc">
<h3 class="title topictitle3" id="ariaid-title4">Example: Creating many-to-many relationships for non-ticket objects</h3>
<div class="body">
<p class="p">There are a variety of valuable use cases for complex many-to-many relationships
between objects in Zendesk. This topic uses the example of an IT team managing
assets assigned to employees to demonstrate how to configure many-to-many
relationships between objects other than tickets. In this scenario, employees
are typically assigned to multiple assets and some assets can be assigned to
more than one user at a time.</p>
</div>
<div aria-labelledby="ariaid-title5" class="topic nested3" id="topic_zft_3f4_ldc">
<h4 class="title topictitle4" id="ariaid-title5">Step 1: Identify the primary objects</h4>
<div class="body">
<p class="p">In this scenario, the two primary objects are <em class="ph i">User</em> and <em class="ph i">Asset</em>. </p>
<p class="p">Users is a standard Zendesk object that records users in all roles for the
account. In this case, we'll focus on the user records associated with the
employees. User records consist of standard fields, such as name, email, and
phone, as well as any other custom user fields that admins created, such as
preferred communication channel or designation.</p>
<div class="p">Asset is a custom object <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/5392409465370" target="_blank">created</a> by an admin with the
following fields:<ul class="ul" id="topic_zft_3f4_ldc__ul_kj3_5g4_ldc">
<li class="li">
<strong class="ph b">Asset name</strong>: A text field with the name of the asset.</li>
<li class="li">
<strong class="ph b">Serial number</strong>: A text field used to record serial numbers
associated with hardware assets.</li>
<li class="li">
<strong class="ph b">Product type</strong>: A drop-down field with the following options:
Hardware, Software, and Subscription.</li>
<li class="li">
<strong class="ph b">Purchase date</strong>: A date field that reflects when the asset was
acquired.</li>
<li class="li">
<strong class="ph b">Warranty expiration</strong>: A date field that reflects when the
warranty for the asset expires.</li>
</ul>
</div>
<p class="p">For the purposes of this example, user records and asset records already
exist. If they didn't, an admin could use the <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/6280564143514" target="_blank">data importer</a> to bulk import
records.</p>
</div>
</div>
<div aria-labelledby="ariaid-title6" class="topic nested3" id="topic_o5r_dh4_ldc">
<h4 class="title topictitle4" id="ariaid-title6">Step 2: Create the junction object</h4>
<div class="body">
<p class="p">In this scenario, the junction object is used to connect multiple users and
assets. This is accomplished by adding at least two lookup relationship
fields to the object, one connecting to each of the primary objects.</p>
<div class="p">
<strong class="ph b">To create the asset assignment junction object</strong><ol class="ol" id="topic_o5r_dh4_ldc__ol_lv3_c1f_lwb">
<li class="li"><span class="ph">In <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4581766374554#topic_hfg_dyz_1hb" target="_blank">Admin Center</a>, click <img class="image" id="topic_o5r_dh4_ldc__image_tm2_1jc_ksb" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/ac_objects_rules_icon.png">
<strong class="ph b">Objects and rules</strong> in the sidebar, then select <strong class="ph b">Custom objects &gt;
Objects</strong>.</span></li>
<li class="li">Click <strong class="ph b">Create object</strong>.</li>
<li class="li">Enter the following information:<ul class="ul" id="topic_o5r_dh4_ldc__ul_acl_c2f_lwb">
<li class="li">
<strong class="ph b">Name</strong>: Asset assignment</li>
<li class="li">
<strong class="ph b">Plural display name</strong>: Asset assignments</li>
<li class="li">
<strong class="ph b">Object key</strong>: asset_assignment</li>
<li class="li">(Optional) <strong class="ph b">Description</strong>: A junction object to relate
many users and many assets.</li>
</ul>
</li>
<li class="li">Click <strong class="ph b">Create object</strong>.</li>
<li class="li">Open the custom object's <strong class="ph b">Name</strong> field (field key
<strong class="ph b">standard::name</strong>), and make the following changesL<ul class="ul" id="topic_o5r_dh4_ldc__ul_wzr_zvw_ldc">
<li class="li">Change the <strong class="ph b">Name</strong> to <strong class="ph b">Assignment ID</strong>.</li>
<li class="li">Under <strong class="ph b">Record name type</strong>, select <strong class="ph b">Name records with
autonumbering</strong>, and enter a <strong class="ph b">Prefix</strong> of
<strong class="ph b">Assignment#</strong>and a <strong class="ph b">Starting number</strong> of
<strong class="ph b">0000001</strong>.</li>
</ul>
<div class="note" id="topic_o5r_dh4_ldc__note_ktj_fwv_gkc">
<span class="notetitle">Note:</span> Record naming settings can't be
changed after records are created for the custom
object.</div>
</li>
<li class="li">Click the <strong class="ph b">Fields</strong> tab and click <strong class="ph b">Add field</strong> to <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/5392409465370#topic_cq4_1sn_lwb" target="_blank">add the following custom fields
to the object</a>. <ul class="ul" id="topic_o5r_dh4_ldc__ul_lr5_hm4_ldc">
<li class="li">Select <strong class="ph b">Parent-child</strong>. Set the <strong class="ph b">Name</strong> to
<strong class="ph b">Employee</strong> and under <strong class="ph b">Select a parent object</strong>,
select <strong class="ph b">User</strong>.</li>
<li class="li">Select <strong class="ph b">Parent-child</strong>. Set the <strong class="ph b">Name</strong> to
<strong class="ph b">Asset</strong> and under <strong class="ph b">Select the parent object</strong>,
select <strong class="ph b">Assets</strong>. You can also choose to inherit the
User record’s permissions, which ensures that you can only
see assignments for Assets you have access to.</li>
<li class="li">Select <strong class="ph b">Date</strong> and set the <strong class="ph b">Name</strong> to <strong class="ph b">Start
date</strong>. Optionally, add the following description:
<strong class="ph b">The date the asset was assigned</strong>.</li>
<li class="li">Select <strong class="ph b">Date</strong> and set the <strong class="ph b">Name</strong> to <strong class="ph b">End
date</strong>. Optionally, add the following description:
<strong class="ph b">The date the assignment ends</strong>.</li>
<li class="li">Select <strong class="ph b">Multi-line</strong> and set the <strong class="ph b">Name</strong> to
<strong class="ph b">Notes</strong>. Optionally, add the following description:
<strong class="ph b">A multi-line text field for agents to capture
additional information about the assignment</strong>.</li>
</ul>
</li>
</ol>
</div>
<p class="p"><img class="image" id="topic_o5r_dh4_ldc__image_lx3_2mx_ldc" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/many_to_many_LURFs_junction_object.png" width="600"></p>
</div>
</div>
<div aria-labelledby="ariaid-title7" class="topic nested3" id="topic_qx5_xt4_ldc">
<h4 class="title topictitle4" id="ariaid-title7">Step 3: Add records to the junction object</h4>
<div class="body">
<p class="p">To build out the relationships between assets and employees, you'll create
asset assignment records. Because of the lookup relationship fields, the
data in the asset assignment records is visible in the related object's
records, too. In this case, an employee's profile will list all assigned
assets and an asset record will list all assigned employees.</p>
<p class="p">For the purposes of this example, we're going to add asset assignment records
involving two agents (William Carlton and Harper Yoshimoto) and three assets
(A001, A002, and A003).</p>
<div class="p">
<strong class="ph b">To add asset assignment records for an employee</strong><ol class="ol" id="topic_qx5_xt4_ldc__ol_wnj_dqp_ldc">
<li class="li"><span class="ph">In <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/4408838272410" target="_blank">Support</a>, click <strong class="ph b">Custom
objects</strong> (<img class="image" id="topic_qx5_xt4_ldc__image_llp_p3d_nwb" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/icon_custom_objects_records_page.png">) in the sidebar.</span></li>
<li class="li">Select the <strong class="ph b">Asset assignment</strong> object.</li>
<li class="li">On the <strong class="ph b">Asset assignment</strong> list, click <strong class="ph b">Add</strong>.</li>
<li class="li">Enter the following information, clicking <strong class="ph b">Add</strong> to save each
record, and then <strong class="ph b">Add</strong> to initiate the creation of the
next.<p class="p">The record names are autonumbered, so they won't be
editable.</p>
<div class="p">
<strong class="ph b">Assignment ID</strong>: Assignment#0000094<ul class="ul" id="topic_qx5_xt4_ldc__ul_ktp_mqp_ldc">
<li class="li">
<strong class="ph b">Employee</strong>: Select <strong class="ph b">William Carlton</strong>.</li>
<li class="li">
<strong class="ph b">Asset</strong>: Select <strong class="ph b">A001</strong>.</li>
<li class="li">
<strong class="ph b">Start date</strong>: Select <strong class="ph b">08/05/2022</strong>.</li>
<li class="li">
<strong class="ph b">Notes</strong>: Enter <strong class="ph b">New employee</strong>
</li>
</ul>
</div>
<div class="p">
<strong class="ph b">Assignment ID</strong>: Assignment#0000096<ul class="ul" id="topic_qx5_xt4_ldc__ul_zvw_rrp_ldc">
<li class="li">
<strong class="ph b">Employee</strong>: Select <strong class="ph b">William Carlton</strong>.</li>
<li class="li">
<strong class="ph b">Asset</strong>: Select <strong class="ph b">A003</strong>.</li>
<li class="li">
<strong class="ph b">Start date</strong>: Select <strong class="ph b">08/05/2022</strong>.</li>
<li class="li">
<strong class="ph b">Notes</strong>: Enter <strong class="ph b">New employee</strong>.</li>
</ul>
</div>
<div class="p">
<strong class="ph b">Assignment ID</strong>: Assignment#0000095<ul class="ul" id="topic_qx5_xt4_ldc__ul_lyy_rrp_ldc">
<li class="li">
<strong class="ph b">Employee</strong>: Select <strong class="ph b">Harper Yoshimoto</strong>.</li>
<li class="li">
<strong class="ph b">Asset</strong>: Select <strong class="ph b">A002</strong>.</li>
<li class="li">
<strong class="ph b">Start date</strong>: Select <strong class="ph b">10/19/2024</strong>.</li>
<li class="li">
<strong class="ph b">End date</strong>: Select <strong class="ph b">04/19/2025</strong>.</li>
<li class="li">
<strong class="ph b">Notes</strong>: Enter <strong class="ph b">New temporary employee</strong>.</li>
</ul>
</div>
<div class="p">
<strong class="ph b">Assignment ID</strong>: Assignment#0000097<ul class="ul" id="topic_qx5_xt4_ldc__ul_hdm_5rp_ldc">
<li class="li">
<strong class="ph b">Employee</strong>: Select <strong class="ph b">Harper Yoshimoto</strong>.</li>
<li class="li">
<strong class="ph b">Asset</strong>: Select <strong class="ph b">A003</strong>.</li>
<li class="li">
<strong class="ph b">Start date</strong>: Select <strong class="ph b">10/19/2024</strong>.</li>
<li class="li">
<strong class="ph b">End date</strong>: Select <strong class="ph b">04/19/2025</strong>.</li>
<li class="li">
<strong class="ph b">Notes</strong>: Enter <strong class="ph b">New temporary employee</strong>.</li>
</ul>
</div>
</li>
</ol>
</div>
</div>
</div>
</div>
</div>
<div aria-labelledby="ariaid-title8" class="topic nested1" id="topic_xmz_ysp_ldc">
<h2 class="title topictitle2" id="ariaid-title8">Viewing many-to-many relationships</h2>
<div class="body">
<p class="p">To view many-to-many relationships for tickets, open a ticket and review the values
selected for the multi-lookup fields. </p>
<div class="p">To view many-to-many relationships defined through a junction object, you can open
the junction object's records, or records for either of the parent objects defined
in the junction object's parent-child fields. Using the same example as above, after
creating the asset assignment records, you can view the related asset, employee, and
asset assignment records in the following ways:<ul class="ul" id="topic_xmz_ysp_ldc__ul_fbr_gtp_ldc">
<li class="li">User profiles: The Related tab of an employee's profile will contain a list
of assigned assets.</li>
<li class="li">Asset records: An asset's record will contain a list of employees it's
assigned to.</li>
<li class="li">Asset assignment records: An asset assignment record will list both the
employee and asset assigned.</li>
</ul>
</div>
<div class="p">In this example, the following related records would be visible:<ul class="ul" id="topic_xmz_ysp_ldc__ul_osq_zyw_ldc">
<li class="li">On William Carlton's profile page, the Related tab displays two asset
assignment records: Assignment#0000094 and Assignment#0000096.<p class="p"><img class="image" id="topic_xmz_ysp_ldc__image_dqv_4lx_ldc" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/many_to_many_wflow_related_user1.png" width="300"></p>
</li>
<li class="li">On Harper Yoshimoto's profile page, the Related tab displays two asset
assignment records: Assignment#0000095 and Assignment#0000097.<p class="p"><img class="image" id="topic_xmz_ysp_ldc__image_twm_plx_ldc" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/many_to_many_wflow_related_user2.png" width="300"></p>
</li>
<li class="li">The A001 asset record displays one asset assignment record
(Assignment#0000094), which is listed as assigned to William
Carlton.<p class="p"><img class="image" id="topic_xmz_ysp_ldc__image_fld_tlx_ldc" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/many_to_many_wflow_related_A001.png" width="600"></p>
</li>
<li class="li">The A002 asset record displays one asset assignment record
(Assignment#0000095), which is listed as assigned to Harper
Yoshimoto.<p class="p"><img class="image" id="topic_xmz_ysp_ldc__image_jv4_zlx_ldc" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/many_to_many_wflow_related_A002.png" width="600"></p>
</li>
<li class="li">The A003 asset record displays two asset assignment records:
Assignment#0000096 and Assignment#0000097 with assignments to both William
Carlton and Harper Yoshimoto.<p class="p"><img class="image" id="topic_xmz_ysp_ldc__image_sfz_bmx_ldc" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/many_to_many_wflow_related_A003.png" width="600"></p>
</li>
</ul>
</div>
<div class="note" id="topic_xmz_ysp_ldc__note_mpt_51k_zjc">
<span class="notetitle">Note:</span> If a user or asset record is deleted, any related asset
assignment records are deleted automatically.</div>
</div>
</div>
<script id="docs-schema-markup" type="application/ld+json">{
"@context": "https://schema.org",
"@type": "TechArticle",
"@id": "https://support.zendesk.com/hc/en-us/articles/8415083900698-Creating-many-to-many-relationships-in-Zendesk-using-custom-objects",
"url": "https://support.zendesk.com/hc/en-us/articles/8415083900698-Creating-many-to-many-relationships-in-Zendesk-using-custom-objects",
"headline": "Creating many-to-many relationships in Zendesk",
"description": "You can create many-to-many relationships between tickets and custom objects by using multi-lookup fields or junction objects with parent-child relationship fields to manage complex data associations.",
"articleSection": "Custom data",
"datePublished": "2024-11-21T22:07:13+00:00",
"dateModified": "2026-08-25T17:59:49.487468+00:00",
"inLanguage": "en-US",
"mainEntityOfPage": {
"@type": "WebPage",
"@id": "https://support.zendesk.com/hc/en-us/articles/8415083900698-Creating-many-to-many-relationships-in-Zendesk-using-custom-objects"
},
"author": {
"@type": "Organization",
"name": "Zendesk",
"url": "https://www.zendesk.com"
},
"publisher": {
"@type": "Organization",
"name": "Zendesk"
},
"isPartOf": {
"@type": "WebSite",
"name": "Zendesk Help",
"url": "https://support.zendesk.com/hc/en-us"
},
"about": {
"@type": "SoftwareApplication",
"name": "Zendesk"
}
}</script><script id="ai-summary-script">
//<![CDATA[
const ai_summary_style = document.createElement('style');
ai_summary_style.innerHTML = `#styled-article-body{padding:0 0 0}#article-body #docs-ai-summary{background-color:#f3f3f3;border:1px solid #d3d3d3;padding:10px 10px 6px;margin-bottom:16px}#article-body #docs-ai-summary #docs-ai-summary-toggle{font-size:.9em;font-weight:700;margin-bottom:4px;cursor:pointer;display:flex;justify-content:space-between;align-items:center}#article-body #docs-ai-summary #docs-ai-summary-toggle #up-triangle{margin-left:auto;padding-right:10px;display:none}#article-body #docs-ai-summary #docs-ai-summary-toggle #down-triangle{margin-left:auto;padding-right:10px}#article-body #docs-ai-summary #docs-ai-summary-content{font-size:.9em;padding-left:25px;padding-right:25px;margin-bottom:12px}`;
document.head.appendChild(ai_summary_style);

const toggleAISummary = () => {
const summary = document.getElementById("docs-ai-summary-content");
const upTriangle = document.getElementById("up-triangle");
const downTriangle = document.getElementById("down-triangle");
if (summary.style.display === "none") {
summary.style.display = "block";
upTriangle.style.display = "none";
downTriangle.style.display = "inline";
} else {
summary.style.display = "none";
upTriangle.style.display = "inline";
downTriangle.style.display = "none";
}
};

document.getElementById("docs-ai-summary-toggle").addEventListener("click", toggleAISummary);
//]]>
</script>
</body>