Skip to content
AM

The dimensional substrate

The dimensional substrate gives selected pillar-owned entities a shared contract for custom fields, CEL filtering, and generic record access. It does not move business records into a shared table: each pillar still owns its physical data and invariants.

Current physical entity types

The checked-in baseline contains seven extensible physical entity types:

Entity typePillar
crm_contactCustomer 360
crm_companyCustomer 360
crm_activityCustomer 360
commerce_orderCommerce
commerce_productCommerce
commerce_fulfillmentCommerce
marketing_campaignMarketing fixture and campaign workflows

The runtime registry is tenant-scoped and may also contain generic user-defined tables. Physical types above are provisioned from the shared baseline.

The closed accounting set includes journal_entry, journal_line, account_balance, accounting_period, posting_period, and fiscal_period. These types reject custom fields.

Generic MCP access

The current catalog exposes two generic record tools:

  • inblack_query_records reads supported records and applies an allowlisted CEL filter.
  • inblack_update_record validates and merges a record patch.

Use the pillar-specific tools when one exists. They carry the domain’s richer authorization, simulation, approval, and response contracts. The generic substrate tools are most useful for cross-pillar reads and custom-field updates.

Schema and value lifecycle

Each tenant and entity type has a versioned field declaration. Writes validate field names, types, constraints, required values, reference targets, and formula mutability at the boundary.

Schema changes are classified before activation:

ClassExamplesResult
noneSemantically identical declarationNo version change
additiveOptional field, wider options, looser boundActivate the new version directly
breakingRemoved or retyped field, new requirement, changed formulaPreserve the old version and activate a new one

Breaking changes use an explicit, repeatable value backfill. See Custom fields for request shapes and supported types.

Filtering behavior

The CEL-to-SQL layer accepts a restricted expression set and parameterizes values. Native entity fields retain their typed SQL behavior. Custom-field access uses custom_fields ->> <key>, so the result is text.

This distinction matters:

custom_fields.referred_by == "Instagram" // supported text equality
custom_fields.lifetime_visits > 10 // not a numeric comparison

For frequently filtered fields, use a supported indexed declaration so the substrate can promote the value into a typed generated column. A schema may promote at most eight fields.

Ownership boundary

The substrate owns the declaration grammar and generic access contract. Pillars continue to own:

  • Native columns and business validation.
  • Authorization and tenant isolation.
  • Domain-specific writes, simulations, and approvals.
  • Audit events and downstream projections.

This boundary keeps shared custom data queryable without weakening accounting or commerce invariants.