X12 945 Warehouse Shipping Advice Last updated: 2026-09-29

The 945 is the X12 warehouse shipping advice. A third-party warehouse sends it to the depositor - the owner of the goods - to confirm that an order was shipped.

It answers a 940 warehouse shipping order: W06 identifies the shipment and depositor order, N1 loops the parties, W27 the carrier, and LX loops with W12 segments report what was shipped per item.

At a glance

Standard
X12
Version
004010
Functional group
SW (GS01)
Sent by
Warehouse (3PL) to depositor
Responses
997
ediFabric .NET template
TS945 in EdiFabric.Templates.X12
OpenEDI definition
View 945 in the spec library

945 structure

The full X12 945 layout from its OpenEDI definition, the same model ediFabric uses to parse, validate and generate it: 9 loops and 47 segment positions, in file order. Loops are shaded and their segments indented; Max use is how many times a segment or loop may repeat.

Segment / loop Name Usage Max use
STTransaction Set HeaderMandatory1
W06Warehouse Shipment IdentificationMandatory1
N1 loopNameMandatory10
N1NameMandatory1
N2Additional Name InformationOptional1
N3Address InformationOptional2
N4Geographic LocationOptional1
PERAdministrative Communications ContactOptional5
N9Reference IdentificationOptional10
G61ContactOptional3
G62Date/TimeOptional5
NTENote/Special InstructionOptional20
W27Carrier DetailOptional1
W6Special Handling Code, Special Handling Code, Special Handling CodeOptional1
W28Consolidation InformationOptional1
W10Unit Load DetailOptional10
G72Allowance or ChargeOptional5
LM loopCode Source InformationOptional10
LMCode Source InformationMandatory1
LQIndustry CodeMandatory100
LX loopAssigned NumberOptional>1
LXAssigned NumberMandatory1
MANMarks and NumbersOptional>1
PALPallet InformationOptional1
N9Reference IdentificationOptional5
W12 loopWarehouse Item DetailOptional>1
W12Warehouse Item DetailMandatory1
G69Line Item Detail - DescriptionOptional5
N9Reference IdentificationOptional200
G62Date/TimeOptional10
QTYQuantityOptional10
MEAMeasurementsOptional5
AMTMonetary AmountOptional1
R4Port or TerminalOptional5
W27Carrier DetailOptional1
N1NameOptional5
G72Allowance or ChargeOptional5
LM loopCode Source InformationOptional10
LMCode Source InformationMandatory1
LQIndustry CodeMandatory100
LS loopLoop HeaderOptional1
LSLoop HeaderMandatory1
LX loopAssigned NumberOptional>1
LXAssigned NumberMandatory1
N9Reference IdentificationOptional>1
G62Date/TimeOptional10
N1NameOptional1
LM loopCode Source InformationOptional10
LMCode Source InformationMandatory1
LQIndustry CodeMandatory100
LELoop TrailerMandatory1
FA1 loopType of Financial Accounting DataOptional>1
FA1Type of Financial Accounting DataMandatory1
FA2Accounting DataMandatory>1
W03Total Shipment InformationOptional1
SETransaction Set TrailerMandatory1

Sample 945 file

A shipping advice for one depositor order with item details. Paste it into EdiNation to see every element named and validated.

ISA*00*          *00*          *16*SENDER1        *14*RECEIVER1      *071216*1406*U*00204*000000263*1*T*>~
GS*IN*SENDER1*RECEIVER1*20071216*1406*000000001*X*004010~
ST*945*0001~
W06*X*12345*CCYYMMDD*123456*1234**01*9999****Z~
N1*WH*Warehouse Name*9*123456~
N1*DE*Depositor Name*9*0123456789000~
N9*SN*Seal Number~
N9*ZZ*Temperature Recording Device Number~
W27*H*TRUK*TRUCKING*CC***Equipment ID~
LX*1~
W12*CC*72*72**CA*007117901645*UK*10071179016458*40550*799*G*L~
G69*Some description~
N9*LI*1000~
N9*PC*989JAN281301~
N9*LV*00100752782101847618*36~
N9*LV*00100752782101847619*36~
LX*2~
W12*CC*72*72**CA*007117901645*UK*10071179016458*40551*884*G*L~
G69*Some description~
N9*LI*1000~
N9*PC*989JAN291301~
N9*LV*00100752782101847620*72~
W03*240*15360*LB~
SE*22*0001~
GE*2*000000001~
IEA*1*000000263~

