This article explains how to link entities in the Knowledge Graph.
You can link entities to define relationships like a product to a store location, or a healthcare professional to a medical facility.
There are three types of 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 both directions between two entities. Entity A is linked to Entity B, and Entity B is linked to Entity A. There are two types of two-way relationships:
- Shared Field - The same field is used to represent 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 - The relationship is represented by different fields on each entity.
Entity relationships are stored on fields that use the Entity Relationship field type. In order to create your own entity relationship, you will need to create a custom Entity Relationship field. Then, you can use the custom field to link your entities together.
Create a Custom Entity Relationship Field
- Click Knowledge Graph 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 dropdown 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 the Knowledge Graph.
- 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.
Link Entities Together
- Click Knowledge Graph 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.
- 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 on the right sidebar of the Entity Edit view for the associated entity.