-
Notifications
You must be signed in to change notification settings - Fork 34
EPCIS Aggregation Delete
This page describes the XML to JSON mappings for a delete Aggregation Event.
When the connector determines that an Aggregation Event links to a Disaggregation Event, the connector will generate the Disaggregation Event by copying the fields from the Aggregation Event.
The rules are as follows:
If there are biztransaction
with type = "urn:epcglobal:cbv:btt:desadv"
(despatch advice), then do the following for each:
- EventID will be generated for the disaggregation event (via hashing)
- Set
generatedInfo.isGenerated
totrue
and associate backgeneratedFromEventID
to be aggregation eventID "Action": "DELETE"
"bizStep": "urn:epcglobal:cbv:bizstep:unpacking"
"disposition": "urn:epcglobal:cbv:disp:in_progress"
-
bizLocation
should be set equal to thedestinationList.destination
of the aggregation event - All other fields are copied into respective fields if naming matches
This section shows the GS1 XML to JSON mappings. JSON keys are on the left, and the XPaths to the corresponding tag in GS1 XML are on the right, separated by a colon character (:).
// Context Node: epcis:EPCISDocument
{
"assetIdUri": "urn:ibm:provenance:asset:transaction:order:<string>:default:default:<string>",
"organization": "<string>",
"layer": "event",
"label": "aggregation",
"data":
{
"eventID" : "baseExtension/eventID",
"parentID": "parentID",
// Context Node: extracted from parentID, if parentID is present and is LGTIN/SGTIN
parentGTIN: {
"",
...
},
"eventTime" : "eventTime",
"generationInfo" : {
"isConnectorGenerated" : "true | false",
"generatedFromEventID" : ""
},
"recordTime" : "",
"eventTimeZoneOffset": "eventTimeZoneOffset",
// Context Node: epcList
"childEPCs" : [
"epc": "epc",
...
],
// Context Node: extracted from the childEPCs and childQuantityList EPCIS fields.
"childGTINs": [
"",
...
],
// Context Node: extension/childQuantityList/quantityElement
"childQuantityList" : [
{
"epcClass" : "epcClass",
"quantity" : "quantity",
"uom" : "uom",
},
...
],
// Context Node: Flat list of all epcs in event. Union of epcList and quantityList.epcClass.
"flatEPCList" : [
":epcClass",
...
],
"flatGTINList" : [
"",
...
],
"action" : "DELETE",
"bizStep" : "bizStep",
"disposition" : "disposition",
"readPoint" : "readpoint/id",
"bizLocation" : "bizLocation/id",
// Context Node: extension/sourceList
"sourceList" : [
{
"type" : "source/@type",
"source" : "source"
},
...
],
// Context Node: extension/destinationList
"destinationList" : [
{
"type" : "destination/@type",
"destination" : "destination",
},
...
],
// Context Node: bizTransactionList
"bizTransactionList" : [
{
"type" : "bizTransaction/@type",
"bizTransaction" : "bizTransaction"
},
...
]
}
The following example shows a valid GS1 XML file for input. The JSON output follows.
Note: The following fields have been removed for GDPR compliance:
- StandardBusinessDocumentHeader.Sender.ContactInformation (all sub-elements)
- StandardBusinessDocumentHeader.Receiver.ContactInformation (all sub-elements)
<epcis:EPCISDocument
xmlns:epcis="urn:epcglobal:epcis:xsd:1"
schemaVersion="1.1" creationDate="2015-04-14T09:46:05.724-04:00">
<EPCISBody>
<EventList>
<AggregationEvent>
<eventTime>2015-03-15T10:00:00.000+01:00</eventTime>
<eventTimeZoneOffset>+01:00</eventTimeZoneOffset>
<baseExtension>
<eventID>xyz</eventID>
</baseExtension>
<parentID>urn:epc:id:sscc:string.string</parentID>
<childEPCs />
<action>ADD</action>
<bizStep>urn:epcglobal:cbv:bizstep:packing</bizStep>
<disposition>urn:epcglobal:cbv:disp:in_progress</disposition>
<readPoint>
<id>urn:epc:id:sgln:string.string.string</id>
</readPoint>
<bizLocation>
<id>urn:epc:id:sgln:string.string.integer</id>
</bizLocation>
<bizTransactionList>
<bizTransaction type="urn:epcglobal:cbv:btt:po">urn:epcglobal:cbv:bt:string:string</bizTransaction>
<bizTransaction type="urn:epcglobal:cbv:btt:desadv">urn:epcglobal:cbv:bt:string:string</bizTransaction>
</bizTransactionList>
<extension>
<childQuantityList>
<quantityElement>
<epcClass>urn:epc:class:lgtin:string.string</epcClass>
<quantity>10</quantity>
<uom>CS</uom>
</quantityElement>
</childQuantityList>
<sourceList>
<source type="urn:epcglobal:cbv:sdt:owning_party">urn:epc:id:sgln:string.string.integer</source>
</sourceList>
<destinationList>
<destination type="urn:epcglobal:cbv:sdt:owning_party">urn:epc:id:sgln:string.string.integer</destination>
</destinationList>
</extension>
</AggregationEvent>
</EventList>
</EPCISBody>
</epcis:EPCISDocument>
The following example shows the JSON output from the input GS1 XML file above.
This is the generated URN:
{
"urn": "urn:ibm:provenance:asset:event:disaggregation:security_disabled:default:default:string"
}
This is the generated JSON:
{
{
"token": "token",
"type": "asset",
"id": "urn:ibm:provenance:asset:event:disaggregation:security_disabled:default:default:string",
"data": {
"eventTime": "2015-03-15T10:00:00.000+01:00",
"eventTimeZoneOffset": "+01:00",
"parentID": "urn:epc:id:sscc:string.string",
"childEPCs": [],
"childGTINs": [
"string"
],
"bizTransactionList": [
{
"bizTransaction": "urn:epcglobal:cbv:bt:string:string ",
"type": "urn:epcglobal:cbv:btt:po"
},
{
"bizTransaction": "urn:epcglobal:cbv:bt:string:string ",
"type": "urn:epcglobal:cbv:btt:desadv"
}
],
"action": "DELETE",
"bizStep": "unc:epcglobal:cbv:bizstep:unpacking",
"disposition": "unc:epcglobal:cbv:disposition:in_progress",
"flatEPCList": [
"string.string"
],
"flatGTINList": [
"string"
],
"generationInfo": {
"isConnectorGenerated": "true",
"generatedFromEventId": "urn:epc:id:sscc:string.string"
},
"eventID": "string"
}
}
}
WELCOME!
Modules
Membership
Languages
Browsers
ONBOARDING
Onboarding Steps
Data Requirements
Data Types
Supplier Data
Payload Data
Insights Data
HOW-TO
Join by Invitation
Log in as New User
Authenticate Human Users
Authenticate System Users
Java Sample
Typescript Sample
IIB Sample
Assign User Roles
Upload Data
Automate Data Upload
Convert Spreadsheets
Convert Data
Whitelist Custom URLs
APIs-Swagger
Connector API
Documents API
Converter API
Trace API
Insights API
APIs-Usage
APIs
Insights API
Insights API Usage
Trace API
Connector API Errors
API Error Codes
REFERENCE
GS1
GS1 Identifier Reuse
Authentication
Identifiers
Message Codes
Cryptographic
Signatures
Signature Header
Access Control
Firewall Settings
XML to JSON
EPCIS Aggregation Add
EPCIS Aggregation Delete
EPCIS Object Add
EPCIS Object Delete
EPCIS Object Observed
EPCIS Transformation
Purchase Order
Despatch Advice
Receiving Advice
Master Data Item
Master Data Facility
Standard Business
Document Header