The same 945 as JSON

ediFabric turns every loop, segment and element into a named field. This is the transaction from the sample, in the JSON that ediFabric Native and Cloud return and accept.

{
  "ST": {
    "TransactionSetIdentifierCode_01": "945",
    "TransactionSetControlNumber_02": "0001"
  },
  "W06": {
    "ReportingCode_01": "X",
    "DepositorOrderNumber_02": "12345",
    "Date_03": "CCYYMMDD",
    "ShipmentIdentificationNumber_04": "123456",
    "AgentShipmentIDNumber_05": "1234",
    "MasterReferenceLinkNumber_07": "01",
    "LinkSequenceNumber_08": "9999",
    "ActionCode_12": "Z"
  },
  "N1Loop": [
    {
      "N1": {
        "EntityIdentifierCode_01": "WH",
        "Name_02": "Warehouse Name",
        "IdentificationCodeQualifier_03": "9",
        "IdentificationCode_04": "123456"
      }
    },
    {
      "N1": {
        "EntityIdentifierCode_01": "DE",
        "Name_02": "Depositor Name",
        "IdentificationCodeQualifier_03": "9",
        "IdentificationCode_04": "0123456789000"
      }
    }
  ],
  "N9": [
    {
      "ReferenceIdentificationQualifier_01": "SN",
      "ReferenceIdentification_02": "Seal Number"
    },
    {
      "ReferenceIdentificationQualifier_01": "ZZ",
      "ReferenceIdentification_02": "Temperature Recording Device Number"
    }
  ],
  "W27": {
    "TransportationMethodTypeCode_01": "H",
    "StandardCarrierAlphaCode_02": "TRUK",
    "Routing_03": "TRUCKING",
    "ShipmentMethodofPayment_04": "CC",
    "EquipmentNumber_07": "Equipment ID"
  },
  "LXLoop": [
    {
      "LX": {
        "AssignedNumber_01": "1"
      },
      "W12Loop": [
        {
          "W12": {
            "ShipmentOrderStatusCode_01": "CC",
            "QuantityOrdered_02": "72",
            "NumberofUnitsShipped_03": "72",
            "UnitorBasisforMeasurementCode_05": "CA",
            "UPCCaseCode_06": "007117901645",
            "ProductServiceIDQualifier_07": "UK",
            "ProductServiceID_08": "10071179016458",
            "WarehouseLotNumber_09": "40550",
            "Weight_10": "799",
            "WeightQualifier_11": "G",
            "WeightUnitCode_12": "L"
          },
          "G69": [
            {
              "FreeformDescription_01": "Some description"
            }
          ],
          "N9": [
            {
              "ReferenceIdentificationQualifier_01": "LI",
              "ReferenceIdentification_02": "1000"
            },
            {
              "ReferenceIdentificationQualifier_01": "PC",
              "ReferenceIdentification_02": "989JAN281301"
            },
            {
              "ReferenceIdentificationQualifier_01": "LV",
              "ReferenceIdentification_02": "00100752782101847618",
              "FreeformDescription_03": "36"
            },
            {
              "ReferenceIdentificationQualifier_01": "LV",
              "ReferenceIdentification_02": "00100752782101847619",
              "FreeformDescription_03": "36"
            }
          ]
        }
      ]
    },
    {
      "LX": {
        "AssignedNumber_01": "2"
      },
      "W12Loop": [
        {
          "W12": {
            "ShipmentOrderStatusCode_01": "CC",
            "QuantityOrdered_02": "72",
            "NumberofUnitsShipped_03": "72",
            "UnitorBasisforMeasurementCode_05": "CA",
            "UPCCaseCode_06": "007117901645",
            "ProductServiceIDQualifier_07": "UK",
            "ProductServiceID_08": "10071179016458",
            "WarehouseLotNumber_09": "40551",
            "Weight_10": "884",
            "WeightQualifier_11": "G",
            "WeightUnitCode_12": "L"
          },
          "G69": [
            {
              "FreeformDescription_01": "Some description"
            }
          ],
          "N9": [
            {
              "ReferenceIdentificationQualifier_01": "LI",
              "ReferenceIdentification_02": "1000"
            },
            {
              "ReferenceIdentificationQualifier_01": "PC",
              "ReferenceIdentification_02": "989JAN291301"
            },
            {
              "ReferenceIdentificationQualifier_01": "LV",
              "ReferenceIdentification_02": "00100752782101847620",
              "FreeformDescription_03": "72"
            }
          ]
        }
      ]
    }
  ],
  "W03": {
    "NumberofUnitsShipped_01": "240",
    "Weight_02": "15360",
    "UnitorBasisforMeasurementCode_03": "LB"
  },
  "SE": {
    "NumberofIncludedSegments_01": "22",
    "TransactionSetControlNumber_02": "0001"
  }
}

