This article explains how to create links between entities within your account. This allows you to easily see which entities are pointing to each other in the Yext platform.
There are three ways to create entity relationships:
- One Way - A relationship from one entity to another, in a single direction. Entity A is linked to Entity B, but Entity B is not linked to Entity A.
- Two Way - A relationship in either direction between two entities. Entity A is linked to Entity B, and Entity B is linked to Entity A. Two Way relationships are broken up into two different variations.
- Shared Field - The same field is used on both sides of the relationship. The relationship will be accessed using the same field, regardless of which entity the user is examining the relationship from.
- Distinct Field - Distinct fields are used on each side of the relationship. The relationship will be accessed using different fields, depending on which entity the user is examining the relationship from.
Note: In order to create a link between two entities, you will need to create a Custom Field that allows you to select an entity from a list. If you have already created an Entity List Custom Field, proceed to step 2.
- Create an Entity List Custom Field.
- Click Content in the navigation bar and click Configuration.
- Click Fields.
- Click on the + Add Field button.
- Click Select Field Type and select Entity Relationship from the drop-down menu.
- Select the type of relationship you would like to create. You can choose between a One Way or a Two Way relationship.
- If you selected a Two Way relationship, you must also select a field configuration, either Shared Fields or Distinct Fields.
- Enter a name for the field. The ID will populate based on the name you choose, but you can edit it if you wish.
- If you selected a Two Way relationship with Distinct Fields, you will need to enter a name for both fields.
- Select the entity types that you want this custom field to be available for in the Field Availability field. This is where the relationship will be accessed and stored in Yext Content.
- If you selected a Two Way relationship with Distinct Fields, you will need to select the Field Availability for both fields.
- If you selected a One Way relationship, in the Field Settings field, click on the Modify link to select the supported destination entity types, and click Apply.
- Enter the rest of the optional fields associated with your custom field, and click Save Field.
- Associate the entities with one another.
- Click Content in the navigation bar and click Entities.
- Click on the entity that you would like to link with another entity.
- Click on the name of the custom field you created in the Other Fields section and select the entity you would like to associate with this entity from the drop-down menu.
- Note: For Two Way relationships, you only need to do this on one of the entities that you are trying to link. The relationship will automatically sync for the other entity.
- Click Save.
You will now be able to see the links between the entities in the Linked Entities section in the right sidebar of the Content page for the associated entity.