# EDI X12 850 Purchase Order Skeleton Generator

> Source: https://netray.co/tools/edi-x12-850-purchase-order-skeleton-generator
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: Free Tools

## Short answer

Fill in the partner IDs, PO number and one line item to generate a valid-looking X12 850 test message in 005010 format.

## Category

developer

## Audience

- EDI analyst
- Buyer
- ERP integration developer

## Tool

**Kind:** template

**Output:** code

**Language:** edi

**Fields:**

#### Sender ID (15 characters, space padded)

**Key:** sender

**Type:** text

**Default:** ACMEBUYER      

#### Receiver ID (15 characters, space padded)

**Key:** receiver

**Type:** text

**Default:** SUPPLIERONE    

#### GS sender code

**Key:** gs_sender

**Type:** text

**Default:** ACMEBUYER

#### GS receiver code

**Key:** gs_receiver

**Type:** text

**Default:** SUPPLIERONE

#### Date (YYMMDD)

**Key:** yymmdd

**Type:** text

**Default:** 261020

#### Date (CCYYMMDD)

**Key:** ccyymmdd

**Type:** text

**Default:** 20261020

#### Time (HHMM)

**Key:** hhmm

**Type:** text

**Default:** 0930

#### Interchange control number (9 digits)

**Key:** ctrl

**Type:** text

**Default:** 000000101

#### Purchase order number

**Key:** po

**Type:** text

**Default:** PO-450021

#### Usage indicator

**Key:** usage

**Type:** select

**Options:**

- T
- P

**Default:** T

#### Quantity ordered

**Key:** qty

**Type:** number

**Default:** 500

#### Unit of measure code

**Key:** uom

**Type:** select

**Options:**

- EA
- KG
- FT
- LB

**Default:** EA

#### Unit price

**Key:** price

**Type:** text

**Default:** 4.15

#### Buyer part number

**Key:** buyer_pn

**Type:** text

**Default:** PN-48213

#### Vendor part number

**Key:** vendor_pn

**Type:** text

**Default:** V-77120

#### Requested delivery date (CCYYMMDD)

**Key:** delivery

**Type:** text

**Default:** 20261120

**Blocks:**

#### X12 850 (version 005010)

**Body:** ISA*00*          *00*          *ZZ*{{sender}}*ZZ*{{receiver}}*{{yymmdd}}*{{hhmm}}*U*00501*{{ctrl}}*0*{{usage}}*>~
GS*PO*{{gs_sender}}*{{gs_receiver}}*{{ccyymmdd}}*{{hhmm}}*101*X*005010~
ST*850*0001~
BEG*00*SA*{{po}}**{{ccyymmdd}}~
CUR*BY*USD~
DTM*002*{{delivery}}~
PO1*1*{{qty}}*{{uom}}*{{price}}**BP*{{buyer_pn}}*VP*{{vendor_pn}}~
PID*F****Machined housing, anodized~
SCH*{{qty}}*{{uom}}***002*{{delivery}}~
CTT*1*{{qty}}~
SE*9*0001~
GE*1*101~
IEA*1*{{ctrl}}~

**Notes:** This is a test skeleton for one line item, not a full trading partner implementation. Segment order, required elements and qualifiers vary by trading partner implementation guide, so confirm the guide before sending. The ISA fields are fixed width: sender and receiver IDs must be exactly 15 characters, and the control number 9 digits. Never send test data with a production usage indicator.

## Content

**Intro:** The EDI 850 is the X12 transaction set for a purchase order. This generator produces a compact single-line example you can use to test a connection with a supplier or to learn how the segments fit together.

**Sections:**

#### How to use the generator

**Body:** Enter the sender and receiver IDs exactly as agreed with your trading partner, padded to 15 characters, then set the date, control number and PO number. Fill in one line item with quantity, unit of measure, price and part numbers. Copy the output into a text file and run it through your EDI translator or VAN test tool. Keep the usage indicator on T for test until both sides have validated the message, then switch to P for production.

**Bullets:**

- Pad ISA sender and receiver to 15 characters
- Keep usage indicator T while testing
- Match qualifiers to the partner implementation guide
- Increment control numbers per interchange

#### Segment by segment

**Body:** ISA and IEA wrap the interchange and GS and GE wrap the functional group. ST and SE wrap the 850 transaction set, and SE01 holds the number of segments from ST to SE inclusive, which is 9 in this skeleton. BEG gives the purpose code, the type of order (SA is stand-alone order), the PO number and the date. PO1 holds the line number, quantity, unit of measure, price and part number qualifiers such as BP for buyer part and VP for vendor part. SCH gives a delivery schedule and CTT counts line items.

#### Adding more lines

**Body:** To add lines, repeat the PO1, PID and SCH loop for each item, increment the line number in PO1, and update CTT01 with the number of lines. Then recount the segments between ST and SE and put the new total in SE01. A wrong SE01 count is the most common reason a translator rejects a hand-built file. Add N1 loops for ship-to and bill-to parties if your partner requires them, because this skeleton leaves them out.

#### Common mistakes

**Body:** Frequent errors include wrong ISA padding, a segment count in SE that does not match, a date format mismatch between YYMMDD in ISA and CCYYMMDD in GS and BEG, reuse of an interchange control number, and sending a test interchange with a production flag. Another trap is assuming every partner accepts the same qualifiers. Always request the partner's 850 guide and validate against it.

**Bullets:**

- Recount SE01 after any change
- ISA date is 6 digits, GS and BEG dates are 8
- Do not reuse control numbers
- Validate against the partner guide

**Cta:** If your ERP creates POs but your EDI mapping is slow to change, we can help build and test mappings and a read-only monitor that shows which POs were acknowledged.

**Faq:**

#### What does the 850 transaction set do?

**Answer:** The 850 is the X12 purchase order. A buyer sends it to a supplier to order goods or services. The supplier normally replies with an 855 purchase order acknowledgement, and later an 856 advance ship notice and an 810 invoice.

#### What does SE01 count?

**Answer:** SE01 is the total number of segments in the transaction set, counting the ST segment and the SE segment. If you add or remove a segment between them, update this number or the receiving translator will reject the set.

#### Why are the ISA IDs padded to 15 characters?

**Answer:** ISA is a fixed-width segment. The sender and receiver ID elements must be exactly 15 characters, so shorter IDs are padded with trailing spaces. A wrong length breaks the interchange and most translators reject it before reading the content.

#### Is this suitable for production use?

**Answer:** No. It is a teaching and testing skeleton. A production 850 needs partner-specific segments, qualifiers, addresses, terms and often multiple lines. Use your EDI translator and the trading partner guide to build the real mapping.

## Search terms

EDI 850 example, X12 850 purchase order sample, EDI 850 segments, 850 purchase order generator, EDI 850 PO1 segment, EDI test file purchase order, ISA GS BEG segment example, EDI 850 format

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
