Lot genealogy (transformation)
nutrab2b.trace.lot_transformed.v2 · Traceability
- Purpose
- Record that input lots were consumed to produce output lots (harvest → extract → blend → finished), with yield for mass balance. FSMA 204 'transformation' key data elements.
- When to send
- Each production batch.
- Sender → receiver
- Producer → Hub (and customers on request)
- Expected responses
- ACK
- Equivalent standards
- EPCIS: TransformationEvent · GS1: EPCIS 2.0
- Scenarios using it
- Recall walks the full genealogy · Genealogy cycle prevented · Mass balance failure
Fields and mappings
| Field | Type | Req | Description | Code list / format | EDI / GS1 / SAP mapping |
|---|---|---|---|---|---|
| batch_id | string | yes | Production batch | ||
| stage | string | yes | Stage | lot_stage | |
| facility_gln | string | yes | Where | ^\d{13}$ | |
| at | datetime | yes | When | ||
| inputs | array<object> | yes | Consumed lots | ||
| lot_number | string | yes | Input lotNB-R018 | ||
| item_id | string | yes | Item | ||
| quantity | object | yes | Quantity consumed | ||
| value | number | yes | Quantity | ||
| uom | string | yes | Unit of measure | uom | |
| outputs | array<object> | yes | Produced lots | ||
| lot_number | string | yes | Output lotNB-R018 | ||
| item_id | string | yes | Item | ||
| quantity | object | yes | Quantity produced | ||
| value | number | yes | Quantity | ||
| uom | string | yes | Unit of measure | uom | |
| expected_yield_pct | number | Expected yield output/input %NB-R019 | |||
| yield_tolerance_pct | number | Tolerance ± % |
Business rules
- NB-R018 Genealogy cycle, a lot cannot be its own ancestor.
- NB-R019 Mass balance, transformation outputs exceed inputs beyond the stated yield tolerance.
Example
{
"specversion": "2.0",
"id": "evt-lot_genealogy-EXT-26-118-1",
"type": "nutrab2b.trace.lot_transformed.v2",
"source": "urn:gln:4012345000009:erp",
"subject": "EXT-26-118",
"time": "2026-11-02T09:00:00Z",
"datacontenttype": "application/json",
"dataschema": "https://nutrab2b.org/schemas/2.0/LOT_GENEALOGY.json",
"sender": {
"gln": "4012345000009"
},
"receiver": {
"gln": "0614141000012"
},
"correlationid": "CONV-RFQ-1001",
"idempotencykey": "LOT_GENEALOGY:EXT-26-118:1",
"sequence": 1,
"env": "test",
"data": {
"batch_id": "EXT-26-118",
"stage": "EXTRACT",
"facility_gln": "4012345000016",
"at": "2026-10-01T06:00:00+05:30",
"inputs": [
{
"lot_number": "H-26-ASH-07",
"item_id": "ASH-ROOT-DRY",
"quantity": {
"value": 6000,
"uom": "KGM"
}
}
],
"outputs": [
{
"lot_number": "ASH-26-118",
"item_id": "ASH-KSM-5",
"quantity": {
"value": 500,
"uom": "KGM"
}
}
],
"expected_yield_pct": 8.5,
"yield_tolerance_pct": 1.5
}
}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
