sections in the article
This article explains intelligent linking, how it helps you automate the creation of Links between Entities, and how to achieve that inside Enrich. It also discusses the differences between Link rules and Link rule Queries.
If you need more information about how to manually create Links between Entities inside Enrich, see Linking Entities inside Enrich.
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 inriver 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.
About intelligent linking
Intelligent linking allows you to automatically create Links between Entities, based on predefined rules and Queries. This saves you from having to link Entities manually since you can apply predefined criteria for when a Link should exist.
You can work with this functionality in the following areas:
- Enrich
You can use this functionality when working with Entities' Includes tab.
- Plan & Release
The most common area to work with intelligent linking. Based on rule conditions you can link Products or any other Entity type to relevant Channel Nodes.
- Through the DataService API.
Both rules and Queries can be used to specify if and when a Link should be created. Rules use Field values to trigger the Link creation, while Queries define dynamically which Entities should be linked to a parent 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 Taking advantage of intelligent linking to set auto-configuring Nodes in Plan & Release.
Creating and deleting Link rules and Link rule Queries in 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 do the following:
- Open an Entity and navigate to its Includes tab.
- Click (Link type menu) > Configure link rule
The Configure Link Rule for {Link Type} modal opens.
- Set the Link rule using rules, Queries, or both.
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
- Click when you are done.
Your Link rule / Link rule Query is saved. In the Includes tab, a link icon () appears next to the Entity Type.
How to delete a Link rule or Link rule Query in Enrich
In Enrich do the following:
- Open an Entity that contains the Link Type with the Link rule / Link rule Query you want to delete and navigate to its Includes tab.
- Click (Link type menu) > Configure link rule
The Configure Link Rule for {Link Type} modal opens.
- Click (delete) to delete the rule.
The Link rule / Link rule Query is removed, and the link icon () disappears next to the Link type in the Includes tab.
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. 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.
Link rules VS Link rule Queries
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
Taking advantage of 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.