Parse and validate a 945 file

Read the file into typed objects with ediFabric .NET, convert it to JSON in process with the ediFabric Native bindings for Python, Java and C, or post it to the ediFabric Cloud REST API from any language.

using EdiFabric.Templates.X12004010;

License.SetSerial("YOUR_SERIAL_KEY");

using (var stream = File.OpenRead(@"C:\edi\WarehouseShippingAdvice.txt"))
using (var reader = new X12Reader(stream, "EdiFabric.Templates.X12"))
{
    var items = await reader.ReadToEndAsync();
    foreach (var transaction in items.OfType<TS945>())
    {
        if (transaction.IsValid(out MessageErrorContext errors))
            Console.WriteLine($"{transaction.ST.TransactionSetControlNumber_02} is valid");
        else
            Console.WriteLine(string.Join(Environment.NewLine, errors.Flatten()));
    }
}
import json
import edifabric_x12 as ef

serial = "YOUR_SERIAL_KEY"
ef.load_library()
ef.set_serial(serial)
ef.set_map(json.dumps({"default": serial, "maps": {}}))

edi = open("WarehouseShippingAdvice.txt", "rb").read()
output, offset = ef.parse(edi, ef.ParseMode.JSON_VALIDATE)
transactions = output[:offset]
report = json.loads(output[offset:])
print(report["errors_count"])
import com.edifabric.nativex12.EdiFabricX12;
import com.edifabric.nativex12.ParseMode;
import com.edifabric.nativex12.ParseResult;

String serial = "YOUR_SERIAL_KEY";
EdiFabricX12.loadLibrary();
EdiFabricX12.setSerial(serial);
EdiFabricX12.setMap("{\"default\":\"" + serial + "\",\"maps\":{}}");

String edi = Files.readString(Path.of("WarehouseShippingAdvice.txt"));
ParseResult result = EdiFabricX12.parse(edi, ParseMode.JSON_VALIDATE);
System.out.println(result.getTransactions());
System.out.println(result.getReport());
#include "edifabric_x12.h"

const char *serial = "YOUR_SERIAL_KEY";
ef_parse_result result;

if (ef_load_library(NULL) != 0)
    return 1;
ef_set_serial(serial);
ef_set_map("{\"default\":\"YOUR_SERIAL_KEY\",\"maps\":{}}");

