Skip to main content

Asset Integration Contracts

Summary

The six cross-service integration contracts defined in HrSuit.Contracts.Events, emitted by asset-service through the outbox. All six share an identical field set so one consumer can render every asset event.

Audience

Engineering, integration, QA, architecture, security, and product reviewers.

Reference Content

Verified totals

MeasureVerified total
Outbound integration contracts6
Inbound integration contracts consumed by asset-service0
Shared envelope base1 (IntegrationEvent)
Contract schema version1

The six contracts

AssetRequestedEvent, AssetAssignedEvent, AssetReturnedEvent, AssetRejectedEvent, AssetLostOrDamagedEvent, and AssetRetiredEvent — each a sealed record deriving from IntegrationEvent.

Envelope fields (from IntegrationEvent)

EventId, EventType, OccurredAtUtc, CorrelationId, CausationId, TenantId (GUID, nullable), UserId (GUID, nullable), SourceService, and SchemaVersion. Asset events set the GUID TenantId/UserId to null; numeric tenant and identity references travel in the payload instead.

Payload fields (uniform across all six)

TenantRefId, TenantKey, AssetId (GUID), AssetCompatId (numeric), AssetCode, AssetName, AssetType, AssignedToUserId, LegacyEmployeeId, Status, Condition, Notes, ReturnDueDate, and RecipientEmail.

  • AssetCompatId may be 0 for a record whose database key is assigned in the same transaction (for example AssetRequested raised at create); consumers key on AssetCode.
  • RecipientEmail is null when emitted; a downstream enrichment step populates it for email delivery.

Ownership

The contracts live in the shared contracts assembly and are therefore a cross-service coupling surface. Consumers depend on the same assembly. Contract governance and versioning policy require confirmation.

Source References

  • microservices/src/contracts/Events/AssetLifecycleEvents.cs
  • microservices/src/contracts/Events/IntegrationEvent.cs
  • microservices/src/asset-service/Infrastructure/AssetDbContext.cs

See Also

Keywords

  • Integration contracts
  • Event envelope
  • Uniform payload

Revision Information

  • Status: Draft
  • Last reviewed: 2026-07-17
  • Review cycle: Quarterly