pub struct ErpEvent {
pub idempotency_key: String,
pub event_type: ErpEventType,
pub process_id: ProcessId,
pub tenant_id: TenantId,
pub conversation_id: ConversationId,
pub causation_id: EventId,
pub pid: u32,
pub payload_schema: Option<String>,
pub payload: Value,
pub occurred_at: OffsetDateTime,
}Expand description
A structured process event delivered from mako-engine to the ERP.
The payload is always a BO4E-typed JSON object — the ERP adapter never receives raw EDIFACT bytes or EDIFACT format-version identifiers.
§Idempotency
idempotency_key is a stable dedup identifier. The ERP must persist
this key and reject duplicate deliveries with HTTP 200 OK (not 409) so
the adapter does not retry indefinitely.
Fields§
§idempotency_key: StringStable dedup key — store in the ERP to reject duplicate deliveries.
Derived from the outbox message_id; stable across retries.
event_type: ErpEventTypeSemantic classification of this event.
process_id: ProcessIdThe mako process that generated this event.
tenant_id: TenantIdTenant (operator GLN) that owns this process.
conversation_id: ConversationIdBDEW business conversation identifier.
causation_id: EventIdThe mako domain event that directly caused this ERP notification.
pid: u32Prüfidentifikator of the process.
payload_schema: Option<String>BO4E JSON Schema URL that validates payload.
Examples:
"https://raw.githubusercontent.com/BO4E/BO4E-Schemas/v202501.0.0/src/bo4e_schemas/bo/Marktlokation.json""https://raw.githubusercontent.com/BO4E/BO4E-Schemas/v202501.0.0/src/bo4e_schemas/bo/Messlokation.json"
None for events where no primary BO4E object is applicable
(e.g. ContrlReceived).
payload: ValueBO4E-typed payload.
Deserialise using the ERP’s own BO4E library. Raw EDIFACT structures
are never exposed here. null when no payload is applicable.
occurred_at: OffsetDateTimeWall-clock time when the domain event was persisted.