How to use rules in an enrichment

This tutorial goes through how to use rules in an enrichment and how to combine enrichment insights and business rules.

Adding rules to an enrichment

Rules are an essential component within Enrichment Insights. They define what scope the enrichment insight should apply to.

To add a new rule, click 'Add new rule' on the 'Edit enrichment insight' page.

The page in which you create a new enrichment insight, and add rules to it
Enrichment insight creation page.

You can choose between different scopes for the rule. Select the one that fits your specific needs and use case. In this example we will set up a rule that is applied to all products with the 'Dangerous goods' product structure.

The rule scope selector
Enrichment insight rule scope selector.

Define the scope, then select fields that you want to enrich on the entity. We select the 'Dangerous goods' boolean attribute that we have created on the 'Dangerous goods'-product structure.

The field selector
Field selector.

Select the necessary fields for enrichment and save your changes. The enrichment insight will be applied immediately to all existing products within its scope.

Combining Enrichment Insights with Business Rules

Integrating business rules with enrichment insights is an effective way to automate logic, ensuring products adhere to specific rules based on their type. For our example, we want to make sure that all dangerous goods are accurately labeled and include a safety datasheet, as mandated by the dangerous goods regulations.

The business rule that is applied to the enrichment insight.
Business rule applying the logic.

We have developed a business rule that monitors changes to the "dangerous goods" property added to the enrichment insight above. If a product is flagged as a dangerous good, the product structure will update to 'Dangerous goods'. This product structure includes a property for attaching the safety datasheet.

The product is as of yet not marked as a dangerous good.
Product is not marked as dangerous goods as of yet.

Checking the 'Dangerous goods' boolean property will change the product structure to 'Dangerous goods', which means the field, 'Safety datasheet' will be added to the section 'Delivery information'.

The product is marked as dangerous good, adds the property for uploading a datasheet.
Product is marked as dangerous goods.

Notice that an 'Enrichment insights' box has popped up in the right side, making sure that a product that is marked as dangerous goods must be enriched by a safety datasheet document.

Last updated