# Event Catalog

Canonical event types. Envelope rules: [event-driven-architecture.md](../architecture/event-driven-architecture.md).

## Core Platform

| event_type | aggregate | Description |
| --- | --- | --- |
| `tenant.created` | tenant | New tenant created |
| `tenant.suspended` | tenant | Tenant suspended |
| `tenant.activated` | tenant | Tenant activated |
| `domain.created` | domain | Domain added |
| `subscription.created` | subscription | Subscription created |
| `subscription.updated` | subscription | Subscription changed |
| `feature_access.changed` | feature_access | Entitlement override/plan effect changed |

## Identity & Access

| event_type | Description |
| --- | --- |
| `user.registered` | New user registered |
| `tenant_member.added` | Member added (identity layer) |
| `tenant_member.removed` | Member removed (identity layer) |

## Accounting (Phases 5.1–5.6)

| event_type | Description |
| --- | --- |
| `voucher.created` | Voucher drafted |
| `voucher.validated` | Voucher passed validation |
| `voucher.posted` | Voucher posted to ledger |
| `voucher.reversed` | Voucher reversed |
| `journal_entry.created` | Journal entry created via Posting Engine |
| `posting.completed` | Posting operation succeeded |
| `ledger.updated` | General ledger updated |
| `trial_balance.generated` | Trial balance snapshot created |
| `fiscal_period.locked` | Fiscal period locked |
| `cash.received` | Cash receipt recorded |
| `settlement.completed` | AR/AP settlement completed |
| `sales_invoice.posted` | Sales invoice accounting posted |
| `revenue.recognized` | Revenue recognition recorded |

Full list: `backend/services/accounting/app/events/types.py`

## CRM (Phases 6.0–6.1)

| event_type | Description |
| --- | --- |
| `crm.lead.created` | Lead created |
| `crm.lead.updated` | Lead updated |
| `crm.contact.created` | Contact created |
| `crm.organization.created` | Organization created |
| `crm.opportunity.created` | Opportunity created |
| `crm.opportunity.updated` | Opportunity updated |
| `crm.opportunity.won` | Opportunity marked won |
| `crm.opportunity.lost` | Opportunity marked lost |
| `crm.pipeline.changed` | Pipeline updated |
| `crm.stage.changed` | Opportunity stage changed |
| `crm.playbook.assigned` | Sales playbook assigned |
| `crm.playbook.completed` | Playbook assignment completed |
| `crm.forecast.updated` | Sales forecast computed/updated |
| `crm.activity.completed` | Sales activity completed |
| `crm.task.completed` | Sales task completed |
| `crm.meeting.finished` | Meeting finished |
| `crm.call.logged` | Call logged against opportunity |
| `crm.timeline.updated` | Sales timeline entry appended |
| `crm.comment.created` | Collaboration comment created |
| `crm.mention.created` | User mentioned in CRM collaboration |
| `crm.quote.created` | Sales quote created |
| `crm.note.created` | CRM note created |
| `crm.attachment.added` | Attachment reference added |

Full list: `backend/services/crm/app/events/types.py`

## Loyalty (Phase 7.0)

| event_type | Description |
| --- | --- |
| `loyalty.program.created` | Loyalty program created |
| `loyalty.program.updated` | Loyalty program updated |
| `loyalty.program.deleted` | Loyalty program soft-deleted |
| `loyalty.tier.created` | Membership tier created |
| `loyalty.tier.updated` | Membership tier updated |
| `loyalty.tier.deleted` | Membership tier soft-deleted |
| `loyalty.member.created` | Member created |
| `loyalty.member.updated` | Member updated |
| `loyalty.member.enrolled` | Member enrolled / activated |
| `loyalty.member.activated` | Member activated with term/expiry |
| `loyalty.member.renewed` | Membership renewed |
| `loyalty.member.frozen` | Membership frozen |
| `loyalty.member.resumed` | Membership resumed from freeze |
| `loyalty.member.cancelled` | Membership cancelled |
| `loyalty.member.expired` | Membership expired |
| `loyalty.member.transferred` | Membership transferred to another program |
| `loyalty.member.deleted` | Member soft-deleted |
| `loyalty.point_account.opened` | Point account opened |
| `loyalty.point_account.updated` | Point account updated |
| `loyalty.point_account.deleted` | Point account soft-deleted |
| `loyalty.points.earned` | Points earned on ledger |
| `loyalty.points.redeemed` | Points redeemed on ledger |
| `loyalty.points.adjusted` | Points adjusted on ledger |
| `loyalty.points.expired` | Points expired on ledger |
| `loyalty.reward.created` | Reward catalog item created |
| `loyalty.reward.updated` | Reward catalog item updated |
| `loyalty.reward.deleted` | Reward soft-deleted |
| `loyalty.reward.redeemed` | Reward redeemed (points debited) |
| `loyalty.reward.fulfilled` | Redemption fulfilled |
| `loyalty.reward.redemption_cancelled` | Redemption cancelled / refunded |
| `loyalty.campaign.created` | Campaign created |
| `loyalty.campaign.updated` | Campaign updated |
| `loyalty.campaign.deleted` | Campaign soft-deleted |
| `loyalty.campaign.applied` | Campaign applied (points granted) |
| `loyalty.referral.rewarded` | Referral bonuses granted |
| `loyalty.wallet.opened` | Wallet account opened |
| `loyalty.wallet.credited` | Wallet credited |
| `loyalty.wallet.debited` | Wallet debited |
| `loyalty.wallet.adjusted` | Wallet adjusted |
| `loyalty.wallet.transferred` | Wallet transfer |
| `loyalty.wallet.closed` | Wallet soft-closed |