char *edi = read_file("WarehouseShippingAdvice.txt", NULL);   /* helper in example_all_functions.c */
if (ef_parse(edi, EF_PARSE_JSON_VALIDATE, NULL, &result) == 0) {
    /* transactions = output[0 .. offset), report = output[offset .. length) */
    fwrite(result.output.data, 1, (size_t)result.output.length, stdout);
    ef_free(result.output.data);
}
curl -X POST 'https://api.edination.com/v2/x12/read' \
-H 'Ocp-Apim-Subscription-Key: YOUR_SERIAL_KEY' \
-H 'Content-Type: application/octet-stream' \
--data-binary '@WarehouseShippingAdvice.txt'

Generate a 945 file

Populate a TS945 object in .NET, or pass JSON in the shape shown above to ediFabric Native or ediFabric Cloud, and get a valid 945 file back.

using EdiFabric.Templates.X12004010;

License.SetSerial("YOUR_SERIAL_KEY");

var transaction = new TS945();

//  Transaction Set Identifier Code = "945"
//  (Receiving Advice / Acceptance Certificate)
//  Transaction Set Control Number = 0002
transaction.ST = new ST();
transaction.ST.TransactionSetIdentifierCode_01 = "945";
transaction.ST.TransactionSetControlNumber_02 = "0001";

// ... set the remaining loops and segments the same way

// SegmentBuilders is in the Common project of the example repository
using (var stream = new MemoryStream())
{
    using (var writer = new X12Writer(stream))
    {
        writer.Write(SegmentBuilders.BuildIsa("1"));
        writer.Write(SegmentBuilders.BuildGs("1"));
        writer.Write(transaction);
    }
    Console.WriteLine(Encoding.UTF8.GetString(stream.ToArray()));
}
import json
import edifabric_x12 as ef

serial = "YOUR_SERIAL_KEY"
ef.load_library()
ef.set_serial(serial)
ef.set_map(json.dumps({"default": serial, "maps": {}}))

# the transactions JSON returned by ef.parse, edited or produced by your application
transactions = open("WarehouseShippingAdvice.json", "rb").read()
edi = ef.build(transactions, postfix="\r\n")
print(edi)
import com.edifabric.nativex12.EdiFabricX12;

String serial = "YOUR_SERIAL_KEY";
EdiFabricX12.loadLibrary();
EdiFabricX12.setSerial(serial);
EdiFabricX12.setMap("{\"default\":\"" + serial + "\",\"maps\":{}}");

// the transactions JSON returned by parse, edited or produced by your application
String transactions = Files.readString(Path.of("WarehouseShippingAdvice.json"));
String edi = EdiFabricX12.build(transactions, "\r\n");
System.out.println(edi);
#include "edifabric_x12.h"

ef_buffer edi;

if (ef_load_library(NULL) != 0)
    return 1;
ef_set_serial("YOUR_SERIAL_KEY");
ef_set_map("{\"default\":\"YOUR_SERIAL_KEY\",\"maps\":{}}");

/* the transactions JSON returned by ef_parse, edited or produced by your application */
char *transactions = read_file("WarehouseShippingAdvice.json", NULL);
if (ef_build(transactions, "\r\n", &edi) == 0) {
    fwrite(edi.data, 1, (size_t)edi.length, stdout);
    ef_free(edi.data);
}
# the JSON returned by /read, edited or produced by your application
curl -X POST 'https://api.edination.com/v2/x12/write' \
-H 'Ocp-Apim-Subscription-Key: YOUR_SERIAL_KEY' \
-H 'Content-Type: application/json' \
--data-binary '@WarehouseShippingAdvice.json' \
-o 'WarehouseShippingAdvice.txt'

Complete ediFabric .NET example

A complete C# program for the X12 945, built on TS945 in EdiFabric.Templates.X12. The same code is in the ediFabric .NET examples on GitHub.

using EdiFabric.Core.Model.Edi;
using EdiFabric.Core.Model.Edi.X12;
using EdiFabric.Examples.X12.Common;
using EdiFabric.Framework.Readers;
using EdiFabric.Framework.Writers;
using EdiFabric.Templates.X12004010;
using System.Collections.Generic;
using System.IO;
using System.Linq;

