Skip to main content
Every business rule’s create and edit page has a Preview panel on the right, beside the form. It answers one question: what does this rule return for this input? Assemble an input, click Run, and the panel shows the value the rule returned.

When to use

  • Check a new rule against a real record before saving it
  • See what a change does to an existing rule before saving it
  • Reproduce a transform error from the logs by pasting the datapoint that caused it

The input

The input is the context object the rule receives, laid out as editable JSON blocks: New enrichments are named enrichment_1, enrichment_2, … by position. To rename one, click its name, type the new name and press Enter. Run stays disabled while any block holds invalid JSON, while datapoint is empty, or while the code editor is empty. The panel tells you which.

Filling the input from an integration

Instead of typing the input, pick one of your integrations from the Integration dropdown at the top of the panel. Enabled integrations come first (marked On), then the rest by name, newest version first. The panel then:
  1. Fetches the first page of the integration’s extraction and puts the first record in datapoint
  2. Fills Query parameters with the integration’s extraction parameters
  3. Runs each of the integration’s enrichments for that record and fills one block per enrichment, named as in the integration
Each fetched block shows small chips with the HTTP method, status, latency and size of the call behind it.

Stepping through records

A stepper under datapoint walks through the records of the first page (record 1 of 1000). Click the number to type a position and jump straight to that record. Stepping refetches the enrichments for the new record.
Only the first page of the extraction is available in the preview.

Editing fetched data

Fetched blocks stay editable. As soon as a block’s JSON differs from what the integration delivered, its name row reads edited; stepping to another record or refetching replaces the block and clears the mark. What you edited is exactly what runs. The edit icon beside the dropdown opens the integration’s edit page in a new tab. Clearing the selection keeps whatever was filled as plain manual input.

What runs

With Draft and Current, each slot shows its own outcome: a failing draft shows its error above the saved rule’s value, and the reverse. When the two values are identical, a note says the draft matches the current rule. The header shows when the rule last ran.

Reading the result

The panel shows the return value exactly as the rule produced it: an object, a string, a number or a boolean. Values are shown, never interpreted.
A filter rule’s preview is simply true or false. Whether that removes or keeps the record is decided by the integration’s filter stage; see Filter Data.

When a rule fails

If the rule throws, the panel shows Rule failed with the error message as returned, for example bladData is not defined, and the code editor underlines every occurrence of the identifiers the message names. The underlines disappear on the next run or as soon as you edit the code. If an integration can’t be loaded, or its extraction returns no records, the panel says so. A failed fill never blocks typing the input by hand.

What is remembered

The preview keeps its state per rule and per browser tab:
  • A chosen integration is re-selected, and its data fetched again on the same record, when you come back to that rule in the same tab
  • Input typed by hand is restored as typed
  • Edits made on top of an integration’s data are not remembered
Closing the tab forgets everything; other tabs are independent.

Limitations

  • Only the first page of the extraction is available

Overview

The context object and auxiliary libraries

Enrichment

How enrichments are named and attached to a datapoint