# 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.reward.created` | Reward catalog item created |
| `loyalty.reward.updated` | Reward catalog item updated |
| `loyalty.reward.deleted` | Reward soft-deleted |
| `loyalty.campaign.created` | Campaign created |
| `loyalty.campaign.updated` | Campaign updated |
| `loyalty.campaign.deleted` | Campaign soft-deleted |

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)