namespace EdiFabric.Examples.X12.T945
{
    class Program
    {
        static void Main(string[] args)
        {
            SerialKey.Set(Common.SerialKey.Get());
            Read();
            Write();
        }

        ///
        /// Read Warehouse Shipping Advice
        ///
        static void Read()
        {
            var ediStream = File.OpenRead(Directory.GetCurrentDirectory() + @"\..\..\..\Files\X12\WarehouseShippingAdvice.txt");

            List ediItems;
            using (var ediReader = new X12Reader(ediStream, "EdiFabric.Templates.X12"))
                ediItems = ediReader.ReadToEnd().ToList();

            var transactions = ediItems.OfType();

            foreach (var transaction in transactions)
            {
                if (transaction.HasErrors)
                {
                    //  partially parsed
                    var errors = transaction.ErrorContext.Flatten();
                }
            }
        }

        ///
        /// Write Warehouse Shipping Advice
        ///
        static void Write()
        {
            var transaction = BuildWarehouseShippingAdvice("2");

            using (var stream = new MemoryStream())
            {
                using (var writer = new X12Writer(stream))
                {
                    writer.Write(SegmentBuilders.BuildIsa("1"));
                    writer.Write(SegmentBuilders.BuildGs("1"));
                    writer.Write(transaction);
                }

                var ediString = stream.LoadToString();
            }
        }