Full list: `backend/services/loyalty/app/events/types.py`

## Communication (Phase 8)

| event_type | Description |
| --- | --- |
| `communication.message.queued` | Message enqueued |
| `communication.message.sent` | Accepted by provider |
| `communication.message.delivered` | Delivery confirmed |
| `communication.message.failed` | Terminal failure |
| `communication.message.cancelled` | Cancelled |
| `communication.provider.failover` | Provider failover |
| `communication.otp.generated` | OTP issued |
| `communication.otp.verified` | OTP verified |
| `communication.queue.dead_letter` | Queue DLQ |
| `communication.webhook.received` | Inbound webhook |

Full list: `backend/services/communication/app/events/types.py`

## Future (reserved)
| Restaurant | `order.placed`, `order.completed` |
| Ecommerce | `order.placed`, `product.updated` |
| Notification | `notification.delivered` (prefer Communication delivery events) |

When adding events: update this catalog, module registry producers/consumers, and contracts in the same phase.

## Related Documents

- [Services Contracts](services-contracts.md)
- [ADR-006](../architecture/adr/ADR-006.md)
- [Module Registry](../module-registry.md)

## Delivery & Fleet Platform (`delivery`)

| Event | When |
| --- | --- |
| `delivery.organization.created` | Delivery organization created |
| `delivery.organization.updated` | Delivery organization updated |
| `delivery.hub.created` | Hub created |
| `delivery.hub.updated` | Hub updated |
| `delivery.external_provider.registered` | External provider registered |
| `delivery.external_provider.updated` | External provider updated |
| `delivery.routing_engine.registered` | Routing engine registration created |
| `delivery.routing_engine.updated` | Routing engine registration updated |
| `delivery.configuration.created` | Configuration created |
| `delivery.configuration.updated` | Configuration updated |
| `delivery.setting.upserted` | Setting upserted |
| `delivery.driver.created` | Driver profile created |
| `delivery.driver.updated` | Driver profile updated |
| `delivery.driver.status_changed` | Driver status transition |
| `delivery.driver.activated` | Driver activated |
| `delivery.driver.suspended` | Driver suspended |
| `delivery.driver.resumed` | Driver resumed |
| `delivery.driver.deactivated` | Driver deactivated |
| `delivery.driver.blocked` | Driver blocked |
| `delivery.driver.unblocked` | Driver unblocked |
| `delivery.driver.archived` | Driver archived |
| `delivery.driver.deleted` | Driver soft-deleted |
| `delivery.driver.credential_added` | Driver credential registered |
| `delivery.driver.document_attached` | Driver document metadata attached |

## Payment Platform (`payment`) — planned

> Normative contract payloads: [payment-contracts.md](payment-contracts.md). Architecture: [ADR-020](../architecture/adr/ADR-020.md), [ADR-021](../architecture/adr/ADR-021.md).

| Event | When |
| --- | --- |
| `payment.workspace.enabled` | Payment workspace enabled for tenant |
| `payment.workspace.disabled` | Payment disabled for tenant |
| `payment.workspace.suspended` | Payment workspace suspended |
| `payment.bundle.activated` | Tenant payment bundle activated |
| `payment.bundle.deactivated` | Tenant payment bundle deactivated |
| `payment.feature_toggle.changed` | Operational feature toggle changed |
| `payment.psp_provider.registered` | PSP type registered in catalog |
| `payment.psp_connection.created` | BYO-PSP connection created |
| `payment.psp_connection.activated` | BYO-PSP connection activated |
| `payment.psp_connection.suspended` | BYO-PSP connection suspended |
| `payment.psp_routing.updated` | Routing policy updated |
| `payment.provider_assignment.changed` | Active provider assignment changed |
| `payment.merchant_account.created` | Facilitator merchant account created |
| `payment.merchant_account.activated` | Merchant account activated |
| `payment.request.created` | Payment intent created |
| `payment.request.redirect_issued` | Redirect/token issued to payer |
| `payment.request.paid` | Payment verified paid |
| `payment.request.failed` | Payment failed or expired |
| `payment.request.cancelled` | Payment request cancelled |
| `payment.callback.received` | PSP callback received |
| `payment.callback.verified` | Callback signature verified |
| `payment.transaction.recorded` | Ledger transaction recorded |
| `payment.ledger.entry_appended` | Append-only ledger entry |
| `payment.refund.requested` | Refund initiated (14.6+) |
| `payment.refund.succeeded` | Refund completed |
| `payment.refund.failed` | Refund failed |
| `payment.split.allocated` | Split allocation computed (14.7+) |
| `payment.settlement_batch.created` | Settlement batch opened |
| `payment.settlement_batch.closed` | Settlement batch closed |
| `payment.checkout_session.created` | Checkout session created (14.8+) |
| `payment.checkout_session.completed` | Checkout session completed |
| `payment.reconciliation.completed` | Reconciliation run completed (14.9+) |
| `payment.accounting_intent.created` | Accounting posting intent emitted |
| `payment.analytics.snapshot.created` | Analytics snapshot refreshed (14.10+) |

## Related Documents

- [Payment Contracts](payment-contracts.md)
- [Services Contracts](services-contracts.md)
- [Event-Driven Architecture](../architecture/event-driven-architecture.md)
