Non-conformance / CAPA
nutrab2b.quality.nonconformance_raised.v2 · Quality & compliance
- Purpose
- Report a quality problem against a lot or shipment and track root cause, corrective and preventive actions to closure.
- When to send
- Failed test, complaint, audit finding, receiving defect.
- Sender → receiver
- Any party → Responsible party
- Expected responses
- ACK, DEVIATION, HOLD
- Equivalent standards
- X12: 842 (Nonconformance Report) · SAP: Quality notification (QM01)
- Scenarios using it
- -
Fields and mappings
| Field | Type | Req | Description | Code list / format | EDI / GS1 / SAP mapping |
|---|---|---|---|---|---|
| nc_id | string | yes | NC id | ||
| category | string | yes | Category | nc_category | |
| severity | string | yes | Severity | severity | |
| lot_number | string | yes | Affected lot | ||
| po_number | string | PO | |||
| description | string | yes | What happened | ||
| root_cause | string | Root cause | |||
| actions | array<object> | CAPA actions | |||
| type | string | yes | correction | corrective | preventive | ^(correction|corrective|preventive)$ | |
| text | string | yes | Action | ||
| due | date | yes | Due | ||
| closed | date | Closed | |||
| state | string | yes | open | investigating | capa | closed | ^(open|investigating|capa|closed)$ |
Business rules
- None beyond schema and code lists.
Example
{
"specversion": "2.0",
"id": "evt-nonconformance-ASH-26-120-1",
"type": "nutrab2b.quality.nonconformance_raised.v2",
"source": "urn:gln:0614141000012:erp",
"subject": "ASH-26-120",
"time": "2026-11-02T09:00:00Z",
"datacontenttype": "application/json",
"dataschema": "https://nutrab2b.org/schemas/2.0/NONCONFORMANCE.json",
"sender": {
"gln": "0614141000012"
},
"receiver": {
"gln": "4012345000009"
},
"correlationid": "CONV-RFQ-1001",
"idempotencykey": "NONCONFORMANCE:ASH-26-120:1",
"sequence": 1,
"env": "test",
"data": {
"nc_id": "NC-501",
"category": "CONTAMINANT_METAL",
"severity": "MAJOR",
"lot_number": "ASH-26-120",
"description": "Lead 1.2 ppm vs 0.5 ppm spec",
"state": "investigating"
}
}Mapping checklist
- Every required field populated from your system of record
- Coded fields mapped to the Bodylia OpenB2B code lists
- GLN, GTIN and SSCC check digits validated
- Rules above pass in the validator
- Idempotency key and per-subject sequence generated
- Expected responses, including rejections, handled
