Linked Entities | Yext Hitchhikers Platform
What You’ll Learn
In this section, you will learn:
- How linking entities helps build your data relationships
- The difference between one-way and two-way entity relationships
- How to link entities in the Knowledge Graph
Overview
As you learned at the beginning of this track, knowledge graphs are powerful because they store data relationships. In Yext, data relationships are reflected by linking entities.
Linking entities can help you structure data relationships such as a professional who works at a specific facility, or a job posting that corresponds to a specific location.
There are three main parts of a linked entity relationship in Yext:
- Entity A
- Entity B
- The relationship (the field that connects the two entities)
In this unit, you’ll learn how entity relationships are stored, where to view linked entities, and the different types of entity relationships that exist.
Viewing and Editing Linked Entities
When two entities are linked, the linked entity is shown in the Linked Entities section on Entity Edit.
You can update linked entity fields just like any other field: individually or in bulk.
Creating Entity Relationships
Linked entity relationships are stored in fields that use the Entity Relationship field type. To create your own entity relationship, you’ll first need to create a custom field using the Entity Relationship field type. Then, you’ll use that field to link your entities.
When you create your Entity Relationship field, you’ll define the type of relationship you want your linked entities to have.
There are two types of linked entities in Yext: one-way and two-way relationships. An overview of each relationship type is below.
One-Way Relationships
A one-way relationship exists when Entity A needs to connect to Entity B, but Entity B does not need to connect to Entity A. This can also be described as a parent-child relationship: for example, a product that is sold in a store location.
This is one-way because the product needs to be linked to the store in order to reflect that it is sold there, but the store does not need to be linked to each individual product.
Two-Way Relationships
A two-way relationship exists when Entity A needs to connect to Entity B, and Entity B needs to connect to Entity A.
There are two types of two-way relationships:
- Shared field: The relationship is shown on the same field on both Entity A and Entity B
- Distinct field: The relationship is shown on different fields on Entity A and Entity B
Shared field relationshipa
A real world example of a two-way “shared field” relationship is the relationship between siblings.
In this case, the two entities (siblings) are linked by a single relationship — they are both “siblings” to each other, no matter which sibling you’re looking at.
Distinct relationships
An example of a two-way distinct relationship would be a professional who works at a certain location.
The professional needs to connect to the location (to show that they work there), and the location needs to connect to the professional (to show that the professional is employed), but this relationship would be shown on different fields depending on whether you are looking at the Professional or the Location entity.
Keep Learning
For more on linking entities, including creating your own custom Entity Relationship fields, see the Link Entities help article.