        ///
        /// Builds warehouse shipping advice.
        /// Original from http://techsheets.simplot.com/EDI/945_FG_4010.pdf
        ///
        static TS945 BuildWarehouseShippingAdvice(string controlNumber)
        {
            var result = new TS945();

            //  Transaction Set Identifier Code = "945"
            //  (Receiving Advice / Acceptance Certificate)
            //  Transaction Set Control Number = 0002
            result.ST = new ST();
            result.ST.TransactionSetIdentifierCode_01 = "945";
            result.ST.TransactionSetControlNumber_02 = controlNumber.PadLeft(9, '0');

            //  Warehouse Shipment Identification
            //  X = Reporting Code
            //  F = Full Detail
            //  12345 = Mfg.Order No.
            //  CCYYMMDD = Shipment Date
            //  123456 = PRO No.
            //  1234 = Bill of Lading No.
            //  01 = Stop Number
            //  9999 = Mfg.Master Order Number
            //  Z = Action Code
            //  1 = Add
            //  2 = Change
            result.W06 = new W06();
            result.W06.ReportingCode_01 = "X";
            result.W06.DepositorOrderNumber_02 = "12345";
            result.W06.Date_03 = "CCYYMMDD";
            result.W06.ShipmentIdentificationNumber_04 = "123456";
            result.W06.AgentShipmentIDNumber_05 = "1234";
            result.W06.MasterReferenceLinkNumber_07 = "01";
            result.W06.LinkSequenceNumber_08 = "9999";
            result.W06.ActionCode_12 = "Z";

            //  Repeating N1 Loops
            result.N1Loop = new List();

            //  Begin N1 Loop
            var n1Loop1 = new Loop_N1_945();

            //  Name
            //  WH = Warehouse
            //  Warehouse Name = Actual Name
            //  XX = Warehouse Code Qualifier
            //  9 = DUNS + 4
            //  91 = Code assigned by Manufacturer
            //  123456 = Actual DUNS # or Code
            n1Loop1.N1 = new N1();
            n1Loop1.N1.EntityIdentifierCode_01 = "WH";
            n1Loop1.N1.Name_02 = "Warehouse Name";
            n1Loop1.N1.IdentificationCodeQualifier_03 = "9";
            n1Loop1.N1.IdentificationCode_04 = "123456";

            //  End N1 Loop
            result.N1Loop.Add(n1Loop1);

            //  Begin N2 Loop
            var n1Loop2 = new Loop_N1_945();

            //  Name
            n1Loop2.N1 = new N1();
            n1Loop2.N1.EntityIdentifierCode_01 = "DE";
            n1Loop2.N1.Name_02 = "Depositor Name";
            n1Loop2.N1.IdentificationCodeQualifier_03 = "9";
            n1Loop2.N1.IdentificationCode_04 = "0123456789000";

            //  End N1 Loop
            result.N1Loop.Add(n1Loop2);

            //  Repeating N9
            result.N9 = new List();

            //  Reference Identification 1
            //  SN = Reference Number Qualifier
            //  Seal Number = actual id number
            var n91 = new N9();
            n91.ReferenceIdentificationQualifier_01 = "SN";
            n91.ReferenceIdentification_02 = "Seal Number";
            result.N9.Add(n91);

            //  Reference Identification 2
            var n92 = new N9();
            n92.ReferenceIdentificationQualifier_01 = "ZZ";
            n92.ReferenceIdentification_02 = "Temperature Recording Device Number";
            result.N9.Add(n92);

            //  Carrier detail
            result.W27 = new W27();
            result.W27.TransportationMethodTypeCode_01 = "H";
            result.W27.StandardCarrierAlphaCode_02 = "TRUK";
            result.W27.Routing_03 = "TRUCKING";
            result.W27.ShipmentMethodofPayment_04 = "CC";
            result.W27.EquipmentNumber_07 = "Equipment ID";

            //  Details
            result.LXLoop = new List();

            //  Begin LX Loop 1
            var lxLoop1 = new Loop_LX_945();

            //  Line number 1
            lxLoop1.LX = new LX();
            lxLoop1.LX.AssignedNumber_01 = "1";

            //  Repeating W12 Loops
            lxLoop1.W12Loop = new List();

            //  Begin W12 Loop
            var w12Loop1 = new Loop_W12_945();

            //  Item detail
            w12Loop1.W12 = new W12();
            w12Loop1.W12.ShipmentOrderStatusCode_01 = "CC";
            w12Loop1.W12.QuantityOrdered_02 = "72";
            w12Loop1.W12.NumberofUnitsShipped_03 = "72";
            w12Loop1.W12.UnitorBasisforMeasurementCode_05 = "CA";
            w12Loop1.W12.UPCCaseCode_06 = "007117901645";
            w12Loop1.W12.ProductServiceIDQualifier_07 = "UK";
            w12Loop1.W12.ProductServiceID_08 = "10071179016458";
            w12Loop1.W12.WarehouseLotNumber_09 = "40550";
            w12Loop1.W12.Weight_10 = "799";
            w12Loop1.W12.WeightQualifier_11 = "G";
            w12Loop1.W12.WeightUnitCode_12 = "L";

            //  Repeating G69
            w12Loop1.G69 = new List();

            //  Line item 1 detail description
            var g691 = new G69();
            g691.FreeformDescription_01 = "Some description";
            w12Loop1.G69.Add(g691);

            //  Repeating N9
            w12Loop1.N9 = new List();

            //  Reference Identification 1
            var n93 = new N9();
            n93.ReferenceIdentificationQualifier_01 = "LI";
            n93.ReferenceIdentification_02 = "1000";
            w12Loop1.N9.Add(n93);

            //  Reference Identification 2
            var n94 = new N9();
            n94.ReferenceIdentificationQualifier_01 = "PC";
            n94.ReferenceIdentification_02 = "989JAN281301";
            w12Loop1.N9.Add(n94);

            //  Reference Identification 3
            var n95 = new N9();
            n95.ReferenceIdentificationQualifier_01 = "LV";
            n95.ReferenceIdentification_02 = "00100752782101847618";
            n95.FreeformDescription_03 = "36";
            w12Loop1.N9.Add(n95);

            //  Reference Identification 4
            var n96 = new N9();
            n96.ReferenceIdentificationQualifier_01 = "LV";
            n96.ReferenceIdentification_02 = "00100752782101847619";
            n96.FreeformDescription_03 = "36";
            w12Loop1.N9.Add(n96);

            //  End W12 Loop
            lxLoop1.W12Loop.Add(w12Loop1);

            //  End LX Loop 1
            result.LXLoop.Add(lxLoop1);

            //  Begin LX Loop 2
            var lxLoop2 = new Loop_LX_945();

            //  Line number 1
            lxLoop2.LX = new LX();
            lxLoop2.LX.AssignedNumber_01 = "2";

            //  Repeating W12 Loops
            lxLoop2.W12Loop = new List();

            //  Begin W12 Loop
            var w12Loop2 = new Loop_W12_945();

            //  Item detail
            w12Loop2.W12 = new W12();
            w12Loop2.W12.ShipmentOrderStatusCode_01 = "CC";
            w12Loop2.W12.QuantityOrdered_02 = "72";
            w12Loop2.W12.NumberofUnitsShipped_03 = "72";
            w12Loop2.W12.UnitorBasisforMeasurementCode_05 = "CA";
            w12Loop2.W12.UPCCaseCode_06 = "007117901645";
            w12Loop2.W12.ProductServiceIDQualifier_07 = "UK";
            w12Loop2.W12.ProductServiceID_08 = "10071179016458";
            w12Loop2.W12.WarehouseLotNumber_09 = "40551";
            w12Loop2.W12.Weight_10 = "884";
            w12Loop2.W12.WeightQualifier_11 = "G";
            w12Loop2.W12.WeightUnitCode_12 = "L";

            //  Repeating G69
            w12Loop2.G69 = new List();

            //  Line item 1 detail description
            var g697 = new G69();
            g697.FreeformDescription_01 = "Some description";
            w12Loop2.G69.Add(g697);

            //  Repeating N9
            w12Loop2.N9 = new List();

            //  Reference Identification 1
            var n98 = new N9();
            n98.ReferenceIdentificationQualifier_01 = "LI";
            n98.ReferenceIdentification_02 = "1000";
            w12Loop2.N9.Add(n98);

            //  Reference Identification 2
            var n99 = new N9();
            n99.ReferenceIdentificationQualifier_01 = "PC";
            n99.ReferenceIdentification_02 = "989JAN291301";
            w12Loop2.N9.Add(n99);

            //  Reference Identification 3
            var n910 = new N9();
            n910.ReferenceIdentificationQualifier_01 = "LV";
            n910.ReferenceIdentification_02 = "00100752782101847620";
            n910.FreeformDescription_03 = "72";
            w12Loop2.N9.Add(n910);

            //  End W12 Loop
            lxLoop2.W12Loop.Add(w12Loop2);

            //  End LX Loop 2
            result.LXLoop.Add(lxLoop2);

            //  Total shipment information
            result.W03 = new W03();
            result.W03.NumberofUnitsShipped_01 = "240"; //   Number of Units Shipped
            result.W03.Weight_02 = "15360"; //   Total Weight
            result.W03.UnitorBasisforMeasurementCode_03 = "LB"; //  Weight Unit of Measure

            return result;
        }
    }
}

More operations in ediFabric .NET

945 questions

What is the difference between the 940 and the 945?

The 940 is the depositor's instruction to ship an order. The 945 is the warehouse's confirmation of what was actually shipped.

How are short shipments reported?

W12 carries the quantity ordered, the quantity shipped and the difference for each item.

How does the 945 relate to the 856?

The 945 goes to the owner of the goods. The 856 goes to the customer receiving them, and is often generated from the same data.

How do I parse and generate X12 945 files in .NET, Python, Java and C?

In .NET, install EdiFabric and EdiFabric.Templates.X12, read the file with X12Reader into TS945 objects and write them back with X12Writer. From Python, Java or C, use ediFabric Native, which converts 945 files to JSON and JSON back to X12 inside your process. From any other language, post the file to the ediFabric Cloud REST API.

Resources

Parse your first X12 945 in five minutes

The Community plan is free forever and needs no credit card. It includes ediFabric .NET, Native and Cloud with one serial key.

Sign up free Validate EDI files free