Entity Template Overview | Yext Hitchhikers Platform

What You’ll Learn

In this section, you will learn:

  • What is an entity template
  • How to create a template
  • How to populate a template
  • How to apply a template

What is an Entity Template?

An entity template is a tool that allows you to apply standard content to an entity or a large group of entities in your account at the same time. Ideally, the content in entity templates is standard, applicable to many entities, and unlikely to change often. When you apply an entity template, you are only updating the fields that are included in the template – don’t worry, it won’t wipe out any of your other data!

For example, a large restaurant chain might want all of its locations in Texas to include the same marketing content (e.g., logo, tagline, promotional photos, and click-through URL). This is the perfect use case for an entity template - it ensures all entities have the standard content and makes it easier to apply that content in bulk or when new restaurants open. To start using a template, you’ll need to create, populate, and apply it to the relevant entities. We will walk through these steps below.

Properties of a Template

Before we get started on how, it’s important to understand what the properties are of a template.

Name: This is what users will see in the UI so it’s important to be as descriptive and accurate. For example, if you want to use the template to apply standard content to new locations, we recommend calling it “New Location Content”.

Language: This controls which profiles the template can be applied to so that you don’t accidentally apply Spanish content to an English profile, for example. If you select “None”, the template can be applied to any profile. If you select a specific language, you can only apply the template to profiles with that language. You will only see this option if you have the Multi-Language Profile feature turned on in your account.

API Name: This is how you would refer to the template via the API. You can change this in the future but be careful about breaking any integrations if you do.

Entity Types: Each template is applicable to one or more Entity Types. Similar to language, this helps to make sure you don’t apply a template to the wrong type of data. If you select more than one type, you will only see the intersection of fields – meaning you’ll only see the fields that both types have in common. Similar to when you bulk edit multiple types, you’ll also see an option to view the field organization based on one of the types, alphabetically, or by field type.

Fields: The most important part! When you create a template, you add fields to the template and can fill out the content for those fields just as you do on entity edit.

Creating a Template

  1. Navigate to Content > Configuration > Templates.
  2. Click the + Add Template button at the top left.
  3. Name your template so it’s clear which entities it applies to, e.g.,: “Texas Locations Promo Content”.
  4. Choose a language for your template (if all entities, select “None”, if language-specific, select the relevant language option).
  5. The “API Name” will autofill based on what you name the template. We recommend keeping that name, but feel free to modify it if you’d like.
  6. Click Add Template.
light bulb
If you want to make a template that is similar to one you already have, click “Copy” at the top of a template to duplicate it.

Populating a Template

In order for your template to be useful, it needs data! To add data to a template:

  1. Start by selecting the entity types you want your template to be available for from the Select Entity Types dropdown in the top left.

    • In the restaurant example, we would select “Restaurants”. If the content is applicable to multiple types, select as many as needed, but keep in mind you’ll only be able to add fields that all selected entity types share.
  2. Select your desired fields from the list to the left and populate them with the templated data.

    • In the restaurant example, we would select “Logo Photo”, “Featured Message”, and “Photo Gallery”.
  3. The template automatically saves when you save the data in your fields. If you need to make any changes later, all templates can be found in the Templates section under Content > Configuration.

  4. You’re now ready to start applying it to entities!

You can also copy data from an existing entity when creating or updating a template. This is particularly helpful if you have a lot of fields with a lot of content that already exists on an entity in the graph. All you need to do is click on the “Copy data from an existing entity” link on the left-side bar, select the entity, select which fields to copy, and apply. This is a great starting point for a template!

Applying a Template - Entity Edit

When you apply a template, by default the data in ALL fields from the template will overwrite what is stored in those fields on the entity. So it is critical that you first make sure the entity does not have any customized content applied to it that you (or someone else) would not want overwritten by the template. That said, you can choose not to apply certain fields at all during the template application process. The ability to remove fields during application is only available in Entity Edit and the API.

  1. Select an entity or group of entities and click More Actions then select Edit in the dropdown.

  2. Click on the Select Action drop down on the right hand side of the screen and select Apply Template.

  3. Select the template you’d like to apply to this entity or group of entities.

  4. Once you’ve selected a template, a screen appears that allows you to select and unselect specific fields to apply. This is helpful if you want to apply some but not all of a template to an entity.

  5. Once you’ve decided which fields to apply, click Apply Template and you’re all set!

light bulb
It’s not good practice to create templates where you only want to apply some of the fields they contain. Generally, try to keep the content in templates as broadly applicable as possible to the group of entities for which it was created.

Applying a Template - Entity Add

It’s really common to have templates with standard content for new entities. You can easily apply a template when you create a new entity on Entity Add.

  1. Navigate to Entity Add screen by clicking + Add Data from Entity Search and selecting Add Single Entity. Then select your entity type.
  2. If you have at least one template in your account, click on the Additional Settings option at the bottom of the add entity modal, and should now see an option to apply a template by selecting the relevant template.

    template field on entity add

  3. For the fields in the template that are visible on the add screen, you should see the content visible and editable. For the fields that are not visible on the add screen, you can click the link to “Select which fields will be applied”. From here you can see which fields will be updated and optionally unselect any fields you don’t want to apply at this time.

    template field on entity add

  4. Continue filling out the Add Entity form as needed and submit.

  5. You’ve now applied a template to an entity on creation!

Other Ways to Apply a Template

You can apply templates in a few other ways:

  • Via Entity Upload in “Additional Actions” in the Configure File step. This will allow you to apply the template to a group of entities, like a new entity template to new entities or a ‘closed store’ template to missing entities.
  • Via Saved Upload Configurations under Additional Actions. Similar to via Entity Upload, you can apply the template to a group of entities, like new or missing entities, whenever you use the saved upload configuration .
  • Via the Entities API either on create or update. Similar to Entity Edit, you can choose to apply fields in the template or use a field mask to apply a subset of fields. You can learn more about this in our developer documentation .

You can also apply templates to future dates, which you’ll learn more about in the next module – Scheduled Updates.

unit Quiz
+20 points
Daily Quiz Streak Daily Quiz Streak: 0
Quiz Accuracy Streak Quiz Accuracy Streak: 0
    Error Success Question 1 of 4

    In order to store content in an entity template, the data should be: (Select all that apply)

    Error Success Question 2 of 4

    True or False: Data in a template will override all existing data when applied to an entity.

    Error Success Question 3 of 4

    Which of the following is not possible with templates?

    Error Success Question 4 of 4

    True or False: You can choose to not apply certain fields from a template during template application.

    A Hitchhiker in the making! 🔥

    You've already completed this quiz, so you can't earn more points.You completed this quiz in 1 attempt and earned 0 points! Feel free to review your answers and move on when you're ready.
1st attempt
0 incorrect