Legacy custom objects guide for admins

<body>

<div class="body">
<div class="note important">
<span class="importanttitle">Important:</span> A new custom object experience is available. See <a class="xref" href="https://support.zendesk.com/hc/en-us/articles/5914453843994" target="_blank">Understanding the new custom objects</a>.<p class="p">If you're using legacy
custom objects, you will continue to have access to your objects, records, and
relationships. All resources to aid in your continued use of legacy custom objects have been
labeled as "legacy." Custom object documentation without the "legacy" label applies only to
the new custom object experience.</p>
</div>
<p class="p">Zendesk provides many types of native data objects for storing and managing your customer
data, including tickets, users, organizations, and more. However, it can't provide every
possible type of data object that your organization might want. For example, you might want to
associate each new ticket with a product in your catalog to get a better picture of customers'
experience when using the different products. Legacy custom objects let you create a blueprint
for a new object type in Zendesk, then create object records based on the blueprint. </p>
<p class="p">This article contains the following sections:</p>
<ul class="ul" id="topic_hkj_zxl_mjb__ul_kxr_hyl_mjb">
<li class="li"><a class="xref" href="#topic_gqp_yk5_erb">About legacy custom objects</a></li>
<li class="li"><a class="xref" href="#topic_fk5_wyl_mjb">Enabling legacy custom objects</a></li>
<li class="li"><a class="xref" href="#topic_pbx_zyl_mjb">Defining a legacy custom object type</a></li>
<li class="li"><a class="xref" href="#topic_vg2_tzl_mjb">Adding legacy object records</a></li>
<li class="li"><a class="xref" href="#topic_awf_m1m_mjb">Modeling your data with legacy custom objects</a></li>
<li class="li"><a class="xref" href="#topic_sds_41m_mjb">Defining a legacy relationship type</a></li>
<li class="li"><a class="xref" href="#topic_avc_w1m_mjb">Associating related records of legacy custom objects</a></li>
<li class="li"><a class="xref" href="#topic_u41_bbm_mjb">Retrieving related records</a></li>
<li class="li"><a class="xref" href="#topic_vtn_gbm_mjb">Putting it all together</a></li>
<li class="li"><a class="xref" href="#topic_fk5_wyl_pyb">Setting roles and permissions for legacy objects</a></li>
<li class="li"><a class="xref" href="#topic_gqp_yk5_dlb">Deleting custom object types and relationship types</a></li>
</ul>
</div>
<div aria-labelledby="ariaid-title2" class="topic nested1" id="topic_gqp_yk5_erb">
<h2 class="title topictitle2" id="ariaid-title2">About legacy custom objects</h2>
<div class="body">
<p class="p">A legacy custom object can be just about anything, including a product, a service contract,
or a customer visit. You can create legacy custom objects in the Zendesk Admin Center or
with the <a class="xref" href="https://developer.zendesk.com/documentation/custom-data/custom-objects/getting-started-with-custom-objects" target="_blank">API</a>, then use your legacy custom objects to tailor
your Zendesk account to fit your business needs. You can control access to your legacy
custom objects by specifying the permissions that apply to each object.</p>
<p class="p">This guide shows you how to define a legacy custom object in Admin Center. It uses a
vacation rental business as an example. Customers can report problems with a rental property
by calling or starting a chat with the business's support team, which creates tickets for
them. The business would like to associate each ticket with a rental property in Support to
help agents provide better customer service. The business would also like to use the
information to get a better picture of the customer experience at each location to plan
property improvements.</p>
<p class="p">The following video provides an overview of legacy custom objects in Admin Center, but note
that the interface has a new look now:</p>
<p class="p"><iframe allowfullscreen="true" controls="controls" height="225" src="https://fast.wistia.net/embed/iframe/yqaef2l3od" width="400"></iframe></p>
<p class="p">Legacy custom object enhancements (6:02)</p>
</div>
<div aria-labelledby="ariaid-title3" class="topic nested2" id="topic_wjk_4vk_kyb">
<h3 class="title topictitle3" id="ariaid-title3">Limitations for legacy custom objects</h3>
<div class="body">
<p class="p">The following limitations apply to legacy custom objects and records.</p>
<div class="p">
<strong class="ph b">Legacy custom object limitations</strong><ul class="ul" id="topic_wjk_4vk_kyb__ul_tw4_vvk_kyb">
<li class="li">Each account can have a maximum of 50 legacy custom objects.</li>
</ul>
</div>
<div class="p">
<strong class="ph b">Legacy custom object record limitations</strong><ul class="ul" id="topic_wjk_4vk_kyb__ul_tbw_svk_kyb">
<li class="li">Support Enterprise, Suite Team and Growth: 100,000 custom object records</li>
<li class="li">Suite Professional: 250,000 custom object records</li>
<li class="li">Suite Enterprise: 1,000,000 custom object records</li>
<li class="li">Suite Enterprise Plus: 25,000,000 custom object records</li>
</ul>
</div>
</div>
</div>
</div>
<div aria-labelledby="ariaid-title4" class="topic nested1" id="topic_fk5_wyl_mjb">
<h2 class="title topictitle2" id="ariaid-title4">Enabling legacy custom objects</h2>
<div class="body">
<p class="p">Legacy custom objects are only available to accounts that enabled the feature prior to
September 2023. If you're just getting started with custom data at Zendesk, check out the
<a class="xref" href="https://support.zendesk.com/hc/en-us/articles/5914453843994" target="_blank">new custom object experience</a>.</p>
</div>
</div>
<div aria-labelledby="ariaid-title5" class="topic nested1" id="topic_pbx_zyl_mjb">
<h2 class="title topictitle2" id="ariaid-title5">Defining a legacy custom object type</h2>
<div class="body">
<p class="p">For the vacation rental business, you want each rental property to be represented by one
legacy custom object record in Zendesk. If the company buys another vacation property, you'd
simply add an object record to represent it.</p>
<p class="p">Rental properties share certain attributes. For example, each property has an address, a
weekly rent, a number of bedrooms, and more. The attribute values vary by rental property.
One might be a two-bedroom apartment in Lisbon for $600 a week while another might be a
three-bedroom house in Aspen for $1100 a week.</p>
<p class="p">Similarly, Sunshine custom objects of the same type (such as a "rental property" type) all
share the same attributes. The attributes of a legacy custom object are defined in a
blueprint called an <em class="ph i">object type</em>.</p>
<p class="p">At a technical level, an object type consists of a <em class="ph i">key</em> and a <em class="ph i">schema</em> that
describes the attributes. The key is the name you want to use to identify the object type.
You enter the key in the Object name field when creating an object type. Example:
"rental_property".</p>
<p class="p">You can define all kinds of attributes for a rental property. To keep the example simple,
you decide to use the following attributes for a new custom object with a key called
"rental_property":</p>
<div class="p">
<div class="tablenoborder">
<table border="1" cellpadding="4" cellspacing="0" class="table" frame="border" id="topic_pbx_zyl_mjb__table_qv2_qzl_mjb" rules="all" summary="">
<colgroup>
<col>
<col>
<col>
<col>
</colgroup>
<thead class="thead" style="text-align:left;">
<tr class="row">
<th class="entry nocellnorowborder" id="d48e223">Name</th>
<th class="entry nocellnorowborder" id="d48e226">Type</th>
<th class="entry nocellnorowborder" id="d48e229">Required</th>
<th class="entry cell-norowborder" id="d48e232">Comment</th>
</tr>
</thead>
<tbody class="tbody">
<tr class="row">
<td class="entry nocellnorowborder" headers="d48e223">id</td>
<td class="entry nocellnorowborder" headers="d48e226">string</td>
<td class="entry nocellnorowborder" headers="d48e229">yes</td>
<td class="entry cell-norowborder" headers="d48e232">Unique identifier assigned by the business to the rental property</td>
</tr>
<tr class="row">
<td class="entry nocellnorowborder" headers="d48e223">bedrooms</td>
<td class="entry nocellnorowborder" headers="d48e226">number</td>
<td class="entry nocellnorowborder" headers="d48e229">no</td>
<td class="entry cell-norowborder" headers="d48e232">Number of bedrooms</td>
</tr>
<tr class="row">
<td class="entry nocellnorowborder" headers="d48e223">address</td>
<td class="entry nocellnorowborder" headers="d48e226">string</td>
<td class="entry nocellnorowborder" headers="d48e229">no</td>
<td class="entry cell-norowborder" headers="d48e232">Street address of the rental property</td>
</tr>
<tr class="row">
<td class="entry nocellnorowborder" headers="d48e223">country</td>
<td class="entry nocellnorowborder" headers="d48e226">string</td>
<td class="entry nocellnorowborder" headers="d48e229">no</td>
<td class="entry cell-norowborder" headers="d48e232">Country where the rental property is located</td>
</tr>
<tr class="row">
<td class="entry nocellnorowborder" headers="d48e223">cleaning_service</td>
<td class="entry nocellnorowborder" headers="d48e226">string</td>
<td class="entry nocellnorowborder" headers="d48e229">no</td>
<td class="entry cell-norowborder" headers="d48e232">Local cleaning service</td>
</tr>
<tr class="row">
<td class="entry nocellnorowborder" headers="d48e223">cleaning_service_phone</td>
<td class="entry nocellnorowborder" headers="d48e226">string</td>
<td class="entry nocellnorowborder" headers="d48e229">no</td>
<td class="entry cell-norowborder" headers="d48e232">Phone number of the local cleaning service</td>
</tr>
<tr class="row">
<td class="entry row-nocellborder" headers="d48e223">pets_allowed</td>
<td class="entry row-nocellborder" headers="d48e226">boolean</td>
<td class="entry row-nocellborder" headers="d48e229">yes</td>
<td class="entry cellrowborder" headers="d48e232">Whether or not pets are allowed on the property</td>
</tr>
</tbody>
</table>
</div>
</div>
<p class="p">This is your schema. Notice that the schema doesn't contain any information about any
specific rental property. It just describes that information. To learn more, see <a class="xref" href="https://developer.zendesk.com/documentation/custom-data/custom-objects/creating-a-schema-for-a-custom-object" target="_blank">Creating a schema for a legacy custom object</a>.</p>
<p class="p"><strong class="ph b">To create a legacy custom object type</strong></p>
<ol class="ol" id="topic_pbx_zyl_mjb__ol_rq2_dzl_mjb">
<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_pbx_zyl_mjb__d6e1668" 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; Legacy
objects</strong>.</span></li>
<li class="li">Click <strong class="ph b">Add object</strong>.</li>
<li class="li">For <strong class="ph b">Object name</strong>, enter the object's key as "rental_property".<p class="p"><img class="image img-screenshot" id="topic_pbx_zyl_mjb__image_tq2_dzl_mjb" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/custom_obj_ui_key_new.png" width="360"></p>
<p class="p">Your key must meet the following
requirements:</p>
<ul class="ul" id="topic_pbx_zyl_mjb__ul_uq2_dzl_mjb">
<li class="li">Be unique</li>
<li class="li">Only contain alphanumeric characters (a-z, 0-9), underscores (_) and dashes (-)</li>
<li class="li">Have a minimum of 2 characters and maximum of 32 characters</li>
</ul>
</li>
<li class="li">Click <strong class="ph b">Add Property</strong> to define a new property.</li>
<li class="li">Enter the following values in the Add Property form in the right panel:<ul class="ul" id="topic_pbx_zyl_mjb__ul_vq2_dzl_mjb">
<li class="li">
<strong class="ph b">Name</strong> - id</li>
<li class="li">
<strong class="ph b">Type</strong> - string</li>
<li class="li">
<strong class="ph b">Description</strong> - Unique identifier assigned by the business to the rental
property</li>
<li class="li">
<strong class="ph b">Required</strong> - checked</li>
</ul>
<p class="p"><img class="image img-screenshot" id="topic_pbx_zyl_mjb__image_wq2_dzl_mjb" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/custom_obj_ui_property_new2.png" width="250"></p>
</li>
<li class="li">Click <strong class="ph b">Add Property</strong> if you want to continue building your schema.</li>
<li class="li">Enter the values of the second property in the Add property form.</li>
<li class="li">Keep clicking <strong class="ph b">Add Property</strong> to add the other properties in the schema table.</li>
<li class="li">Click <strong class="ph b">Save</strong>.</li>
</ol>
<p class="p">After re-opening it, the legacy object type should look as follows:</p>
<p class="p"><img class="image img-screenshot" id="topic_pbx_zyl_mjb__image_xq2_dzl_mjb" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/custom_obj_ui_schema_new.png" width="650"></p>
<p class="p">Once you have saved your object, you can set role-based access permissions to define the
permissions of agents and end users for object or relationship records. See <a class="xref" href="#topic_fk5_wyl_pyb">Setting roles and permissions for
objects</a>.</p>
</div>
</div>
<div aria-labelledby="ariaid-title6" class="topic nested1" id="topic_vg2_tzl_mjb">
<h2 class="title topictitle2" id="ariaid-title6">Adding legacy object records</h2>
<div class="body">
<p class="p">Once you create the rental property object type in Admin Center, developers in your
organization can use the Sunshine API to <a class="xref" href="https://developer.zendesk.com/rest_api/docs/custom-objects-api/resources#create-resource" target="_blank">create a legacy custom object record</a> for each of the
business's rental properties. They can also use the API to read, update, and delete the
records. Legacy object records are nothing more than database records with defined
properties.</p>
<p class="p">The data that a developer includes in the API request to create a rental property record is
defined by the object type you defined, which for the "rental_property" type consists of
attributes named "id", "bedrooms", "address", "country", "cleaning_service", and
"cleaning_service_phone". Example:</p>
<div class="p">
<pre class="pre codeblock"><code>{
"data": {
"type": "rental_property",
"attributes": {
"id": "fr-021",
"bedrooms": 2,
"address": "11 rue Laurier, Saint-Tropez",
"country": "France"
"cleaning_service": "tropez-nettoyage"
"cleaning_service_phone": "011.33.06.55.47.54.74 "
}
}
}</code></pre>
</div>
<p class="p">If you want to retrieve the records later, a developer can use several different endpoints
to retrieve them. See <a class="xref" href="https://developer.zendesk.com/rest_api/docs/custom-objects-api/resources" target="_blank">Legacy object records</a> in the API docs.</p>
<p class="p">If the business makes a change to a rental property such as hire a new cleaning service, a
developer can use the <a class="xref" href="https://developer.zendesk.com/rest_api/docs/custom-objects-api/resources#update-object-record" target="_blank">Update legacy object record</a> endpoint to update the
object record for that rental property.</p>
<p class="p">If the business sells the rental property, a developer can use the <a class="xref" href="https://developer.zendesk.com/rest_api/docs/custom-objects-api/resources#delete-object-record" target="_blank">Delete legacy object record</a> endpoint.</p>
<p class="p">If the business buys another rental property, a developer can use the <a class="xref" href="https://developer.zendesk.com/rest_api/docs/custom-objects-api/resources#create-object-record" target="_blank">Create legacy object record</a> endpoint.</p>
</div>
</div>
<div aria-labelledby="ariaid-title7" class="topic nested1" id="topic_awf_m1m_mjb">
<h2 class="title topictitle2" id="ariaid-title7">Modeling your data with legacy custom objects</h2>
<div class="body">
<p class="p">To use the rental property data in more meaningful ways, you can establish a relationship
between your "rental_property" type and other object types in Zendesk. For example,
information about a particular rental property is not very useful to a property manager
unless it's associated with tickets that guests have submitted about the property. Note that
tickets are just another object type in Zendesk.</p>
<p class="p">Custom objects support several relationships between object types:</p>
<ul class="ul" id="topic_awf_m1m_mjb__ul_t3s_n1m_mjb">
<li class="li">
<p class="p"><strong class="ph b">One-to-one</strong> - Both object types can have only one record on either side of the
relationship. For example, a ticket would only be associated with one rental property,
and a rental property would only be associated with one ticket. This isn't a viable
option in the vacation rentals example. One rental property can have more than one
ticket associated with it.</p>
</li>
<li class="li">
<p class="p"><strong class="ph b">One-to-many</strong> - Each object of the first object type relates to none, one, or many
objects of the second object type. For example, a rental property can be associated with
none, one, or many tickets.</p>
</li>
<li class="li">
<p class="p"><strong class="ph b">Many-to-many</strong> - Each object of the first object type relates to none, one, or
many objects of the second object type, and each object of the second object type
relates to none, one, or many objects of the first object type. You define a
many-to-many relationship type with two one-to-many relationship types.</p>
</li>
</ul>
<p class="p">A relationship can be between:</p>
<ul class="ul" id="topic_awf_m1m_mjb__ul_u3s_n1m_mjb">
<li class="li">two legacy custom object types (between the "rental_property" and a "guest_contract"
object type, for example)</li>
<li class="li">one legacy custom object type and any of the following Zendesk object types: tickets,
users, articles, organizations, groups, or chats</li>
<li class="li">two standard Zendesk object types</li>
</ul>
</div>
</div>
<div aria-labelledby="ariaid-title8" class="topic nested1" id="topic_sds_41m_mjb">
<h2 class="title topictitle2" id="ariaid-title8">Defining a legacy relationship type</h2>
<div class="body">
<p class="p">Just as an object type is a blueprint for creating object records, a relationship type is a
blueprint for creating relationship records between two specific object types. For the
vacation rentals example, you want to define a "rental property has many tickets"
relationship type between your custom "rental_property" object type and the standard Zendesk
ticket object type.</p>
<p class="p">Defining a relationship type doesn't create an association between two specific records. It
just describes the relationship. After defining your relationship type, you can create a
relationship record that associates a specific ticket to a specific rental property. As
these relationship records accumulate, with each record associating one ticket to one rental
property, you'll start to get a clearer picture of the problems at each rental property.
Sunshine can group tickets by rental property based on the relationship type you defined:
one rental property has many tickets.</p>
<p class="p"><strong class="ph b">To create a legacy relationship type</strong></p>
<ol class="ol" id="topic_sds_41m_mjb__ol_nrm_q1m_mjb">
<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_sds_41m_mjb__d6e1683" 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;
Relationships</strong>.</span></li>
<li class="li">Click <strong class="ph b">Add relationship type</strong>.</li>
<li class="li">For <strong class="ph b">Relationship name</strong>, enter "rental_prop_has_many_tickets".<p class="p">Your key must meet
the following requirements:</p>
<ul class="ul" id="topic_sds_41m_mjb__ul_prm_q1m_mjb">
<li class="li">Be unique</li>
<li class="li">Only contain alphanumeric characters (a-z, 0-9), underscores (_) and dashes (-)</li>
<li class="li">Have a minimum of 2 characters and maximum of 32 characters</li>
</ul>
</li>
<li class="li">Select the following values from the menus:<ul class="ul" id="topic_sds_41m_mjb__ul_qrm_q1m_mjb">
<li class="li">
<strong class="ph b">Source</strong> - rental_property</li>
<li class="li">
<strong class="ph b">Type</strong> - 1:Many</li>
<li class="li">
<strong class="ph b">Target</strong> - zen:ticket</li>
</ul>
<p class="p">The page should look as follows:</p>
<p class="p"><img class="image img-screenshot" id="topic_sds_41m_mjb__image_gpd_wlq_wqb" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/custom_object_new_relationship_example.png" width="500"></p>
</li>
<li class="li">Click <strong class="ph b">Save</strong>.</li>
</ol>
<div class="note note">
<span class="notetitle">Note:</span> You can't modify the relationship type once it's created. If you need to edit it, you
must delete it and create another one.</div>
</div>
</div>
<div aria-labelledby="ariaid-title9" class="topic nested1" id="topic_avc_w1m_mjb">
<h2 class="title topictitle2" id="ariaid-title9">Associating related records of legacy custom objects</h2>
<div class="body">
<p class="p">Once you've defined a relationship type, you can start associating related records based on
the relationship type.</p>
<p class="p">You associate a record of one object type to a record of another object type by creating a
<em class="ph i">relationship record</em> (not to be confused with a relationship type). For your
vacation rentals business, you can create a relationship record between a particular ticket
and a particular rental property.</p>
<p class="p">A relationship record consists of the ids of the two related object records and their
relationship type. The relationship record doesn't contain any actual information about the
renter's issue or the rental property. It just contains the id of the ticket record and the
id of the rental property record. Sunshine uses these ids to retrieve the related
records.</p>
<p class="p">The relationship record is governed by a relationship type you created -- the one-to-many
type named "rental_property_has_many_tickets" where each ticket can be associated with only
one rental property, but each rental property can be associated with many tickets.</p>
<p class="p">To create a relationship record, a developer on your team can make a POST request to the
<a class="xref" href="https://developer.zendesk.com/rest_api/docs/custom-objects-api/relationships#create-relationship-record" target="_blank">Create Relationship Record</a> endpoint. The JSON object
that the developer includes in the request must specify the relationship type as well as the
ids of the "source" and "target" objects. Example:</p>
<div class="p">
<pre class="pre codeblock"><code>{
"data": {
"relationship_type": "rental_property_has_many_tickets",
"source": "1c771ee0-2c3f-11e7-bf60-e5c3f630b5aa",
"target": "zen:ticket:35437746"
}
}</code></pre>
</div>
<div class="note note">
<span class="notetitle">Note:</span> Once created, the relationship record can't be modified because of the underlying
relationship type. The developer must delete the relationship record and create another
one.</div>
</div>
</div>
<div aria-labelledby="ariaid-title10" class="topic nested1" id="topic_u41_bbm_mjb">
<h2 class="title topictitle2" id="ariaid-title10">Retrieving related records</h2>
<div class="body">
<p class="p">A developer on your team can use the <a class="xref" href="https://developer.zendesk.com/rest_api/docs/custom-objects-api/relationships#list-relationship-records-by-object-record" target="_blank">List Relationship Records by Object Record</a> endpoint
to retrieve the relationship records. For example, the developer could get all the related
tickets for the rental property with a record id of
"5d0daa84-aec0-11e7-9a70-416881d66b6d".</p>
<p class="p">Example response:</p>
<div class="p">
<pre class="pre codeblock"><code>{
"data": [
{
"id": "c5477230-2e98-11e7-acd9-9dbd5d6450d8",
"target": "zen:ticket:35438118",
"ref": "/api/v2/tickets/35438118"
},
{
"id": "5d3484b5-aec6-11e7-9a70-a12d6a7d800c",
"target": "zen:ticket:35437746",
"ref": "/api/v2/tickets/35437746"
}
],
"links": {
"previous":null,
"next":null
}
}</code></pre>
</div>
<p class="p">In the example, the rental property has two tickets, 35438118 and 35437746, associated with
it. You can use the information to view the tickets.</p>
</div>
</div>
<div aria-labelledby="ariaid-title11" class="topic nested1" id="topic_vtn_gbm_mjb">
<h2 class="title topictitle2" id="ariaid-title11">Putting it all together</h2>
<div class="body">
<p class="p">You can use your custom objects and relationship records to solve real-world problems, to
improve existing processes, or simply to get a better picture of your customers. For
example, a developer on your team could use your rental property custom object to build a
Zendesk app that shows details about a rental property to the agent working on a ticket.</p>
<p class="p">The app could also <a class="xref" href="https://developer.zendesk.com/rest_api/docs/custom-objects-api/relationships#create-relationship-record" target="_blank">create a relationship record</a> between the ticket and
a rental property when the agent changes the ticket status from <em class="ph i">new</em> to <em class="ph i">open</em>.
You could then use the Sunshine API to generate reports listing all the tickets for each
rental property and use the information to plan property improvements.</p>
</div>
</div>
<div aria-labelledby="ariaid-title12" class="topic nested1" id="topic_fk5_wyl_pyb">
<h2 class="title topictitle2" id="ariaid-title12">Setting roles and permissions for legacy objects</h2>
<div class="body">
<p class="p">When creating a legacy custom object you can set permissions once you have saved the object
schema. Once you've saved the object schema you can see a set of default permissions in the
Permissions tab. The default permissions for a legacy object provide full permissions
(create, read, update, or delete) to agents, and no permission to end users. </p>
<p class="p"><strong class="ph b">To set the roles and permissions for a legacy custom object</strong></p>
<ol class="ol" id="topic_fk5_wyl_pyb__ol_zcf_zyl_mjb">
<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_fk5_wyl_pyb__d6e1668" 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; Legacy
objects</strong>.</span></li>
<li class="li">Click <strong class="ph b">Add object type</strong> or select an existing object to edit.</li>
<li class="li">Click the <strong class="ph b">Permissions</strong> tab.</li>
<li class="li">Select the <strong class="ph b">Agents</strong> or <strong class="ph b">End users</strong> role to define permissions.</li>
<li class="li">In the <strong class="ph b">Agents</strong> or <strong class="ph b">End users</strong> panel, select the permissions you want enabled
for agents or end users. <p class="p">Choices are: Create, Read, Update, and Delete. </p>
<p class="p"><img class="image" id="topic_fk5_wyl_pyb__image_xq2_eil_mjb" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/custom_obj_ui_permissions_1.png" width="650"></p>
</li>
<li class="li">Click <strong class="ph b">Save</strong>.</li>
</ol>
<p class="p">You receive a message that the legacy object is saved, and can see the updated permissions
in the table.</p>
</div>
</div>
<div aria-labelledby="ariaid-title13" class="topic nested1" id="topic_gqp_yk5_dlb">
<h2 class="title topictitle2" id="ariaid-title13">Deleting custom object types and relationship types</h2>
<div class="body">
<p class="p">You can delete a custom object type or relationship type in Admin Center, but not a custom
object record or relationship record. This section describes how to delete a custom object
type or relationship type in Admin Center. You can not delete an object type/relationship if
it has existing relationships or records associated with it. To <a class="xref" href="https://developer.zendesk.com/rest_api/docs/sunshine/resources#delete-object-record" target="_blank">delete a custom object record</a> or a <a class="xref" href="https://developer.zendesk.com/rest_api/docs/sunshine/relationships#delete-relationship-record" target="_blank">delete a relationship record</a>, use the Sunshine API.
</p>
<p class="p"><strong class="ph b">To delete a custom object type</strong></p>
<ol class="ol" id="topic_gqp_yk5_dlb__ol_owp_ll5_dlb">
<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_gqp_yk5_dlb__d6e1638" 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">Hover your mouse over the custom object type you want to delete, then click the trash
can icon next to the type. <p class="p"><img class="image img-screenshot" id="topic_gqp_yk5_dlb__image_kdz_gr5_dlb" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/sunshine_delete_type_new.png" width="600"></p>
</li>
<li class="li">When a confirmation message appears, click <strong class="ph b">Delete</strong> to confirm the deletion. </li>
</ol>
<p class="p"><strong class="ph b">To delete a relationship type</strong></p>
<ol class="ol" id="topic_gqp_yk5_dlb__ol_qlj_bmq_wqb">
<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_gqp_yk5_dlb__d6e1683" 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;
Relationships</strong>.</span></li>
<li class="li">Hover your mouse over the relationship type you want to delete, then click the trash can
icon next to the type. <p class="p"><img class="image img-screenshot" id="topic_gqp_yk5_dlb__image_slj_bmq_wqb" src="https://zen-marketing-documentation.s3.amazonaws.com/docs/en/sunshine_delete_type_new.png" width="600"></p>
</li>
<li class="li">When a confirmation message appears, click <strong class="ph b">Delete</strong> to confirm the deletion. </li>
</ol>
</div>
</div>
</body>