Follow these guidelines to design effective Transformation Rules that reliably reshape extracted data for downstream systems.
When to Use
Refer to this guide before writing or reviewing Transformation Rules.
Prerequisites
Admin role in Docupath
Familiarity with Transformation Rules (condition operators, action operators, and scoping)
Key Practices
Keep transformations simple and targeted. One rule per logical operation makes debugging and maintenance straightforward.
Test on edge cases (empty values, unusual formats) before deploying to large-scale workflows.
Use Transformations for formatting and reshaping only. Complex extraction logic belongs in Instruction Builds, not Transformations.
Handle null values explicitly. SET a numeric default before applying arithmetic operations (INCREASE, DECREASE, MULTIPLY, DIVIDE) to avoid errors.
Order actions carefully within a rule. Actions execute top-to-bottom; a later action may depend on the result of an earlier one.
Use separate rules rather than complex compound logic. Multiple simple rules are easier to maintain than a single rule with deeply nested AND/OR conditions.
Keep CSV lookup files up-to-date. Stale reference data causes silent validation failures.
Reserve complex contextual logic for Instruction Builds. Transformations are best suited for deterministic, field-level operations.
Regularly review rules to ensure they still match evolving business requirements.
Document the purpose of each rule so future reviewers understand the business intent.
Common Issues
Issue | Cause | Resolution |
Incorrect transformation output | Rule not tested with varied inputs | Test with multiple sample documents covering edge cases |
Failures on empty or irregular values | Null and edge-case values not handled | Add explicit handling for empty and irregular values |
Overcomplicated rules that are hard to maintain | Too much logic packed into a single rule | Break into smaller, single-purpose rules |
Arithmetic errors on non-numeric fields | INCREASE/DECREASE/MULTIPLY/DIVIDE applied without a numeric default | SET a numeric default value before applying arithmetic actions |
