Event Map Reference
The event map is the configuration layer that determines which categories and payment methods appear in the Financial Modal for a given context. It contains 146 config rows mapping combinations of entity state and conditions to financial event prompts.
Structure
Each event map row is a combination of:
| Field | Description |
|---|---|
| entity_type | The type of entity (vehicle_repair, parts_order, generic), or not set for business-level events. |
| lifecycle_stage | The current stage of the entity, or not set for business-level events. |
| direction | inflow or outflow. |
| categories | The list of category groups available for this context. |
| methods | The list of payment methods available for this context. |
Condition Fields
Rows can be further qualified by condition fields that narrow the match:
| Condition | Description |
|---|---|
| is_insurance | Whether the entity involves an insurance claim. |
| has_sublet | Whether the entity includes sublet (outsourced) work. |
| job_type | The type of job (e.g., mechanical, body, electrical). |
| location | Location-specific override. |
| customer_type | Customer classification (e.g., retail, fleet, trade). |
Scope Override
The event map supports a three-tier override hierarchy:
| Priority | Scope | Description |
|---|---|---|
| 1 (highest) | Location | Location-specific configuration. Overrides org and system defaults. |
| 2 | Organisation | Organisation-wide configuration. Overrides system defaults. |
| 3 (lowest) | System | Built-in defaults shipped with BayPay. |
For each category, the system resolves the most specific matching row. A location-level row always wins over an org-level row for the same context.
Resolution
Entity-Level Events
For entity-level events, the system resolves the applicable events based on the entity’s current type, stage, and metadata, then returns the matching categories and methods.
Business-Level Events
Business-level events use rows where entity type and lifecycle stage are not linked to a specific entity. These rows define the categories and methods available on the Business Tab of the Financial Modal.
Caching
The event map is cached per modal session. The cache is force-refreshed when the entity’s stage or metadata changes (e.g., insurance flag toggled, stage advanced).
Related Pages
- Categories & Event Map — conceptual overview of how categories work
- Entity Types & Stages — lifecycle stages that feed into event map resolution
- Category Reference — the 13 business category groups