Skip to main content
Rules are what turn a match into a business check — each one compares a field from the first source against the same-meaning field from the second. Any matched pair that fails a rule shows up as a difference, which is the output that drives alerts and review. Getting the rules right before you run means the output is useful the first time. A RuleSet is the full set of comparison rules Darpan applies after it matches records across two sources. Rules live with the saved run setup, so a run and its RuleSet are managed together. You author and edit rules in the Ruleset Manager.

Before you start

Confirm:
  • The saved run setup exists, with both source systems and primary ID fields chosen. If it does not, start with Set up a reconciliation run.
  • Saved schemas exist for JSON sources, so the field paths you compare are known.
  • You know which fields must line up between the two systems (for example price, quantity, or status).
  • You are a Tenant Admin for the active tenant. Editing rules requires tenant edit access.

How a rule reads

A rule is a single field-to-field comparison:
A matched pair passes the RuleSet when every active rule holds. If any rule fails, the pair is recorded as a difference.

Operators

The Ruleset Manager offers these comparison operators:

Pre-actions

Pre-actions normalize a field value before the operator runs, so a comparison is not defeated by source formatting. Each pre-action applies to one field side.

Steps

1

Open the Ruleset Manager

Open Ask Darpan with Cmd/Ctrl+K or the floating Ask Darpan button. Choose Open Runs Settings (or search the saved run by name), then open the run you are configuring; ruleset-type runs open in the Ruleset Manager.The Ruleset Manager shows the two compared sources, their schemas, and the current list of rules.
2

Open the rule editor

In the Rules section, choose Edit Rules. This opens the rule editor, where each rule appears in sequence as a file 1 field, an operator, and a file 2 field.
3

Add or edit a rule

To add a rule, connect a field from the first source to its matching field on the second source: press and drag from one field pill to the other to draw a line between them. To edit an existing rule, select its operator box.In the rule popover that opens, choose the Operator. Pre-actions and the sequence number are set here too.Pick fields that should always line up when the two systems are in sync. A price field on one side maps to the price field on the other; a quantity to a quantity.
4

Add pre-actions when formats differ

When one side stores a value as text and the other as a number, add a Pre Action on the affected field side so the values compare correctly. Use String to int for whole numbers and String to number for decimals.
5

Save the rule

Choose Save rule. The rule joins the active comparison and is included in the next run.
6

Confirm the RuleSet

Return to the Ruleset Manager and confirm the rule list reflects every comparison you expect. The order is shown by sequence number.

Where the field choices come from

The rule editor offers field names rather than asking you to type them, and where they come from depends on the source. API sources draw their fields from the connector registry — the same registry that defines which endpoints a source exposes. A field appears on the rules board because the connector declares it, so adding an endpoint or a field is a matter of registry data rather than an application change. Fields withdrawn from a connector stop being offered, and rules that referenced them surface as needing attention rather than failing silently at run time. CSV sources offer the file’s own column list. Pick the column instead of typing its name — a typo in a field path produces a rule that compares nothing and reports every pair as passing, which is the hardest kind of mistake to notice. Darpan also ranks the columns most likely to be primary keys toward the top when you are choosing matching keys, based on their names. It is a starting suggestion, not a decision — confirm the key is genuinely unique on both sides before saving.

Expected result

The saved run now carries an explicit RuleSet. The next time the run executes, Darpan matches records by primary ID, applies the RuleSet to each matched pair, and records a difference whenever a rule fails. Those differences are what you review and what drives run-completion alerts.

After authoring

A rule only runs against matched pairs. Records that exist on only one side are reported as “only in” differences regardless of the RuleSet. If too few pairs match, recheck primary ID fields and schema selection before tuning rules.