Format X12 820–4010 JSON Data

The following example shows a basic pipeline for processing X12 820 data. The pipeline requires minimal configuration, specifically for the X12 type.



Download this Pipeline
  1. Configure the JSON Generator Snap to pass the JSON to be formatted.


    The input JSON must contain a Transaction_Set array:



    Here is the full JSON code that is being used as input:

    {
        "input0":[
            {
                "Transaction_Set":[
                    {
                        "ST":{
                            "SegmentName":"ST",
                            "TransactionSetIdentifierCode":"820",
                            "TransactionSetControlNumber":"0008",
                            "ImplementationConventionPreference":""
                        },
                        "BPR":{
                            "SegmentName":"BPR",
                            "TransactionHandlingCode":"C",
                            "MonetaryAmount":"1000",
                            "Credit_DebitFlagCode":"C",
                            "PaymentMethodCode":"CHK",
                            "PaymentFormatCode":"",
                            "DFIIDNumberQualifier":"",
                            "DFIIdentificationNumber":"",
                            "AccountNumberQualifier":"",
                            "AccountNumber":"",
                            "OriginatingCompanyIdentifier":"",
                            "OriginatingCompanySupplementalCode":"",
                            "DFIIDNumberQualifier_1":"",
                            "DFIIdentificationNumber_1":"",
                            "AccountNumberQualifier_1":"",
                            "AccountNumber_1":"",
                            "Date":"20230101",
                            "BusinessFunctionCode":"",
                            "DFIIDNumberQualifier_2":"",
                            "DFIIdentificationNumber_2":"",
                            "AccountNumberQualifier_2":"",
                            "AccountNumber_2":""
                        },
                        "Loop_1_N1":[
                            {
                                "N1":{
                                    "SegmentName":"N1",
                                    "EntityIdentifierCode":"BY",
                                    "Name":"BUYER NAME",
                                    "IdentificationCodeQualifier":"",
                                    "IdentificationCode":"",
                                    "EntityRelationshipCode":"",
                                    "EntityIdentifierCode_1":""
                                }
                            },
                            {
                                "N1":{
                                    "SegmentName":"N1",
                                    "EntityIdentifierCode":"PR",
                                    "Name":"PAYER NAME",
                                    "IdentificationCodeQualifier":"",
                                    "IdentificationCode":"",
                                    "EntityRelationshipCode":"",
                                    "EntityIdentifierCode_1":""
                                }
                            },
                            {
                                "N1":{
                                    "SegmentName":"N1",
                                    "EntityIdentifierCode":"PE",
                                    "Name":"PAYEE NAME",
                                    "IdentificationCodeQualifier":"",
                                    "IdentificationCode":"",
                                    "EntityRelationshipCode":"",
                                    "EntityIdentifierCode_1":""
                                }
                            }
                        ],
                        "SE":{
                            "SegmentName":"SE",
                            "NumberofIncludedSegments":"6",
                            "TransactionSetControlNumber":"0008"
                        }
                    }
                ]
            }
        ]
    }
  2. In the X12 Formatter Snap, set the correct X12 type - x12_820-4010 in our example - to ensure that Snap uses the appropriate schema for validation.

    The Snap outputs a valid X12 820 binary data stream containing the provided data.

To successfully reuse pipelines:
  1. Download and import the pipeline into SnapLogic.
  2. Configure Snap accounts as applicable.
  3. Provide pipeline parameters as applicable.