X12 832 Price/Sales Catalog Last updated: 2026-09-29
The 832 is the X12 price/sales catalog. Suppliers use it to send item data and prices to customers, either as a full catalog or as updates.
BCT identifies the catalog, each LIN loop is an item with its product identifiers, followed by PID descriptions, CTP pricing, measurements and packaging.
At a glance
- Standard
- X12
- Version
004010- Functional group
SC(GS01)- Sent by
- Supplier or manufacturer to customer
- Responses
- 997
- ediFabric .NET template
TS832inEdiFabric.Templates.X12- OpenEDI definition
- View 832 in the spec library
832 structure
The full X12 832 layout from its OpenEDI definition, the same model ediFabric uses to parse, validate and generate it: 14 loops and 108 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 |
|---|---|---|---|
ST | Transaction Set Header | Mandatory | 1 |
BCT | Beginning Segment for Price/Sales Catalog | Mandatory | 1 |
CTP | Pricing Information | Optional | 100 |
REF | Reference Identification | Optional | >1 |
YNQ | Yes/No Question | Optional | 10 |
PER | Administrative Communications Contact | Optional | >1 |
DTM | Date/Time Reference | Optional | 10 |
CTB | Restrictions/Conditions | Optional | 25 |
CUR | Currency | Optional | 5 |
ITD | Terms of Sale/Deferred Terms of Sale | Optional | 2 |
LDT | Lead Time | Optional | >1 |
SAC | Service, Promotion, Allowance, or Charge Information | Optional | >1 |
TD1 | Carrier Details (Quantity and Weight) | Optional | >1 |
TD5 | Carrier Details (Routing Sequence/Transit Time) | Optional | >1 |
TD3 | Carrier Details (Equipment) | Optional | >1 |
TD4 | Carrier Details (Special Handling, or Hazardous Materials, or Both) | Optional | >1 |
FOB | F.O.B. Related Instructions | Optional | 1 |
PKG | Marking, Packaging, Loading | Optional | >1 |
G93 | Price Bracket Identifier, Quantity, Unitor Basisfor Measurement Code | Optional | 50 |
TXI | Tax Information | Optional | >1 |
AAA | Request Validation | Optional | 1 |
| N1 loop | Name | Optional | >1 |
N1 | Name | Mandatory | 1 |
N2 | Additional Name Information | Optional | 2 |
N3 | Address Information | Optional | 2 |
N4 | Geographic Location | Optional | >1 |
REF | Reference Identification | Optional | 12 |
PKG | Marking, Packaging, Loading | Optional | >1 |
PER | Administrative Communications Contact | Optional | >1 |
DTM | Date/Time Reference | Optional | 10 |
| LM loop | Code Source Information | Optional | >1 |
LM | Code Source Information | Mandatory | 1 |
LQ | Industry Code | Mandatory | >1 |
| N9 loop | Reference Identification | Optional | >1 |
N9 | Reference Identification | Mandatory | 1 |
DTM | Date/Time Reference | Optional | >1 |
| LIN loop | Item Identification | Optional | >1 |
LIN | Item Identification | Mandatory | 1 |
PO1 | Baseline Item Data | Optional | 1 |
G53 | Maintenance Type | Optional | 1 |
SI | Service Characteristic Identification | Optional | >1 |
DTM | Date/Time Reference | Optional | 10 |
REF | Reference Identification | Optional | >1 |
YNQ | Yes/No Question | Optional | 10 |
PER | Administrative Communications Contact | Optional | >1 |
CRD | Country Code, Amount Qualifier Code, Monetary Amount | Optional | >1 |
CTB | Restrictions/Conditions | Optional | 25 |
PID | Product/Item Description | Optional | 200 |
MEA | Measurements | Optional | 40 |
PKG | Marking, Packaging, Loading | Optional | 25 |
PO4 | Item Physical Details | Optional | 1 |
TD1 | Carrier Details (Quantity and Weight) | Optional | >1 |
TD5 | Carrier Details (Routing Sequence/Transit Time) | Optional | >1 |
TD3 | Carrier Details (Equipment) | Optional | >1 |
TD4 | Carrier Details (Special Handling, or Hazardous Materials, or Both) | Optional | >1 |
ITD | Terms of Sale/Deferred Terms of Sale | Optional | 2 |
LDT | Lead Time | Optional | 1 |
SAC | Service, Promotion, Allowance, or Charge Information | Optional | >1 |
FOB | F.O.B. Related Instructions | Optional | 1 |
AAA | Request Validation | Optional | 1 |
TC2 | Commodity | Optional | 2 |
TXI | Tax Information | Optional | >1 |
G55 | Item Characteristics - Consumer Unit | Optional | 1 |
G54 | Quantity, Unitor Basisfor Measurement Code, UPC Case Code | Optional | 1 |
| CTP loop | Pricing Information | Optional | 100 |
CTP | Pricing Information | Mandatory | 1 |
G40 | Price Bracket Identifier, Item List Cost New, Item List Cost Old | Optional | 99 |
DTM | Date/Time Reference | Optional | 10 |
G36 | Price List Number, Price List Issue Number, Date | Optional | 1 |
LDT | Lead Time | Optional | 1 |
CUR | Currency | Optional | 5 |
PO4 | Item Physical Details | Optional | 1 |
CTB | Restrictions/Conditions | Optional | 5 |
REF | Reference Identification | Optional | >1 |
G43 | Market Area Code Qualifier, Market Area Code Identifier, Description | Optional | 9999 |
SAC | Service, Promotion, Allowance, or Charge Information | Optional | >1 |
G26 | Price Condition Code, Date Qualifier, Date | Optional | 99 |
| N1 loop | Name | Optional | >1 |
N1 | Name | Mandatory | 1 |
N2 | Additional Name Information | Optional | 2 |
N3 | Address Information | Optional | 2 |
N4 | Geographic Location | Optional | 1 |
REF | Reference Identification | Optional | 12 |
PER | Administrative Communications Contact | Optional | >1 |
DTM | Date/Time Reference | Optional | 10 |
PKG | Marking, Packaging, Loading | Optional | >1 |
| G39 loop | Item Characteristics - Vendor's Selling Unit | Optional | >1 |
G39 | Item Characteristics - Vendor's Selling Unit | Mandatory | 1 |
CTP | Pricing Information | Optional | 1 |
| PKL loop | Product Service ID Qualifier, Product Service ID, Unitor Basisfor Measurement Code | Optional | 20 |
PKL | Product Service ID Qualifier, Product Service ID, Unitor Basisfor Measurement Code | Mandatory | 1 |
CTP | Pricing Information | Optional | 1 |
PKG | Marking, Packaging, Loading | Optional | 2 |
| LFG loop | Description, Hazardous Classification, UNNA Identification Code | Optional | 1 |
LFG | Description, Hazardous Classification, UNNA Identification Code | Mandatory | 1 |
| CRC loop | Conditions Indicator | Optional | >1 |
CRC | Conditions Indicator | Mandatory | 1 |
QTY | Quantity | Optional | 1 |
| LM loop | Code Source Information | Optional | >1 |
LM | Code Source Information | Mandatory | 1 |
LQ | Industry Code | Mandatory | >1 |
| SLN loop | Subline Item Detail | Optional | >1 |
SLN | Subline Item Detail | Mandatory | 1 |
SI | Service Characteristic Identification | Optional | >1 |
PID | Product/Item Description | Optional | >1 |
DTM | Date/Time Reference | Optional | >1 |
CTP | Pricing Information | Optional | >1 |
PAM | Period Amount | Optional | >1 |
PO4 | Item Physical Details | Optional | >1 |
PKG | Marking, Packaging, Loading | Optional | >1 |
QTY | Quantity | Optional | >1 |
MEA | Measurements | Optional | >1 |
SAC | Service, Promotion, Allowance, or Charge Information | Optional | >1 |
MTX | Text | Optional | >1 |
| LM loop | Code Source Information | Optional | >1 |
LM | Code Source Information | Mandatory | 1 |
LQ | Industry Code | Mandatory | >1 |
| N9 loop | Reference Identification | Optional | >1 |
N9 | Reference Identification | Mandatory | 1 |
DTM | Date/Time Reference | Optional | >1 |
CTT | Transaction Totals | Optional | 1 |
SE | Transaction Set Trailer | Mandatory | 1 |
Sample 832 file
A catalog item with product identifiers, description and dates. 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*832*2001~ BCT*RC*BISG*980112*******00~ LIN*1*IB*0940016699*B7*Book Industry Study Group~ DTM*043*971230***19~ PID*S**BI*EN*4~ PID*S**BI*FBP*RB~ PID*S**BI*ED*REV~ PID*S**BI*SA*ACT~ PID*S**BI*E01*Ted Berg~ PID*S**BI*TI*Implementation Guidelines for Electronic Data Interchange~ PID*S**BI*ST*Based on ANSI X12 Version 3.6~ PID*S**BI*SU*COM020010~ CTP*RS*SLP*100.00*1*UN~ CUR*SE*USD~ N1*AG*Book Industry Study Group*15*216793X*17*Q3~ CTT*1~ SE*17*2001~ GE*2*000000001~ IEA*1*000000263~
The same 832 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": "832",
"TransactionSetControlNumber_02": "2001"
},
"BCT": {
"CatalogPurposeCode_01": "RC",
"CatalogNumber_02": "BISG",
"CatalogVersionNumber_03": "980112",
"TransactionSetPurposeCode_10": "00"
},
"LINLoop": [
{
"LIN": {
"AssignedIdentification_01": "1",
"ProductServiceIDQualifier_02": "IB",
"ProductServiceID_03": "0940016699",
"ProductServiceIDQualifier_04": "B7",
"ProductServiceID_05": "Book Industry Study Group"
},
"DTM": [
{
"DateTimeQualifier_01": "043",
"Date_02": "971230",
"DateTimePeriodFormatQualifier_05": "19"
}
],
"PID": [
{
"ItemDescriptionType_01": "S",
"AgencyQualifierCode_03": "BI",
"ProductDescriptionCode_04": "EN",
"Description_05": "4"
},
{
"ItemDescriptionType_01": "S",
"AgencyQualifierCode_03": "BI",
"ProductDescriptionCode_04": "FBP",
"Description_05": "RB"
},
{
"ItemDescriptionType_01": "S",
"AgencyQualifierCode_03": "BI",
"ProductDescriptionCode_04": "ED",
"Description_05": "REV"
},
{
"ItemDescriptionType_01": "S",
"AgencyQualifierCode_03": "BI",
"ProductDescriptionCode_04": "SA",
"Description_05": "ACT"
},
{
"ItemDescriptionType_01": "S",
"AgencyQualifierCode_03": "BI",
"ProductDescriptionCode_04": "E01",
"Description_05": "Ted Berg"
},
{
"ItemDescriptionType_01": "S",
"AgencyQualifierCode_03": "BI",
"ProductDescriptionCode_04": "TI",
"Description_05": "Implementation Guidelines for Electronic Data Interchange"
},
{
"ItemDescriptionType_01": "S",
"AgencyQualifierCode_03": "BI",
"ProductDescriptionCode_04": "ST",
"Description_05": "Based on ANSI X12 Version 3.6"
},
{
"ItemDescriptionType_01": "S",
"AgencyQualifierCode_03": "BI",
"ProductDescriptionCode_04": "SU",
"Description_05": "COM020010"
}
],
"CTPLoop": [
{
"CTP": {
"ClassofTradeCode_01": "RS",
"PriceIdentifierCode_02": "SLP",
"UnitPrice_03": "100.00",
"Quantity_04": "1",
"CompositeUnitofMeasure_05": {
"UnitorBasisforMeasurementCode_01": "UN"
}
},
"CUR": [
{
"EntityIdentifierCode_01": "SE",
"CurrencyCode_02": "USD"
}
]
}
],
"N1Loop": [
{
"N1": {
"EntityIdentifierCode_01": "AG",
"Name_02": "Book Industry Study Group",
"IdentificationCodeQualifier_03": "15",
"IdentificationCode_04": "216793X",
"EntityRelationshipCode_05": "17",
"EntityIdentifierCode_06": "Q3"
}
}
]
}
],
"CTT": {
"NumberofLineItems_01": "1"
},
"SE": {
"NumberofIncludedSegments_01": "17",
"TransactionSetControlNumber_02": "2001"
}
}Parse and validate an 832 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\PriceCatalog.txt")) using (var reader = new X12Reader(stream, "EdiFabric.Templates.X12")) { var items = await reader.ReadToEndAsync(); foreach (var transaction in items.OfType<TS832>()) { 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("PriceCatalog.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("PriceCatalog.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("PriceCatalog.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 '@PriceCatalog.txt'
Generate an 832 file
Populate a TS832 object in .NET, or pass JSON in the shape shown above to ediFabric Native or ediFabric Cloud, and get a valid 832 file back.
using EdiFabric.Templates.X12004010; License.SetSerial("YOUR_SERIAL_KEY"); var transaction = new TS832(); // Transaction Type is 832 // Control number is 2001 transaction.ST = new ST(); transaction.ST.TransactionSetIdentifierCode_01 = "832"; transaction.ST.TransactionSetControlNumber_02 = "0001"; // This is a Resale catalog // The catalog name is BISG // The revision is 1 / 12 / 98 // This is the original file transaction.BCT = new BCT(); transaction.BCT.CatalogPurposeCode_01 = "RC"; transaction.BCT.CatalogNumber_02 = "BISG"; transaction.BCT.CatalogVersionNumber_03 = "980112"; transaction.BCT.TransactionSetPurposeCode_10 = "00"; // Repeating LIN Loops transaction.LINLoop = new List<Loop_LIN_832>(); // Begin LIN Loop var linLoop1 = new Loop_LIN_832(); // ... 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("PriceCatalog.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("PriceCatalog.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("PriceCatalog.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 '@PriceCatalog.json' \ -o 'PriceCatalog.txt'
Complete ediFabric .NET example
A complete C# program for the X12 832, built on TS832 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.T832
{
class Program
{
static void Main(string[] args)
{
SerialKey.Set(Common.SerialKey.Get());
Read();
Write();
}
///
/// Read Price Catalog
///
static void Read()
{
var ediStream = File.OpenRead(Directory.GetCurrentDirectory() + @"\..\..\..\Files\X12\PriceCatalog.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 Price Catalog
///
static void Write()
{
var transaction = BuildPriceCatalog("2001");
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 Price Catalog.
/// Original from http://www.bergware.net/bisacwww/832_3060.htm
///
static TS832 BuildPriceCatalog(string controlNumber)
{
var result = new TS832();
// Transaction Type is 832
// Control number is 2001
result.ST = new ST();
result.ST.TransactionSetIdentifierCode_01 = "832";
result.ST.TransactionSetControlNumber_02 = controlNumber.PadLeft(9, '0');
// This is a Resale catalog
// The catalog name is BISG
// The revision is 1 / 12 / 98
// This is the original file
result.BCT = new BCT();
result.BCT.CatalogPurposeCode_01 = "RC";
result.BCT.CatalogNumber_02 = "BISG";
result.BCT.CatalogVersionNumber_03 = "980112";
result.BCT.TransactionSetPurposeCode_10 = "00";
// Repeating LIN Loops
result.LINLoop = new List();
// Begin LIN Loop
var linLoop1 = new Loop_LIN_832();
// The first book in the catalog
// ISBN 0940016699
// Publisher code is Book Industry Study Group
linLoop1.LIN = new LIN();
linLoop1.LIN.AssignedIdentification_01 = "1";
linLoop1.LIN.ProductServiceIDQualifier_02 = "IB";
linLoop1.LIN.ProductServiceID_03 = "0940016699";
linLoop1.LIN.ProductServiceIDQualifier_04 = "B7";
linLoop1.LIN.ProductServiceID_05 = "Book Industry Study Group";
// Repeating DTM Loops
linLoop1.DTM = new List();
// Publication date is 12 / 30 / 97
// Century designation of 19
var dtm1 = new DTM();
dtm1.DateTimeQualifier_01 = "043";
dtm1.Date_02 = "971230";
dtm1.DateTimePeriodFormatQualifier_05 = "19";
linLoop1.DTM.Add(dtm1);
// Repeating PID Loops
linLoop1.PID = new List();
// Structured code description
// BISAC code list
// Edition # 4
var pid1 = new PID();
pid1.ItemDescriptionType_01 = "S";
pid1.AgencyQualifierCode_03 = "BI";
pid1.ProductDescriptionCode_04 = "EN";
pid1.Description_05 = "4";
linLoop1.PID.Add(pid1);
// Structured code description
// BISAC code list
// Binding Code
// Ringbound
var pid2 = new PID();
pid2.ItemDescriptionType_01 = "S";
pid2.AgencyQualifierCode_03 = "BI";
pid2.ProductDescriptionCode_04 = "FBP";
pid2.Description_05 = "RB";
linLoop1.PID.Add(pid2);
// Structured code description
// BISAC code list
// Edition description
// Revised
var pid3 = new PID();
pid3.ItemDescriptionType_01 = "S";
pid3.AgencyQualifierCode_03 = "BI";
pid3.ProductDescriptionCode_04 = "ED";
pid3.Description_05 = "REV";
linLoop1.PID.Add(pid3);
// Structured code description
// BISAC code list
// Status code
// Active
var pid4 = new PID();
pid4.ItemDescriptionType_01 = "S";
pid4.AgencyQualifierCode_03 = "BI";
pid4.ProductDescriptionCode_04 = "SA";
pid4.Description_05 = "ACT";
linLoop1.PID.Add(pid4);
// Structured code description
// BISAC code list
// Author / Contributor function
// Editor was Ted Berg
var pid5 = new PID();
pid5.ItemDescriptionType_01 = "S";
pid5.AgencyQualifierCode_03 = "BI";
pid5.ProductDescriptionCode_04 = "E01";
pid5.Description_05 = "Ted Berg";
linLoop1.PID.Add(pid5);
// Structured code description
// BISAC code list
// Title line 1
// Implementation Guidelines...
var pid6 = new PID();
pid6.ItemDescriptionType_01 = "S";
pid6.AgencyQualifierCode_03 = "BI";
pid6.ProductDescriptionCode_04 = "TI";
pid6.Description_05 = "Implementation Guidelines for Electronic Data Interchange";
linLoop1.PID.Add(pid6);
// Structured code description
// BISAC code list
// Sub - title line 1
// Based on ANSI X12...
var pid7 = new PID();
pid7.ItemDescriptionType_01 = "S";
pid7.AgencyQualifierCode_03 = "BI";
pid7.ProductDescriptionCode_04 = "ST";
pid7.Description_05 = "Based on ANSI X12 Version 3.6";
linLoop1.PID.Add(pid7);
// Structured code description
// BISAC code list
// Subject code
// COM020010
var pid8 = new PID();
pid8.ItemDescriptionType_01 = "S";
pid8.AgencyQualifierCode_03 = "BI";
pid8.ProductDescriptionCode_04 = "SU";
pid8.Description_05 = "COM020010";
linLoop1.PID.Add(pid8);
// Repeating CTP LIN Loops
linLoop1.CTPLoop = new List();
// Begin CTP LIN Loop
var ctpLoop1 = new Loop_CTP_832();
// Class of trade is RESALE
// The Suggested list price is
// $100.00
// Quantity is 1
// Unit
ctpLoop1.CTP = new CTP();
ctpLoop1.CTP.ClassofTradeCode_01 = "RS";
ctpLoop1.CTP.PriceIdentifierCode_02 = "SLP";
ctpLoop1.CTP.UnitPrice_03 = "100.00";
ctpLoop1.CTP.Quantity_04 = "1";
ctpLoop1.CTP.CompositeUnitofMeasure_05 = new C001();
ctpLoop1.CTP.CompositeUnitofMeasure_05.UnitorBasisforMeasurementCode_01 = "UN";
// Repeating CUR
ctpLoop1.CUR = new List();
// The selling party currency is
// US Dollars
var cur1 = new CUR();
cur1.EntityIdentifierCode_01 = "SE";
cur1.CurrencyCode_02 = "USD";
ctpLoop1.CUR.Add(cur1);
// End CTP LIN Loop
linLoop1.CTPLoop.Add(ctpLoop1);
// Repeating N1 LIN Loops
linLoop1.N1Loop = new List();
// Begin N1 LIN Loop
var n1Loop1 = new Loop_N1_832_2();
// The agent is
// Book Industry Study Group
// SAN is
// 216793X
// Product line is
// Retail sales
n1Loop1.N1 = new N1();
n1Loop1.N1.EntityIdentifierCode_01 = "AG";
n1Loop1.N1.Name_02 = "Book Industry Study Group";
n1Loop1.N1.IdentificationCodeQualifier_03 = "15";
n1Loop1.N1.IdentificationCode_04 = "216793X";
n1Loop1.N1.EntityRelationshipCode_05 = "17";
n1Loop1.N1.EntityIdentifierCode_06 = "Q3";
// End N1 LIN Loop
linLoop1.N1Loop.Add(n1Loop1);
// End LIN Loop
result.LINLoop.Add(linLoop1);
// 1 title
result.CTT = new CTT();
result.CTT.NumberofLineItems_01 = "1";
return result;
}
}
}More operations in ediFabric .NET
832 questions
Is an 832 a full catalog or a change?
Either. BCT and the maintenance codes on each item say whether the file is a complete catalog or adds, changes and deletes items.
Where are the prices in an 832?
In CTP segments within each LIN loop, with the price qualifier, unit price and quantity breaks.
What is the EDIFACT equivalent of the 832?
PRICAT, the price/sales catalogue message.
How do I parse and generate X12 832 files in .NET, Python, Java and C?
In .NET, install EdiFabric and EdiFabric.Templates.X12, read the file with X12Reader into TS832 objects and write them back with X12Writer. From Python, Java or C, use ediFabric Native, which converts 832 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 832 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