Create Custom Entity Types
What You’ll Learn
In this section, you will learn:
- How to build your own custom entity type
- What fields are on all entity types
- Tips and tricks for creating a new type
Build Your Own Custom Entity Type
Don’t see the entity type that fits your use case? Great, use a Custom Entity Type!
Custom Entity Types are designed to give you the flexibility you need to make your brand successful. You have complete control of its name, definition and use.
- Name, API name, Description
- Fields (exceptions below)
- Which fields are required
- Which fields are visible on the “Add New Entity” screen for quick & easy entry
While you can control most properties of Custom Entity Types, the following fields are always on Entity Types and cannot be removed:
- Entity ID (unique identifier)
These are there for your convenience and to make sure that everything from API management to data file uploads to entity organization works smoothly in your account.
How to Create a Custom Entity Type
Navigate to Account Settings > Manage Entity Types. As covered in the last unit, this is your control center screen for Entity Types. If you ever want to view, configure, or add types, this is where you should go.
Click the Add Custom Entity Type button at the top right of the screen.
Enter the basic details of the type.
Entity Type Name: Enter something that everyone will understand. You should make sure this is singular (if applicable). If you want to power multi-language experiences, you can fill out translations (but we’ll cover that in the Multi-Language Track).
API Name: We will auto-fill using the entity type name that you entered. This must be unique in your account and is how you can reference this entity type in our APIs. You can change it later, but doing so could break integrations so you should be very careful once you have any integrations live.
Plural Entity Type Name: Where applicable, enter the plural form of the entity type name. This will improve readability of copy in the platform. Similar to above, if you want to power multi-language experiences, you can provide translations, if applicable.
Description: This is optional and allows you to describe the type and any important details to other users in your account on the Manage Entity Types screen. It will not be used outside of the Manage Entity Types screen.
Next, you want to add fields to the type. Remember that by default, we will add Entity ID, Name, Folder and Labels. To add a field, you need to choose what section you want to put it in. When you’re just getting started, we recommend putting everything in “Core Information” and organizing your fields later.
You can search for pre-built fields from Yext or any custom fields you’ve already defined or you can create new fields by clicking “Create Custom Field” in the Add Field modal (learn more about how to create custom fields in the Custom Fields module). You can always add and remove fields later. You can also learn about arranging fields into sections in the Field Sections module.
Optionally, for any fields that you’ve added, you can indicate whether the fields should be required or, if not required, visible on the Add Screen for easy data entry for end users. You can also choose to rearrange the order of fields or move fields between sections. We’ll cover this in more detail in the Field Sections module.
Once you’re ready for other users to be able to add and see this type in the system, you can click to Enable the type.
Add an instance of the type by clicking “Add Entity” from the dropdown or by navigating to Knowledge Graph > + Add New Entity.
Fill out any relevant fields on the Add Entity Screen. Entity ID is a unique identifier for this entity in case you need to upload a spreadsheet or modify via the API. If you do not have an Entity ID or this is not relevant for you, you can leave blank and we will auto-generate one for you (this is relevant for both built-in and custom types).
Fill out any additional fields for this entity.
Note: Entities aren’t used in products like Listings or Pages until you launch them so make sure to follow the process for launching an Entity outlined later in the Launching Entities Module. They will be available in Answers depending on the saved filters used.