Data Layer medium complexity backend
0
Dependencies
0
Dependents
0
Entities
0
Integrations

Description

Persistence layer for notification scenario records, keyed by organization. Stores the mapping between triggers, templates, channels, and audience roles, and supports efficient lookup by event type.

Feature: Notification Scenarios

scenario-store

Sources & reasoning

HLF explicitly requests 'scenariobaserte push-meldinger' (line 74) and Blindeforbundet requires the 10-day automated reminder (line 57). Both demand a configurable scenario engine rather than hard-coded triggers. Belongs in Core Product alongside the channels that deliver it.

  • Oppfølging av likepersoner: 40 % var ikke fornøyd med oppfølgingen i spørreundersøkelse. Scenariobaserte push-meldinger og kalendersynkronisering.
  • Automatisk pĂĄminnelse etter 10 dager dersom kontakt ikke er opprettet.

Responsibilities

  • Persist scenario records scoped by organization
  • Index scenarios by event type for fast trigger resolution
  • Store channel mix and template bindings per scenario
  • Track audience role assignments per scenario
  • Maintain audit history of scenario changes

Interfaces

insertScenario(scenario): ScenarioId
findScenarioById(scenarioId): Scenario
findScenariosByEvent(orgId, eventType): Scenario[]
updateScenarioRecord(scenarioId, fields): void
deleteScenarioRecord(scenarioId): void