Sections in the article
This article explains how to manually link two existing Entities in Inriver. It also explains intelligent linking, how it helps you automate the creation of Links between Entities, and how to do so in Enrich. It also discusses the differences between Link rules and Link rule Queries.
What is a Link
A Link describes a relation between two Entities. Entities and their relations, called Links, are the two most fundamental building blocks of an Elastic data model.
Here are some things worth knowing about Links:
-
A Link is always associated with a Link type. The Link type defines the source and target Entity types of a Link and also has a unique name.
If you need to describe different types of relations between two Entities, you can define more than one Link type for the same source and target Entity types.
- A Link always has a direction from the source Entity (outbound Link from the parent Entity) to the target Entity (inbound Link to the child Entity).
- A Link can be active (default) or inactive, in which case any target Entities will not be published in Channels or Publications.
- A Link has an index property that controls the sort order of the Link if there are multiple Links of the same Link type for a source Entity.
Intelligent Linking can be created per Entity and outbound Link type. This means that the Entity becomes a parent Entity with other Entities linked to it as children.
For more information on using intelligent linking in Plan & Release, see How to use intelligent linking to set auto-configuring Nodes in Plan & Release.
Manually linking two Entities in Enrich
This section explains how to manually create a Link between two Entities by dragging and dropping.
In Enrich > {yourentity} > Includes or Included in tab,
do the following:
- Choose the tab depending on which way you want the Link to point:
- Use Includes if you want the currently open Entity to be a parent.
- Use Included In if you want the currently open Entity to be a child.
- Search for the Entity you want to link to the currently open Entity using the Work Area on the left.
- Drag and drop the Entity to the correct Link type (for example, Items, Related to, etc.).
The two Entities are now linked.
Manually unlinking two Entities in Enrich
This section explains how to remove a Link between two Entities.
In Enrich > {yourentity} > Includes or Included in tab,
do the following:
- Choose the tab depending on which way the Link you want to remove points (is this Entity a parent or a child).
- Click
(Entity menu) > Remove relation.
The Confirm remove relation modal appears.
- Click OK.
The relation is removed.
Unlinking all Entities to a particular Link type in Enrich
This section explains how to remove all Links of a particular Link type at once.
This option is only available for users with appropriate permissions. Ask your system admin for details.
You cannot unlink all Entities to Link types that have Link rules / Link rule Queries. Remove the Link rule / Link rule Query first before unlinking all Entities from this Link type.
In Enrich > {yourentity} > Includes or Included in tab > in Table view,
do the following:
-
Right-click the link type > Remove all relations.
The Confirm remove relations modal appears.The Remove all relations option in the Link type menu. -
Click OK.
The relations removed confirmation displays.
Creating and deleting Link rules and Link rule Queries in Enrich
This section explains how to create and delete Link rules and Link rule Queries directly within Enrich.
When extensive use of Link rules / Link rule Queries is required, consider performance and Link rule / Link rule Query execution time. Continuously running Link rules / Link rule Queries is not good for overall system performance.
How to create a Link rule or a Link rule Query in Enrich
In Enrich > {your entity} > Includes tab,
do the following:
-
On the link type you want to configure, click
.
The link type menu opens.In
Card view, this icon is available next to the link type. In
Table view, right-click the link type to access this option instead.
The Configure link rule option in the Link type menu. - Select Configure link rule.
The Configure Link Rule for {Link Type} modal opens.
-
Set the Link Rule using one of the following options:
-
Create Rule — Set the required rule parameters (field, operator, and value).
-
Create New Query — Set the required query conditions, then click
(Save query). Give the query a name, select where to save it, then confirm.
- Use Existing Query — A filterable list of existing queries appears. Search for or select the query you want to use.
In the Link type field, make sure to select the appropriate LinkTypeId for the intelligent linking.
Using logic operators with Link rules and Link rule Queries
- When using a Link rule, all Fields within that rule can be an AND or OR operator statement.
- When using a Link rule to filter for values in multi-value CVLs, Contains Any Selected must be used to filter out the correct values due to the values within the CVL using OR operations.
- AND/OR operator statement can be used between a rule and a Query.
-
Create Rule — Set the required rule parameters (field, operator, and value).
- Click Save.
A notification confirms that the Link rule has been saved.
- Click X (Close pop-up) to close the modal.
You return to the Includes tab where(Link rule enabled)) now appears next to the link type.
How to delete a Link rule or Link rule Query in Enrich
In Enrich > {your entity} that contains the link rule > Includes tab,
do the following:
-
On the link type you want to configure, click
.
The link type menu opens.In
Card view, this icon is available next to the link type. In
Table view, right-click the link type to access this option instead.
- Select Configure link rule.
The Configure Link Rule for the link type modal opens.
- Click X (Remove this condition) next to the rule or query you want to delete.
- Click Save.
The rule or query is deleted. If Save is not clicked, the deletion is not applied.
When a Link rule / Link rule Query is deleted, any Links created by the Link rule remain and have to be deleted separately. If a new Link rule / Link rule Query is added, the result will overwrite any existing Links.
A Query used as a Link rule Query cannot be deleted from the Work Area where it resides until it is removed from the Link rule Query.
You can delete all Links to a particular Link type by using the Remove all relations option available in the Link type menu in Table view. If there is a Link rule / Link rule Query, you will need to remove that first before being able to remove all relations. For more information, see Linking Entities inside Enrich.
Additional link rule options
After opening the Configure Link Rule modal, you can access additional options by clicking next to Save.
This opens a menu with the following options:
-
Enable link rule /
Disable link rule — Toggles the Link rule on or off, depending on its current state. A confirmation dialog appears; click OK to confirm. When a Link rule is disabled, its link icon in the Includes tab appears dimmed to indicate it is inactive, but remains visible until the rule is deleted.
-
Save rules and link query — Saves the current rules and query, and links matching entities, in a single action.
-
Delete rules and unlink query — Deletes the rules and query, and unlinks any entities that were linked through them.
Link rules VS Link rule Queries
This section compares Link rules and Link rule Queries to help you decide which approach best fits your use case.
A comparison
Linking Entities can be done manually by dragging and dropping Entities or automatically by using Link rules. Both rules and Queries can be used to specify if and when a Link should be created.
Link rules are different from Link rule Queries. Below is a list of some of the characteristics of both:
| Link rule | Link rule Query |
| Owned by a Channel Node, or a Link type | Stored in the Shared work areas and queries structure and linked to each Node, or Link type where it is being used. Can be reused by multiple Channel Nodes and Link types. |
| Simple conditions, Entity, and Fields. | Conditions such as Completeness, Relation, Dates, and Fieldset. |
| Easy to use | More advanced logic |
| Inriver's preferred choice | More difficult to maintain and get an overview of where it is being used. |
Best practices when combining Link rules and Link rule Queries
It is possible to combine Link rules and Link rule Queries. In some cases, this can be an advantage, but if you can solve the Linking by only using Link rules, that should be your first choice. Link rules are easier to maintain and are owned by each Channel Node or Link type.
When combining Link rules and Link rule Queries, try to use more generic Queries that apply to all or as many products as possible (for example, an overall enrichment status that needs to be set or a completeness condition). Then, the Link rule can determine what types of products (Assortment, Categories) should be linked.
The combined Link rule AND Link rule Query will then link correct products when enrichment is ready. If the overall enrichment process needs to be updated, it is easy to change the shared Query while the Assortment Link rule stays the same.
Further reading
Rules and queries in Inriver Plan & Release
How to use intelligent linking to set auto-configuring Nodes in Plan & Release
Comments
1 comment
This doesn't let you link entities that do not have the same segment as the channel node. This is critical functionality. We use content segmentation to limit user's ability to change entities that they shouldn't be able to change but then when it comes time to include products in channels, content segmentation makes it impossible to automate.
Please sign in to leave a comment.