EDIFACT (Electronic Data Interchange For Administration, Commerce and Transport) is an international standard for sending and receiving data. integrator.io uses definition files to convert an EDIFACT file to JSON format (and vice versa). The examples below are based on a Culina Logistics EDIFACT RECADV file. Your EDIFACT file may vary based on the format you’re using.
This guide is intended for experienced developers building custom integrations. Contact support for advanced implementation questions.
Using definition files, integrator.io converts an EDIFACT format file to JSON records that are processed in your flow. Use this process to transfer your business document details from a source application to the destination application. For example, you can retrieve a purchase order EDIFACT file from an FTP host and send the data to NetSuite. You can also retrieve the purchase order details from NetSuite to generate an EDIFACT file that can be imported to an FTP server.
There are several special characters in EDIFACT have a reserved meaning:
-
Apostrophe (') – segment terminator, corresponding to the fixed.rowSuffix field of the definition file header
-
Plus sign (+) – segment tag and data element separator, corresponding to the fixed.paddingChar field of the definition file header
-
Colon (:) – component data element separator
-
Question mark (?)– release character
If you intend for one of these characters to appear within the parsed data, you must escape it with the question mark (?) character.
Then, when downloading an EDIFACT file, instruct the export’s file parser helper to correctly interpret these four characters as literals:
"escapeReleaseChar": true,
For example, within your flow’s data, 10?+10=20 will become 10+10=20 , and SEAN O?'CONNOR will become SEAN O'CONNER . However, if escapeReleaseChar is missing or set to false in the file parser helper, the reserved characters are not removed and the file will be parsed with the text exactly as it is downloaded.
Below is a full RECADV file. Each file is made up of various properties that are transformed into JSON data once they pass through integrator.io. You can use the generic definition file found in the File parser helper to define how each property is parsed. Your RECADV file is still parsed if you don’t edit the definition file, but if you want to modify your data as it’s transformed you’ll need to edit the definition file and become familiar with the United Nations rules for Electronic Data Interchange for Administration, Commerce and Transport (UN/EDIFACT).
Note
This EDIFACT file information is specific to Culina Logistics, and yours may vary based on your source.
UNB+UNOA:3+5013546007355+5052601009703:14+220203:1540+0004+ +RECADV' UNH+1+RECADV:D:96A:UN:EAN003'BGM+352: :9+006885+9' DTM+50:202201280928:203' DTM+137:20220203:102' RFF+DQ:T'RFF+BN:53380005' NAD+WH+5013546007355: :9+ +Culina Logistics LOGISTICS' NAD+SE+5052601009703: :9' CPS+1' PAC+2+ +201: :9' CPS+2+1' PAC+1+ :52+201: :9' PCI+33E' GIN+BJ+510021978' PAC+110+ :50+CT' LIN+1+ +25060678710150:EN' PIA+1+TH-COC-PK4:SA' QTY+194:154:PCE' DTM+36:20220228:102' PCI+17' GIN+BX+20220228' CPS+3+1' PAC+1+ :52+201: :9' PCI+33E' GIN+BJ+510021977' PAC+110+ :50+CT' LIN+2+ +25060678710167:EN' PIA+1+TH-LAR-PK4:SA' QTY+194:300:PCE' DTM+36:20220228:102' PCI+17' GIN+BX+20220228' UNT+33+1' UNZ+1+0004'
The two main properties of an integrator.io definition file format are the header and rules. Both are located inside the resourcePath.
{ "resourcePath": "", "fileDefinition": { <header object> , "rules": [ { <rules array> } ] } }
The header properties define the structure of the file. Read the comments (//) for a breakdown:
"name": "Culina Logistics EDIFACT RECADV", // The EDIFACT file name "description": "receiving advice message", // A description of the EDIFACT file’s purpose "version": 1, "format": "delimited/edifact", // The format of the EDIFACT file. Valid values are 'delimited' and 'edifact'. "delimited": { "rowSuffix": "'", "rowDelimiter": "\n", "colDelimiter": "+" } ... // An example of the header once it’s transformed into JSON. { "name": "Culina Logistics EDIFACT RECADV", "description": "receiving advice message", "version": 1, "format": "delimited/edifact", "delimited": { "rowSuffix": "'", "rowDelimiter": "\n", "colDelimiter": "+" }, "rules" : [] }
The rules define the transformation of an EDIFACT or JSON file. Read the comments (//) for a breakdown:
"Rules":[ // The rules that define the transformation of an EDIFACT or JSON. { "maxOccurrence":1, // The number of times that an EDIFACT element should appear. "skipRowSuffix": true, //Set this to true if your text file has a rowSuffix. "required": true, // Enter true if the EDIFACT element is mandatory. Otherwise, false. "elements":[], // The elements of an EDIFACT element. "children":[], // Children of an EDIFACT element. "closeRule":{} //The close rule of an EDIFACT element. } ] .... //An example of rules in EDIFACT files. "rules": [ { "name": "Segment", // The name of the container being created in JSON. "container": true, "required": true, "maxOccurrence": 50, "children": [] } ]
The elements determine what an EDIFACT file contains and how it’s is structured.
"elements": [ { "name": "Segment Name", "value": "Segment Value" }, { "name": "Identifier 1 ", "value": { "delimiter": ":", "elements": [ { "name": "Element name 1", "value": "Ref value 1" }, { "name": "Element name 2", "value": "Ref value 2" } ] } }, { "name": " Identifier 2", "value": { "delimiter": ":", "elements": [ { "name": "Element name 1", "value": "Ref value 1" }, { "name": "Element name 2", "value": "Ref value 2" } ] } } ]
The container converts the EDIFACT elements to a JSON array. In the following example RFF is converted to a JSON array.
Below is the EDIFACT input that will be converted to a JSON array. In this example, the Date Time Period (DTM) specifies a date, and/or time, or period during which something functions.
DTM+50:202201280928:203'
This is an example of integrator.io processing the DTM to provide the proper output. You won’t be able to see this in your export or import.
{ "name": "DTM", "maxOccurrence": 30, "container": true, "children": [ { "skipRowSuffix": true, "required": true, "elements": [ { "name": "DTM", "value": "DTM" }, { "name": "Date/Time/Period", "value": { "delimiter": ":", "elements": [ { "name": "Date/time/period qualifier", "value": "DTM010-010" }, { "name": "Date/time/period", "value": "DTM010-020" }, { "name": "Date/time/period format qualifier", "value": "DTM010-030" } ] } } ] } ] }
This defines the children of an EDIFACT file.
"children":[ { "maxOccurrence":1, "skipRowSuffix": true, "Required": true, "container":true, "elements":[], "children":[], "closeRule":{} } ]
Defines the closing rule of an EDIFACT element, if any.
"closeRule": { "maxOccurrence": 1, "required": true, "skipRowSuffix": true, "elements": [ { "name": "UNT", "value": "UNT" }, { "name": "Number of segments in a message", "value": "UNT010" }, { "name": "Message reference number(UNT020)", "value": "UNT020" } ] }
This section describes how UNB (an EDI ID in the EDI format) is converted to JSON with the help of the integrator.io definition file.
UNB+UNOA:3+5013546007355+5052601009703:14+220203:1540+0004+ +RECADV'UNZ+1+0004'
This is an example of integrator.io processing UNB to provide the proper output. You won’t be able to see this in your export or import.
{ <Generic File Information comes here> "rules": [ { "maxOccurrence": 1, "required": true, "skipRowSuffix": true, "elements": [ { "name": "UNB", "value": "UNB" }, { "name": "SYNTAX IDENTIFIER", "value": { "delimiter": ":", "elements": [ { "name": "Syntax Identifier", "value": "UNB010-010" }, { "name": "Syntax Version Number", "value": "UNB010-020" } ] } }, { "name": "INTERCHANGE SENDER", "value": { "delimiter": ":", "elements": [ { "name": "Sender Identification", "value": "UNB020-010" }, { "name": "Partner Identification Code Qualifier", "value": "UNB020-020" } ] } }, { "name": "INTERCHANGE RECIPIENT", "value": { "delimiter": ":", "elements": [ { "name": "Recipient Identification", "value": "UNB030-010" }, { "name": "Partner Identification Code Qualifier", "value": "UNB030-020" } ] } }, { "name": "DATE/TIME OF PREPARATION", "value": { "delimiter": ":", "elements": [ { "name": "Date of Preparation", "value": "UNB040-010" }, { "name": "Time of Preparation", "value": "UNB040-020" } ] } }, { "name": "Interchange Control Reference", "value": "UNB050" }, { "name": "UNB060", "value": "UNB060" }, { "name": "UNB070", "value": "UNB070" } ], "children": [BGM ], // All the below subsections are children for UNB. The subsections are arranged in an way to represent the parent-child relationship. This stands true for the "children":[] array in all the below subsections. "closeRule": { // closing rule for UNB as per Culina Logistics EDIFACT RECADV "maxOccurrence": 1, "required": true, "skipRowSuffix": true, "elements": [ { "name": "UNZ", "value": "UNZ" }, { "name": "Interchange control count", "value": "UNZ010" }, { "name": "Interchange control reference(UNZ020)", "value": "UNZ020" } ] } } ] }
This is the final product you’ll see after integrator.io processes your UNB.
{ "SYNTAX IDENTIFIER": { "Syntax Identifier": "UNOA", "Syntax Version Number": "3" }, "INTERCHANGE SENDER": { "Sender Identification": "5013546007355" }, "INTERCHANGE RECIPIENT": { "Recipient Identification": "5052601009703", "Partner Identification Code Qualifier": "14" }, "DATE/TIME OF PREPARATION": { "Date of Preparation": "220203", "Time of Preparation": "1540" }, "Interchange Control Reference": "0004", "UNB060": "", "UNB070": "RECADV" }
This section describes how UNH (an EDIFACT ID in the EDIFACT format) is converted to JSON with the help of the IO definition file.
This is an example of integrator.io processing UNH to provide the proper output. You won’t be able to see this in your export or import.
{ "maxOccurrence": 1, "skipRowSuffix": true, "required": true, "elements": [ { "name": "UNH", "value": "UNH" }, { "name": "Message Reference Number", "value": "UNH010" }, { "name": "Message Header", "value": { "delimiter": ":", "elements": [ { "name": "Message Type Identifier", "value": "UNH020-010" }, { "name": "Message Type Version Number", "value": "UNH020-020" }, { "name": "Message Type Release Number", "value": "UNH020-030" }, { "name": "Controlling Agency", "value": "UNH020-040" }, { "name": "Association Assigned Code", "value": "UNH020-050" } ] } } ], "children": [BGM], "closeRule": { "maxOccurrence": 1, "required": true, "skipRowSuffix": true, "elements": [ { "name": "UNT", "value": "UNT" }, { "name": "Number of segments in a message", "value": "UNT010" }, { "name": "Message reference number(UNT020)", "value": "UNT020" } ] } ] }
This is the final product you’ll see after integrator.io processes your UNH.
{ "Message Reference Number": "1", "Message Header": { "Message Type Identifier": "RECADV", "Message Type Version Number": "D", "Message Type Release Number": "96A", "Controlling Agency": "UN", "Association Assigned Code": "EAN003" }, "Number of segments in a message": "33", "Message reference number(UNT020)": "1" }
This section describes how BGM (an EDIFACT ID in the EDIFACT format) is converted to JSON with the help of the IO definition file.
This is an example of integrator.io processing BGM to provide the proper output. You won’t be able to see this in your export or import.
{ "maxOccurrence": 1, "skipRowSuffix": true, "required": true, "elements": [ { "name": "BGM", "value": "BGM" }, { "name": "Beginning of Message", "value": { "delimiter": ":", "elements": [ { "name": "Document/Message Name, coded", "value": "BGM010-010" }, { "name": "Document/Message Number", "value": "BGM010-020" }, { "name": "Message Function, coded", "value": "BGM010-030" } ] } }, { "name": "BGM020", "value": "BGM020" }, { "name": "BGM030", "value": "BGM030" } ] }
This section describes how DTM (an EDIFACT ID in the EDIFACT format) is converted to JSON with the help of the IO definition file.
This is an example of integrator.io processing DTM to provide the proper output. You won’t be able to see this in your export or import.
{ "name": "DTM", "maxOccurrence": 30, "container": true, "children": [ { "skipRowSuffix": true, "required": true, "elements": [ { "name": "DTM", "value": "DTM" }, { "name": "Date/Time/Period", "value": { "delimiter": ":", "elements": [ { "name": "Date/time/period qualifier", "value": "DTM010-010" }, { "name": "Date/time/period", "value": "DTM010-020" }, { "name": "Date/time/period format qualifier", "value": "DTM010-030" } ] } } ] } ] }
This is the final product you’ll see after integrator.io processes your DTM.
"DTM": [ { "Date/Time/Period": { "Date/time/period qualifier": "50", "Date/time/period": "202201280928", "Date/time/period format qualifier": "203" } }, { "Date/Time/Period": { "Date/time/period qualifier": "137", "Date/time/period": "20220203", "Date/time/period format qualifier": "102" } } ]
This section describes how RFF (an EDIFACT ID in the EDIFACT format) is converted to JSON with the help of the IO definition file.
{ "name": "Segment Group 1", "maxOccurrence": 10, "container": true, "children": [ { "required": true, "skipRowSuffix": true, "elements": [ { "name": "RFF", "value": "RFF" }, { "name": "Reference", "value": { "delimiter": ":", "elements": [ { "name": "Reference Qualifier", "value": "RFF010-010" }, { "name": "Reference Number", "value": "RFF010-020" } ] } } ] } ] }
This section describes how NAD (an EDIFACT ID in the EDIFACT format) is converted to JSON with the help of the IO definition file.
This is an example of integrator.io processing NAD to provide the proper output. You won’t be able to see this in your export or import.
{ "name": "Segment Group 4", "maxOccurrence": 10, "container": true, "children": [ { "required": true, "skipRowSuffix": true, "elements": [ { "name": "NAD", "value": "NAD" }, { "name": "Party Qualifier", "value": "NAD010" }, { "name": "Name and Address", "value": { "delimiter": ":", "elements": [ { "name": "Party ID", "value": "NAD020-010" }, { "name": "Code List Responsible Agency", "value": "NAD020-020" }, { "name": "Code list responsible agency, coded", "value": "NAD020-030" } ] } }, { "name": "Name and Address Line", "value": "NAD030" }, { "name": "NAD040", "value": "NAD040" } ] } ] }
This is the final product you’ll see after integrator.io processes your NAD.
{ "Segment Group 4": [ { "Party Qualifier": "WH", "Name and Address": { "Party ID": "5013546007355", "Code List Responsible Agency": "", "Code list responsible agency, coded": "9" }, "Name and Address Line": "Culina Logistics LOGISTICS" "NAD040": "", }, { "Party Qualifier": "SE", "Name and Address": { "Party ID": "5052601009703", "Code List Responsible Agency": "", "Code list responsible agency, coded": "9" } } ] }
This section describes how CPS (an EDIFACT ID in the EDIFACT format) is converted to JSON with the help of the IO definition file.
CPS+1' PAC+2+ +201: :9' CPS+2+1' PAC+1+ :52+201: :9' PCI+33E' GIN+BJ+510021978' PAC+110+ :50+CT' LIN+1+ +25060678710150:EN' PIA+1+TH-COC-PK4:SA' QTY+194:154:PCE' DTM+36:20220228:102' PCI+17' GIN+BX+20220228'
This is an example of integrator.io processing CPS to provide the proper output. You won’t be able to see this in your export or import.
{ "name": "Segment Group 16", "maxOccurrence": 9999, "container": true, "children": [ { "required": true, "skipRowSuffix": true, "elements": [ { "name": "CPS", "value": "CPS" }, { "name": "Hierarchical ID Number", "value": "CPS010" }, { "name": "Hierarchical Parent ID", "value": "CPS020" } ] }, { "name": "Segment Group 17", "maxOccurrence": 9999, "container": true, "children": [ { "required": true, "skipRowSuffix": true, "elements": [ { "name": "PAC", "value": "PAC" }, { "name": "Number of Packages", "value": "PAC010" }, { "name": "Packages", "value": { "delimiter": ":", "elements": [ { "name": "PAC020-010", "value": "PAC020-010" }, { "name": "PAC020-020", "value": "PAC020-020" } ] } }, { "name": "Type of Packages Identification", "value": "PAC030" } ] }, { "name": "Segment Group 29", "maxOccurrence": 1000, "container": true, "children": [ { "required": false, "skipRowSuffix": true, "elements": [ { "name": "PCI", "value": "PCI" }, { "name": "Marking Instructions, Coded", "value": "PCI010" } ] }, { "name": "Segment Group 31", "maxOccurrence": 99, "container": true, "children": [ { "required": false, "skipRowSuffix": true, "elements": [ { "name": "GIN", "value": "GIN" }, { "name": "Identity Number Qualifier", "value": "GIN010" }, { "name": "Identity Number", "value": "GIN020" } ] } ] } ] } ] }, { "name": "Segment Group 22", "maxOccurrence": 9999, "container": true, "children": [ { "required": false, "skipRowSuffix": true, "elements": [ { "name": "LIN", "value": "LIN" }, { "name": "Line Item Number", "value": "LIN010" }, { "name": "LIN020", "value": "LIN020" }, { "name": "Line Item", "value": { "delimiter": ":", "elements": [ { "name": "Item Number", "value": "LIN030-010" }, { "name": "Item Number Type, Coded", "value": "LIN030-020" } ] } } ] }, { "name": "PIA", "maxOccurrence": 10, "container": true, "children": [ { "required": false, "skipRowSuffix": true, "elements": [ { "name": "PIA", "value": "PIA" }, { "name": "Product ID Function Qualifier", "value": "PIA010" }, { "name": "Additional Product ID", "value": { "delimiter": ":", "elements": [ { "name": "Item Number", "value": "PIA020-010" }, { "name": "Item Number Type, Coded", "value": "PIA020-020" }, { "name": "Code List Responsible Agency", "value": "PIA020-030" } ] } } ] } ] }, { "name": "QTY", "maxOccurrence": 10, "container": true, "children": [ { "required": false, "skipRowSuffix": true, "elements": [ { "name": "QTY", "value": "QTY" }, { "name": "Quantity", "value": { "delimiter": ":", "elements": [ { "name": "Quantity qualifier", "value": "QTY010-010" }, { "name": "Quantity", "value": "QTY010-020" }, { "name": "QTY010-020", "value": "QTY010-020" } ] } } ] } ] }, { "name": "DTM", "maxOccurrence": 5, "container": true, "children": [ { "required": false, "skipRowSuffix": true, "elements": [ { "name": "DTM", "value": "DTM" }, { "name": "Date/Time/Period", "value": { "delimiter": ":", "elements": [ { "name": "Date/Time/Period Qualifier", "value": "DTM010-010" }, { "name": "Date/Time/Period", "value": "DTM010-020" }, { "name": "Date/Time/Period Format Qualifier", "value": "DTM010-030" } ] } } ] } ] }, { "name": "Segment Group 29", "maxOccurrence": 9999, "container": true, "children": [ { "required": false, "skipRowSuffix": true, "elements": [ { "name": "PCI", "value": "PCI" }, { "name": "Marking Instructions, Coded", "value": "PCI010" } ] } ] }, { "name": "Segment Group 31", "maxOccurrence": 10, "container": true, "children": [ { "required": false, "skipRowSuffix": true, "elements": [ { "name": "GIN", "value": "GIN" }, { "name": "Identity Number Qualifier", "value": "GIN010" }, { "name": "Identity Number", "value": "GIN020" } ] } ] } ] } ] }
This is the final product you’ll see after integrator.io processes your CPS.
"Segment Group 16": [ { "Hierarchical ID Number": "1", "Segment Group 17": [ { "Number of Packages": "2", "Packages": { "PAC020-010": "" }, "Type of Packages Identification": "201: :9" } ] }, { "Hierarchical ID Number": "2", "Hierarchical Parent ID": "1", "Segment Group 17": [ { "Number of Packages": "1", "Packages": { "PAC020-010": "", "PAC020-020": "52" }, "Type of Packages Identification": "201: :9", "Segment Group 29": [ { "Marking Instructions, Coded": "33E", "Segment Group 31": [ { "Identity Number Qualifier": "BJ", "Identity Number": "510021978" } ] } ] }, { "Number of Packages": "110", "Packages": { "PAC020-010": "", "PAC020-020": "50" }, "Type of Packages Identification": "CT" } ], "Segment Group 22": [ { "Line Item Number": "1", "LIN020": "", "Line Item": { "Item Number": "25060678710150", "Item Number Type, Coded": "EN" }, "PIA": [ { "Product ID Function Qualifier": "1", "Additional Product ID": { "Item Number": "TH-COC-PK4", "Item Number Type, Coded": "SA" } } ], "QTY": [ { "Quantity": { "Quantity Qualifier": "194", "Quantity": "154", "QTY010-030": "PCE" } } ], "DTM": [ { "Date/Time/Period": { "Date/Time/Period Qualifier": "36", "Date/Time/Period": "20220228", "Date/Time/Period Format Qualifier": "102" } } ], "Segment Group 29": [ { "Marking Instructions, Coded": "17" } ], "Segment Group 31": [ { "Identity Number Qualifier": "BX", "Identity Number": "20220228" } ] } ] }, { "Hierarchical ID Number": "3", "Hierarchical Parent ID": "1", "Segment Group 17": [ { "Number of Packages": "1", "Packages": { "PAC020-010": "", "PAC020-020": "52" }, "Type of Packages Identification": "201: :9", "Segment Group 29": [ { "Marking Instructions, Coded": "33E", "Segment Group 31": [ { "Identity Number Qualifier": "BJ", "Identity Number": "510021977" } ] } ] }, { "Number of Packages": "110", "Packages": { "PAC020-010": "", "PAC020-020": "50" }, "Type of Packages Identification": "CT" } ], "Segment Group 22": [ { "Line Item Number": "2", "LIN020": "", "Line Item": { "Item Number": "25060678710167", "Item Number Type, Coded": "EN" }, "PIA": [ { "Product ID Function Qualifier": "1", "Additional Product ID": { "Item Number": "TH-LAR-PK4", "Item Number Type, Coded": "SA" } } ], "QTY": [ { "Quantity": { "Quantity Qualifier": "194", "Quantity": "300", "QTY010-030": "PCE" } } ], "DTM": [ { "Date/Time/Period": { "Date/Time/Period Qualifier": "36", "Date/Time/Period": "20220228", "Date/Time/Period Format Qualifier": "102" } } ], "Segment Group 29": [ { "Marking Instructions, Coded": "17" } ], "Segment Group 31": [ { "Identity Number Qualifier": "BX", "Identity Number": "20220228" } ] } ] } ]
This section describes how UNB (JSON format) is converted to EDIFACT with the help of the IO definition file.
This is the original JSON input you want to convert to EDIFACT using the definition file.
{ "SYNTAX IDENTIFIER": { "Syntax Identifier": "UNOA", "Syntax Version Number": "3" }, "INTERCHANGE SENDER": { "Sender Identification": "5013546007355" }, "INTERCHANGE RECIPIENT": { "Recipient Identification": "5052601009703", "Partner Identification Code Qualifier": "14" }, "DATE/TIME OF PREPARATION": { "Date of Preparation": "220203", "Time of Preparation": "1540" }, "Interchange Control Reference": "0004", "UNB060": " ", "UNB070": "RECADV" }, "Interchange control count": "1", "Interchange control reference(UNZ020)": "0004"
This is an example of the definition file processing your JSON file to provide the EDIFACT output. You won’t be able to see this in your export or import.
{ <General File Header comes here> "rules": [ { "maxOccurrence": 2, "required": true, "elements": [ { "name": "UNB", "value": "UNB" }, { "name": "SYNTAX IDENTIFIER", "value": { "delimiter": ":", "elements": [ { "name": "Syntax Identifier", "value": "{{{[SYNTAX IDENTIFIER].[Syntax Identifier]}}}" }, { "name": "Syntax Version Number", "value": "{{{[SYNTAX IDENTIFIER].[Syntax Version Number]}}}" } ] } }, { "name": "INTERCHANGE SENDER", "value": { "delimiter": ":", "elements": [ { "name": "Sender Identification", "value": "{{{[INTERCHANGE SENDER].[Sender Identification]}}}" }, { "name": "Partner Identification Code Qualifier", "value": "{{{[INTERCHANGE SENDER].[Partner Identification Code Qualifier]}}}" } ] } }, { "name": "INTERCHANGE RECIPIENT", "value": { "delimiter": ":", "elements": [ { "name": "Recipient Identification", "value": "{{{[INTERCHANGE RECIPIENT].[Recipient Identification]}}}" }, { "name": "Partner Identification Code Qualifier", "value": "{{{[INTERCHANGE RECIPIENT].[Partner Identification Code Qualifier]}}}" } ] } }, { "name": "DATE/TIME OF PREPARATION", "value": { "delimiter": ":", "elements": [ { "name": "Date of Preparation", "value": "{{{[DATE/TIME OF PREPARATION].[Date of Preparation]}}}" }, { "name": "Time of Preparation", "value": "{{{[DATE/TIME OF PREPARATION].[Time of Preparation]}}}" } ] } }, { "name": "Interchange Control Reference", "value": "{{{[Interchange Control Reference]}}}" }, { "name": "UNB060", "value": "{{{[UNB060]}}}" }, { "name": "UNB070", "value": "{{{[UNB070]}}}" } ], "children" : [BGM], "closeRule": { "maxOccurrence": 1, "required": true, "elements": [ { "name": "UNZ", "value": "UNZ" }, { "name": "Interchange control count", "value": "{{{[Interchange control count]}}}" }, { "name": "Interchange control reference(UNZ020)", "value": "{{{[Interchange control reference(UNZ020)]}}}" } ] }
This section describes how UNH (JSON format) is converted to EDIFACT with the help of the IO definition file.
This is the original JSON input you want to convert to EDIFACT using the definition file.
{ "Message Reference Number": "1", "Message Header": { "Message Type Identifier": "RECADV", "Message Type Version Number": "D", "Message Type Release Number": "96A", "Controlling Agency": "UN", "Association Assigned Code": "EAN003" } }, "Number of segments in a message": "33", "Message reference number(UNT020)": "1",
This is an example of the definition file processing your JSON file to provide the EDIFACT output. You won’t be able to see this in your export or import.
{ "maxOccurrence": 1, "required": true, "elements": [ { "name": "UNH", "value": "UNH" }, { "name": "Message Reference Number", "value": "{{{[Message Reference Number]}}}" }, { "name": "Message Header", "value": { "delimiter": ":", "elements": [ { "name": "Message Type Identifier", "value": "RECADV" }, { "name": "Message Type Version Number", "value": "D" }, { "name": "Message Type Release Number", "value": "96A" }, { "name": "Controlling Agency", "value": "{{{[Message Header].[Controlling Agency]}}}" }, { "name": "Association Assigned Code", "value": "{{{[Message Header].[Association Assigned Code]}}}" } ] } }, "closeRule": { "maxOccurrence": 1, "required": true, "elements": [ { "name": "UNT", "value": "UNT" }, { "name": "Number of segments in a message", "value": "{{{[Number of segments in a message]}}}" }, { "name": "Message reference number(UNT020)", "value": "{{{[Message reference number(UNT020)]}}}" } ] } } ]
This section describes how BGM (JSON format) is converted to EDIFACT with the help of the IO definition file.
This is the original JSON input you want to convert to EDIFACT using the definition file.
{ "Beginning of Message": { "Document/Message Name, coded": "352", "Document/Message Number": " ", "Message Function, coded": "9" }, "BGM020": "006885", "BGM030": "9" }
This is an example of the definition file processing your JSON file to provide the EDIFACT output. You won’t be able to see this in your export or import.
{ "maxOccurrence": 1, "required": true, "elements": [ { "name": "BGM", "value": "BGM" }, { "name": "Beginning of Message", "value": { "delimiter": ":", "elements": [ { "name": "Document/message name, coded", "value": "{{{[Beginning of Message].[Document/Message Name, coded]}}}" }, { "name": "Document/Message Number", "value": "{{{[Beginning of Message].[Document/Message Number]}}}" }, { "name": "Message Function, coded", "value": "{{{[Beginning of Message].[Message Function, coded]}}}" } ] } }, { "name": "BGM020", "value": "{{{[BGM020]}}}" }, { "name": "BGM030", "value": "{{{[BGM030]}}}" } ] }
This section describes how DTM (JSON format) is converted to EDIFACT with the help of the IO definition file.
This is the original JSON input you want to convert to EDIFACT using the definition file.
{ "DTM": [ { "Date/Time/Period": { "Date/time/period qualifier": "50", "Date/time/period": "202201280928", "Date/time/period format qualifier": "203" } }, { "Date/Time/Period": { "Date/time/period qualifier": "137", "Date/time/period": "20220203", "Date/time/period format qualifier": "102" } } ] }
This is an example of the definition file processing your JSON file to provide the EDIFACT output. You won’t be able to see this in your export or import.
{ "relativeDataPath": "DTM", "maxOccurrence": 30, "required": true, "elements": [ { "name": "DTM", "value": "DTM" }, { "name": "Date/Time/Period", "value": { "delimiter": ":", "elements": [ { "name": "Date/time/period qualifier", "value": "{{{[Date/Time/Period].[Date/time/period qualifier]}}}" }, { "name": "Date/time/period", "value": "{{{[Date/Time/Period].[Date/time/period]}}}" }, { "name": "Date/time/period format qualifier", "value": "{{{[Date/Time/Period].[Date/time/period format qualifier]}}}" } ] } } ] }
This section describes how RFF (JSON format) is converted to EDIFACT with the help of the IO definition file.
This is the original JSON input you want to convert to EDIFACT using the definition file.
{ "Segment Group 1": [ { "Reference": { "Reference Qualifier": "DQ", "Reference Number": "T" } }, { "Reference": { "Reference Qualifier": "BN", "Reference Number": "53380005" } } ] }
This is an example of the definition file processing your JSON file to provide the EDIFACT output. You won’t be able to see this in your export or import.
{ "maxOccurrence": 10, "relativeDataPath": "Segment Group 1", "required": true, "elements": [ { "name": "RFF", "value": "RFF" }, { "name": "Reference", "value": { "delimiter": ":", "elements": [ { "name": "Reference Qualifier", "value": "{{{[Reference].[Reference Qualifier]}}}" }, { "name": "Reference Number", "value": "{{{[Reference].[Reference Number]}}}" } ] } } ]
This section describes how NAD (JSON format) is converted to EDIFACT with the help of the IO definition file.
This is the original JSON input you want to convert to EDIFACT using the definition file.
{ "Segment Group 4": [ { "Party Qualifier": "WH", "Name and Address": { "Party ID": "5013546007355", "Code List Responsible Agency": " ", "Code List Responsible Agency, Coded": "9" }, "Name and Address Line": "Culina Logistics LOGISTICS" "NAD040": " ", }, { "Party Qualifier": "SE", "Name and Address": { "Party ID": "5052601009703", "Code List Responsible Agency": " ", "Code List Responsible Agency, Coded": "9" } } ] }
This is an example of the definition file processing your JSON file to provide the EDIFACT output. You won’t be able to see this in your export or import.
{ "relativeDataPath": "Segment Group 4", "maxOccurrence": 10, "required": true, "elements": [ { "name": "NAD", "value": "NAD" }, { "name": "Party Qualifier", "value": "{{{[Party Qualifier]}}}" }, { "name": "Name and Address", "value": { "delimiter": ":", "elements": [ { "name": "Party ID", "value": "{{{[Name and Address].[Party ID]}}}" }, { "name": "Code List Responsible Agency", "value": "{{{[Name and Address].[Code List Responsible Agency]}}}" }, { "name": "Code List Responsible Agency, Coded", "value": "{{{[Name and Address].[Code List Responsible Agency, Coded]}}}" } ] } }, { "name": "Name and Address Line", "value": "{{{[Name and Address Line]}}}" }, { "name": "NAD040", "value": "{{{[NAD040]}}}" } ] }
This section describes how CPS (JSON format) is converted to EDIFACT with the help of the IO definition file.
This is the original JSON input you want to convert to EDIFACT using the definition file.
{ "Segment Group 16": [ { "Hierarchical ID Number": "1", "Segment Group 17": [ { "Number of Packages": "2", "Packages": { "PAC020-010": " " }, "Type of Packages Identification": "201: :9" } ] }, { "Hierarchical ID Number": "2", "Hierarchical Parent ID": "1", "Segment Group 17": [ { "Number of Packages": "1", "Packages": { "PAC020-010": " ", "PAC020-020": "52" }, "Type of Packages Identification": "201: :9", "Segment Group 29": [ { "Marking Instructions, Coded": "33E", "Segment Group 31": [ { "Identity Number Qualifier": "BJ", "Identity Number": "510021978" } ] } ] }, { "Number of Packages": "110", "Packages": { "PAC020-010": " ", "PAC020-020": "50" }, "Type of Packages Identification": "CT" } ], "Segment Group 22": [ { "Line Item Number": "1", "LIN020": " ", "Line Item": { "Item Number": "25060678710150", "Item Number Type, Coded": "EN" }, "PIA": [ { "Product ID Function Qualifier": "1", "Additional Product ID": { "Item Number": "TH-COC-PK4", "Item Number Type, Coded": "SA" } } ], "QTY": [ { "Quantity": { "Quantity Qualifier": "194", "Quantity": "154", "QTY010-030": "PCE" } } ], "DTM": [ { "Date/Time/Period": { "Date/Time/Period Qualifier": "36", "Date/Time/Period": "20220228", "Date/Time/Period Format Qualifier": "102" } } ], "Segment Group 29": [ { "Marking Instructions, Coded": "17" } ], "Segment Group 31": [ { "Identity Number Qualifier": "BX", "Identity Number": "20220228" } ] } ] }, { "Hierarchical ID Number": "3", "Hierarchical Parent ID": "1", "Segment Group 17": [ { "Number of Packages": "1", "Packages": { "PAC020-010": " ", "PAC020-020": "52" }, "Type of Packages Identification": "201: :9", "Segment Group 29": [ { "Marking Instructions, Coded": "33E", "Segment Group 31": [ { "Identity Number Qualifier": "BJ", "Identity Number": "510021977" } ] } ] }, { "Number of Packages": "110", "Packages": { "PAC020-010": " ", "PAC020-020": "50" }, "Type of Packages Identification": "CT" } ], "Segment Group 22": [ { "Line Item Number": "2", "LIN020": " ", "Line Item": { "Item Number": "25060678710167", "Item Number Type, Coded": "EN" }, "PIA": [ { "Product ID Function Qualifier": "1", "Additional Product ID": { "Item Number": "TH-LAR-PK4", "Item Number Type, Coded": "SA" } } ], "QTY": [ { "Quantity": { "Quantity Qualifier": "194", "Quantity": "300", "QTY010-030": "PCE" } } ], "DTM": [ { "Date/Time/Period": { "Date/Time/Period Qualifier": "36", "Date/Time/Period": "20220228", "Date/Time/Period Format Qualifier": "102" } } ], "Segment Group 29": [ { "Marking Instructions, Coded": "17" } ], "Segment Group 31": [ { "Identity Number Qualifier": "BX", "Identity Number": "20220228" } ] } ] } }
This is an example of the definition file processing your JSON file to provide the EDIFACT output. You won’t be able to see this in your export or import.
{ "relativeDataPath": "Segment Group 16", "maxOccurrence": 9999, "required": true, "elements": [ { "name": "CPS", "value": "CPS" }, { "name": "Hierarchical ID Number", "value": "{{{[Hierarchical ID Number]}}}" }, { "name": "Hierarchical Parent ID", "value": "{{{[Hierarchical Parent ID]}}}" } ], "children": [ { "relativeDataPath": "Segment Group 17", "maxOccurrence": 9999, "required": true, "elements": [ { "name": "PAC", "value": "PAC" }, { "name": "Number of Packages", "value": "{{{[Number of Packages]}}}" }, { "name": "Packages", "value": { "delimiter": ":", "elements": [ { "name": "PAC020-010", "value": "{{{[Packages].[PAC020-010]}}}" }, { "name": "PAC020-020", "value": "{{{[Packages].[PAC020-020]}}}" } ] } }, { "name": "Type of Packages Identification", "value": "{{{[Type of Packages Identification]}}}" } ], "children": [ { "relativeDataPath": "Segment Group 29", "maxOccurrence": 1000, "required": false, "elements": [ { "name": "PCI", "value": "PCI" }, { "name": "Marking Instructions, Coded", "value": "{{{[Marking Instructions, Coded]}}}" } ], "children": [ { "relativeDataPath": "Segment Group 31", "maxOccurrence": 99, "required": false, "elements": [ { "name": "GIN", "value": "GIN" }, { "name": "Identity Number Qualifier", "value": "{{{[Identity Number Qualifier]}}}" }, { "name": "Identity Number", "value": "{{{[Identity Number]}}}" } ] } ] } ] }, { "relativeDataPath": "Segment Group 22", "maxOccurrence": 9999, "required": false, "elements": [ { "name": "LIN", "value": "LIN" }, { "name": "Line Item Number", "value": "{{{[Line Item Number]}}}" }, { "name": "LIN020", "value": "{{{[LIN020]}}}" }, { "name": "Line Item", "value": { "delimiter": ":", "elements": [ { "name": "Item Number", "value": "{{{[Line Item].[Item Number]}}}" }, { "name": "Item Number Type, Coded", "value": "{{{[Line Item].[Item Number Type, Coded]}}}" } ] } } ], "children": [ { "relativeDataPath": "PIA", "maxOccurrence": 10, "required": false, "elements": [ { "name": "PIA", "value": "PIA" }, { "name": "Product ID Function Qualifier", "value": "{{{[Product ID Function Qualifier]}}}" }, { "name": "Additional Product ID", "value": { "delimiter": ":", "elements": [ { "name": "Item Number", "value": "{{{[Additional Product ID].[Item Number]}}}" }, { "name": "Item Number Type, Coded", "value": "{{{[Additional Product ID].[Item Number Type, Coded]}}}" } ] } } ] }, { "relativeDataPath": "QTY", "maxOccurrence": 10, "required": false, "elements": [ { "name": "QTY", "value": "QTY" }, { "name": "Quantity", "value": { "delimiter": ":", "elements": [ { "name": "Quantity Qualifier", "value": "{{{[Quantity].[Quantity Qualifier]}}}" }, { "name": "Quantity", "value": "{{{[Quantity].[Quantity]}}}" }, { "name": "QTY010-030", "value": "{{{[Quantity].[QTY010-030]}}}" } ] } } ] }, { "relativeDataPath": "DTM", "maxOccurrence": 5, "required": false, "elements": [ { "name": "DTM", "value": "DTM" }, { "name": "Date/Time/Period", "value": { "delimiter": ":", "elements": [ { "name": "Date/Time/Period Qualifier", "value": "{{{[Date/Time/Period].[Date/Time/Period Qualifier]}}}" }, { "name": "Date/Time/Period", "value": "{{{[Date/Time/Period].[Date/Time/Period]}}}" }, { "name": "Date/Time/Period Format Qualifier", "value": "{{{[Date/Time/Period].[Date/Time/Period Format Qualifier]}}}" } ] } } ] }, { "relativeDataPath": "Segment Group 29", "maxOccurrence": 9999, "required": false, "elements": [ { "name": "PCI", "value": "PCI" }, { "name": "Marking Instructions, Coded", "value": "{{{[Marking Instructions, Coded]}}}" } ] }, { "relativeDataPath": "Segment Group 31", "maxOccurrence": 10, "required": false, "elements": [ { "name": "GIN", "value": "GIN" }, { "name": "Identity Number Qualifier", "value": "{{{[Identity Number Qualifier]}}}" }, { "name": "Identity Number", "value": "{{{[Identity Number]}}}" } ] } ] } ] } }
This is the final product you’ll see after integrator.io processes your CPS JSON file.
CPS+1' PAC+2+ +201: :9' CPS+2+1' PAC+1+ :52+201: :9' PCI+33E' GIN+BJ+510021978' PAC+110+ :50+CT' LIN+1+ +25060678710150:EN' PIA+1+TH-COC-PK4:SA' QTY+194:154:PCE' DTM+36:20220228:102' PCI+17' GIN+BX+20220228'
Comments
Article is closed for comments.