EDI Formatter

read JSON document data from the input view and convert it into an EDIFACT binary file, that is, formatted according to a specific EDIFACT message type and version.

Overview

You can use this Snap to read JSON document data from the input view and convert it into an EDIFACT binary file, that is, formatted according to a specific EDIFACT message type and version.



Snap views

View Description Examples of upstream and downstream Snaps
Input JSON document containing valid EDIFACT data.
Output EDIFACT data in binary format.
Error

Error handling is a generic way to handle errors without losing data or failing the Snap execution. You can handle the errors that the Snap might encounter when running the pipeline by choosing one of the following options from the When errors occur list under the Views tab. The available options are:

  • Stop Pipeline Execution Stops the current pipeline execution when an error occurs.
  • Discard Error Data and Continue Ignores the error, discards that record, and continues with the remaining records.
  • Route Error Data to Error View Routes the error data to an error view without stopping the Snap execution.

Learn more about Error handling in Pipelines.

Snap settings

Legend:
  • Expression icon (): Allows using JavaScript syntax to access SnapLogic Expressions to set field values dynamically (if enabled). If disabled, you can provide a static value. Learn more.
  • SnapGPT (): Generates SnapLogic Expressions based on natural language using SnapGPT. Learn more.
  • Suggestion icon (): Populates a list of values dynamically based on your Snap configuration. You can select only one attribute at a time using the icon. Type into the field if it supports a comma-separated list of values.
  • Upload : Uploads files. Learn more.
Learn more about the icons in the Snap settings dialog.
Field / Field set Type Description
Label String

Required. Specify a unique name for the Snap. Modify this to be more appropriate, especially if more than one of the same Snaps is in the pipeline.

Default value: EDI Parser

Example: EDI Formatter
Version Dropdown list/Expression Required. The EDIFACT version of the input data.
Available options are:
  • D00A
  • D00B
  • D10A
  • D10B
  • D11B
  • D18A
  • D95B
  • D96B
  • D98B
  • D99B

Default value: D98B

Example: D00A

EDIFACT Type String/Expression/ Suggestion Required. The EDIFACT message type. The Snap suggests available types based on the selected version.

For available message types by version, see EDIFACT message type.

Default value: N/A

Example: aperak

Validate Checkbox Validates the input data against the selected EDIFACT version and type to ensure the input is well-formed and respects the required EDIFACT type structure.

Default status: Deselected

Format each document Checkbox If selected, each incoming document is formatted into a separate EDIFACT binary output, each with its own UNA/UNB header.

If deselected, all incoming documents are aggregated into a single binary output with one UNA/UNB header and UNZ trailer.

Default status: Deselected

Ignore empty tabs Checkbox Select this checkbox to ignore any empty or null JSON fields from the EDIFACT output.

Default status: Selected

UNA The UNA field set is used to define the service string advice, which specifies the separators and indicators used in the interchange.
UNA Name Dropdown list The name of the UNA segment element to add.
Available options are:
  • Component data element separator
  • Data element separator
  • Decimal notation
  • Release indicator
  • Repetition separator
  • Segment terminator

Default value: N/A

Example: Data element separator

UNA Value String/Expression The value of the UNA segment.

Default value: N/A

Example: 234

UNB The UNB field set is used to define the interchange header, which contains routing and identification information for the EDI interchange.
UNB Name Dropdown list Specify the key name of the UNB segment.
Available options are:
  • Syntax version number
  • Syntax identifier
  • Interchange sender identification
  • Acknowledgement request
  • Processing priority code
  • Time
  • Interchange control reference
  • Identification recipient code qualifier
  • Application reference
  • Service code list directory version number
  • Date
  • Interchange recipient identification
  • Identification sender code qualifier
  • Communications agreementID
  • Recipient reference password
  • Interchange sender internal identification
  • Test indicator
  • Interchange recipient internal identification
  • Character encoding

Default value: Syntax version number

Example: Acknowledgement request

UNB Value String/Expression The value of the UNB segment.

Default value: N/A

Example: SenderAbc

UNH Segment The UNH field set is used to define the message header, which contains key metadata information for identifying and processing the EDI message.
UNH Name Dropdown list Specify the key name of the UNH segment.
Available options are:
  • Message reference number
  • Message version number
  • Common access referemce
  • Message type
  • First and last transfer
  • Message release number
  • Controlling agency
  • Sequence of transfers

Default value: Message reference number

Example: First and last transfer

UNH Value String/Expression The value of the UNH segment.

Default value: N/A

Example: SenderAbc

Snap execution Dropdown list
Choose one of the three modes in which the Snap executes. Available options are:
  • Validate & Execute: Performs limited execution of the Snap and generates a data preview during pipeline validation. Subsequently, performs full execution of the Snap (unlimited records) during pipeline runtime.
  • Execute only: Performs full execution of the Snap during pipeline execution without generating preview data.
  • Disabled: Disables the Snap and all Snaps that are downstream from it.

Default value: Validate & Execute

Example: Execute only

EDIFACT message type

Available EDIFACT message types for each version are:

Version Type
D00A
  • iftmin
  • aperak
D00B
  • invoic
  • codeco
  • iftmbc
  • coprar
  • coarri
  • iftsai
  • aperak
  • ifcsum
  • iftmbf
  • iftmcs
D10A
  • iftsta
  • prodat
  • pricat
  • ordrsp
  • desadv
  • cusdec
  • orders
  • ifcsum
  • invoic
  • iftmin
  • delfor
  • cusres
  • ordchg
  • invrpt
D10B
  • iftsai
D11B
  • cuscar
D18A
  • tpfrep
D95B
  • cuscar
  • invoic
  • coprar
  • coparn
  • baplie
  • aperak
  • ifcsum
  • iftmbf
D96B
  • cuscar
  • iftmbf
D98B
  • iftmbf
D99B
  • iftmin

Examples