Cloning with Enrichments Overview¶
All Enrichments clone with their Source automatically. The examples below show Company 1 and Company 2 Sales Order Detail Enrichments — nearly identical, created by the clone. The three rule types below define how each behaves during cloning.
Company 1 Sales Order Detail Enrichments
Company 2 Sales Order Detail Enrichment created by the Clone operation
[This] Source Rules¶
The first rule to look at is "Double order quantity". This is a simple rule that takes a field from the Sales Order Detail Source and doubles it. It uses no Relations and relies only on fields available in the Sales Order Detail Source
The Double order quantity Rule
Rules that use no Related Sources are copied to the new Source with the exact same expression — no changes needed.
Master Data Relation Rules¶
The second rule to look at is "Product special offer". Notice that this Rules does utilize a Relation and pulls data from another Source, specifically the "specialofferid" field from the Global Product Source.
The Product Class Rule
This rule uses a Master Data Relation — the cloned Source still relates to the same Global Product. The expression is identical for both Company 1 and Company 2.
Group Relation Rules¶
The third rule is unique compared to the previous two. "Header Account Number" utilizes a Relation to a Source in the same Group as our Sales Order Detail Source, specifically "Account Number" field from the Sales Order Header Source. Below is the Rule definition for the Company 1 Sales Order Detail Source. Notice that it specifically mentions the Company 1 Sales Order Header Source in the Rule expression.
The Header Account Number Rule for Company 1
This rule uses a Group Relation. DataForge automatically updates the expression so Company 2 references Company 2 sources — not Company 1. The expression for Company 2 Sales Order Detail is shown below.
The Header Account Number Rule for Company 2
Best Practices¶
DataForge handles this automatically, but using Rule Templates to manage all rules from a single location is strongly recommended. The next pages show how to templatize each of the three rule types before cloning.


