**These specifications are a base model. All customers are responsible for ensuring their map or EDI is compliant with their trading partner's most current specifications.
X12 850 Purchase Orders for Direct Store Delivery (DSD)
Revised February 23, 2024
This Draft Standard for Trial Use contains the format and establishes the data contents of the Purchase Order Transaction Set (850) for use within the context of an Electronic Data Interchange (EDI) environment. The transaction set can be used to provide for customary and established business and industry practice relative to the placement of purchase orders for goods and services. This transaction set should not be used to convey purchase order changes or purchase order acknowledgment information.
Delimiters
~ Segment
* Element
> Component
EDI samples
None included
Interchange Control Header
RequiredMax use 1
To start and identify an interchange of zero or more functional groups and interchange-related control segments
Example
ISA*00* *00* *XX*XXXXXXXXXXXXXXX*XX*XXXXXXXXXXXXXXX*240806*1213*U*00401*000000000*X*X*>~
Authorization Information Qualifier
Required
Identifier (ID)
Code to identify the type of information in the Authorization Information
00
No Authorization Information Present (No Meaningful Information in I02)
Authorization Information
Required
String (AN)
Min 10Max 10
Information used for additional identification or authorization of the interchange sender or the data in the interchange; the type of information is set by the Authorization Information Qualifier (I01)
Security Information Qualifier
Required
Identifier (ID)
Code to identify the type of information in the Security Information
00
No Security Information Present (No Meaningful Information in I04)
Security Information
Required
String (AN)
Min 10Max 10
This is used for identifying the security information about the interchange sender or the data in the interchange; the type of information is set by the Security Information Qualifier (I03)
Interchange ID Qualifier
Required
Identifier (ID)
Min 2Max 2
Qualifier to designate the system/method of code structure used to designate the sender or receiver ID element being qualified
Codes
Interchange Sender ID
Required
String (AN)
Min 15Max 15
Identification code published by the sender for other parties to use as the receiver ID to route data to them; the sender always codes this value in the sender ID element
Interchange ID Qualifier
Required
Identifier (ID)
Min 2Max 2
Qualifier to designate the system/method of code structure used to designate the sender or receiver ID element being qualified
Codes
Interchange Receiver ID
Required
String (AN)
Min 15Max 15
Identification code published by the receiver of the data; When sending, it is used by the sender as their sending ID, thus other parties sending to them will use this as a receiving ID to route data to them
Interchange Date
Required
Date (DT)
YYMMDD format
Date of the interchange
Interchange Time
Required
Time (TM)
HHMM format
Time of the interchange
Interchange Control Standards Identifier
Required
Identifier (ID)
Code to identify the agency responsible for the control standard used by the message that is enclosed by the interchange header and trailer
U
U.S. EDI Community of ASC X12, TDCC, and UCS
Interchange Control Version Number
Required
Identifier (ID)
This version number covers the interchange control segments
00401
Draft Standards for Trial Use Approved for Publication by ASC X12 Procedures Review Board through October 1997
Interchange Control Number
Required
Numeric (N0)
Min 9Max 9
A control number assigned by the interchange sender
Acknowledgment Requested
Required
Identifier (ID)
Min 1Max 1
Code sent by the sender to request an interchange acknowledgment (TA1)
0
No Acknowledgment Requested
1
Interchange Acknowledgment Requested
Usage Indicator
Required
Identifier (ID)
Min 1Max 1
Code to indicate whether data enclosed by this interchange envelope is test, production or information
I
Information
P
Production Data
T
Test Data
Component Element Separator
Required
String (AN)
Min 1Max 1
Type is not applicable; the component element separator is a delimiter and not a data element; this field provides the delimiter used to separate component data elements within a composite data structure; this value must be different than the data element separator and the segment terminator
>
Component Element Separator
Functional Group Header
RequiredMax use 1
To indicate the beginning of a functional group and to provide control information
Example
GS*PO*XX*XXXXXX*20240806*0906*00000*X*004010~
Functional Identifier Code
Required
Identifier (ID)
Code identifying a group of application related transaction sets
PO
Purchase Order (850)
Application Sender's Code
Required
String (AN)
Min 2Max 15
Code identifying party sending transmission; codes agreed to by trading partners
Application Receiver's Code
Required
String (AN)
Min 2Max 15
Code identifying party receiving transmission. Codes agreed to by trading partners
Date
Required
Date (DT)
CCYYMMDD format
Date expressed as CCYYMMDD
Time
Required
Time (TM)
HHMM, HHMMSS, HHMMSSD, or HHMMSSDD format
Time expressed in 24-hour clock time as follows: HHMM, or HHMMSS, or HHMMSSD, or HHMMSSDD, where H = hours (00-23), M = minutes (00-59), S = integer seconds (00-59) and DD = decimal seconds; decimal seconds are expressed as follows: D = tenths (0-9) and DD = hundredths (00-99)
Group Control Number
Required
Numeric (N0)
Min 1Max 9
Assigned number originated and maintained by the sender
Responsible Agency Code
Required
Identifier (ID)
Min 1Max 2
Code used in conjunction with Data Element 480 to identify the issuer of the standard
T
Transportation Data Coordinating Committee (TDCC)
X
Accredited Standards Committee X12
Version / Release / Industry Identifier Code
Required
String (AN)
Code indicating the version, release, subrelease, and industry identifier of the EDI standard being used, including the GS and GE segments; if code in DE455 in GS segment is X, then in DE 480 positions 1-3 are the version number; positions 4-6 are the release and subrelease, level of the version; and positions 7-12 are the industry or trade association identifiers (optionally assigned by user); if code in DE455 in GS segment is T, then other formats are allowed
004010
Draft Standards Approved for Publication by ASC X12 Procedures Review Board through October 1997
Heading
010
Transaction Set Header
RequiredMax use 1
To indicate the start of a transaction set and to assign a control number
Example
ST*850*0001~
Transaction Set Identifier Code
Required
Identifier (ID)
Code uniquely identifying a Transaction Set
- The transaction set identifier (ST01) used by the translation routines of the interchange partners to select the appropriate transaction set definition (e.g., 810 selects the Invoice Transaction Set).
850
Purchase Order
Transaction Set Control Number
Required
Numeric (N)
Min 4Max 9
Identifying control number that must be unique within the transaction set functional group assigned by the originator for a transaction set
020
Beginning Segment for Purchase Order
RequiredMax use 1
To indicate the beginning of the Purchase Order Transaction Set and transmit identifying numbers and dates
Example
BEG*22*PR*9876123456**20230616~
Transaction Set Purpose Code
Required
Identifier (ID)
Code identifying purpose of transaction set
00
Original
22
Information Copy
This code will only be used for SAP-originated
"Informational Purchase Orders (IPO)." An IPO is a record generated in SAP for receiving activity not originated in the SAP environment via an actual Purchase Order.
Purchase Order Type Code
Required
Identifier (ID)
Code specifying the type of Purchase Order
IN
Information Copy
This code will only be used for SAP-originated
"Informational Purchase Orders (IPO)." An IPO is a record generated in SAP for receiving activity not originated in the SAP environment via an actual Purchase Order.
PR
Promotion
DSD Promotional Orders will only be sent by
Walgreens' future SAP environment. The Walgreens Legacy Central Direct Purchase Order will be replaced with this order type as locations are enabled for SAP
SA
Stand-alone Order
Purchase Order Number
Required
String (AN)
Min 1Max 22
Identifying number for Purchase Order assigned by the orderer/purchaser
Usage notes
Legacy Direct Store Delivery (DSD) Purchase Order numbers are 6 digits.
SAP-originated Purchase Order numbers are 10 digits.
Date
Required
Date (DT)
CCYYMMDD format
Date expressed as CCYYMMDD
- BEG05 is the date assigned by the purchaser to purchase order.
050
Reference Identification
RequiredMax use >1
To specify identifying information
Usage notes
The REF segment is used for transmission of the Walgreens Marketing Vendor number on all Purchase Order types.
Example
REF*VR*9876012345~
Reference Identification Qualifier
Required
Identifier (ID)
Code qualifying the Reference Identification
CT
Contract Number
This value will only to be used on CII orders.
D1
Drug Enforcement Administration Order Blank Number
This value will only to be used on CII orders
PD
Promotion/Deal Number
Reserved for future use. This option is not valid for most DSD suppliers
VR
Vendor ID Number
Reference Identification
Required
String (AN)
Min 1Max 30
Reference information as defined for a particular Transaction Set or as specified by the Reference Identification Qualifier
Usage notes
If REF01="PD," the Walgreens Promotional/Deal Number will be in this
element.
If REF01="VR," the 6 character SIMS Marketing Vendor or 10 character SAP Vendor Number will be in this element.
If REF01="D1," the DEA Order Form Number will be sent in this element.
130
Terms of Sale/Deferred Terms of Sale
OptionalMax use >1
To specify terms of sale
Usage notes
This segment used on all DC Purchase Orders, but will also be sent on SAP-originated orders (not available on Legacy orders).
Example
ITD*02*2*3**5**30*****DESCRIPTION~
Terms Type Code
Optional
Identifier (ID)
Code identifying type of payment terms
- If the code in ITD01 is "04", then ITD07 or ITD09 is required and either ITD10 or ITD11 is required; if the code in ITD01 is "05", then ITD06 or ITD07 is required.
01
Basic
02
End of Month (EOM)
05
Discount Not Applicable
12
10 Days After End of Month (10 EOM)
Terms Basis Date Code
Optional
Identifier (ID)
Code identifying the beginning of the terms period
1
Ship Date
2
Delivery Date
3
Invoice Date
15
Receipt of Goods
Terms Discount Percent
Optional
Decimal number (R)
Min 1Max 6
Terms discount percentage, expressed as a percent, available to the purchaser if an invoice is paid on or before the Terms Discount Due Date
Usage notes
Will accept 3 decimal positions.
Terms Discount Days Due
Optional
Numeric (N0)
Min 1Max 3
Number of days in the terms discount period by which payment is due if terms discount is earned
Terms Net Days
Optional
Numeric (N0)
Min 1Max 3
Number of days until total invoice amount is due (discount not applicable)
Description
Optional
String (AN)
Min 1Max 80
A free-form description to clarify the related data elements and their content
150
Date/Time Reference
RequiredMax use 4
To specify pertinent dates and times
Usage notes
DTM segment is used for all Purchase Order types.
Example
DTM*074*20230617~
Date/Time Qualifier
Required
Identifier (ID)
Code specifying type of date or time, or both date and time
002
Delivery Requested
May be used for promotional orders.
074
Requested for Delivery (Prior to and Including)
Used for all standard DSD orders.
Date
Required
Date (DT)
CCYYMMDD format
Date expressed as CCYYMMDD
N1 Loop Bill To and Ship To
OptionalMax 1
The N1 segment is sent for all Purchase Order types
Usage notes
This Billing N1 Segment is only mandatory for 340-B orders. All other Walgreens DSD Purchase Orders will not transmit this segment.
Variants (all may be used)
310
Name
RequiredMax use 1
To identify a party by type of organization, name, and code
Example
N1*BS*NAME*PI*008965063W001~
Entity Identifier Code
Required
Identifier (ID)
Code identifying an organizational entity, a physical location, property or an individual
Usage notes
The element codes "BT" and "ST" are the most commonly used values in this element.
BS
Bill and Ship To
Name
Optional
String (AN)
Min 1Max 60
Free-form name
Identification Code Qualifier
Required
Identifier (ID)
Code designating the system/method of code structure used for Identification Code (67)
PI
Payor Identification
Identification Code
Required
String (AN)
Min 2Max 80
Code identifying a party or other code
- This segment, used alone, provides the most efficient method of providing organizational identification. To obtain this efficiency the "ID Code" (N104) must provide a key to the table maintained by the transaction processing party.
Usage notes
N104 will contain the 340-B Bill-To Account Number. This is not the
Walgreens account information
N1 Loop Others
RequiredMax 1
The N1 segment is sent for all Purchase Order types
Variants (all may be used)
310
Name
RequiredMax use 1
To identify a party by type of organization, name, and code
Example
N1*SU*WALGREEN DRUG STORE*11*A1B2~
Entity Identifier Code
Required
Identifier (ID)
Code identifying an organizational entity, a physical location, property or an individual
Usage notes
The element codes "BT" and "ST" are the most commonly used values in this element.
BY
Buying Party (Purchaser)
This value will only to be used on CII orders.
ST
Ship To
SU
Supplier/Manufacturer
This value will only to be used on CII orders in order to pass the DEA License number
Name
Optional
String (AN)
Min 1Max 60
Free-form name
Identification Code Qualifier
Required
Identifier (ID)
Code designating the system/method of code structure used for Identification Code (67)
9
D-U-N-S+4, D-U-N-S Number with Four Character Suffix
This value may be used on 340-B orders.
11
Drug Enforcement Administration (DEA)
This value will only to be used on CII orders.
92
Assigned by Buyer or Buyer's Agent
This element used by Walgreens to denote the Store number issuing the Purchase Order in N104.
Identification Code
Required
String (AN)
Min 2Max 80
Code identifying a party or other code
- This segment, used alone, provides the most efficient method of providing organizational identification. To obtain this efficiency the "ID Code" (N104) must provide a key to the table maintained by the transaction processing party.
Usage notes
Legacy DSD Purchase Orders will transmit the 5-digit store number (with leading zeroes) in this element; however, when the Purchase Orders come from our future SAP system, the 4-character (alphanumeric) Site number will be sent in this element
330
Address Information
OptionalMax use 1
To specify the location of the named party
Example
N3*345 N LAKE ST*ADDR2~
Address Information
Required
String (AN)
Min 1Max 55
Address information
Address Information
Optional
String (AN)
Min 1Max 55
Address information
340
Geographic Location
OptionalMax use 1
To specify the geographic place of the named party
Example
N4*MUNDELEIN*XX*XXXXXXX*XXX~
City Name
Required
String (AN)
Min 2Max 30
Free-form text for city name
- A combination of either N401 through N404, or N405 and N406 may be adequate to specify a location.
State or Province Code
Required
Identifier (ID)
Min 2Max 2
Code (Standard State/Province) as defined by appropriate government agency
- N402 is required only if city name (N401) is in the U.S. or Canada.
Postal Code
Required
Identifier (ID)
Min 3Max 15
Code defining international postal zone code excluding punctuation and blanks (zip code for United States)
Country Code
Optional
Identifier (ID)
Min 2Max 3
Code identifying the country
Detail
PO1 Loop
RequiredMax 100000
010
Baseline Item Data
RequiredMax use 1
To specify basic and most frequently used line item data
- PO102 is required.
Usage notes
The information in this segment should always be reflected in the appropriate segments for the Purchase Order Acknowledgement (EDI-855), Advance Ship Notice (EDI-856) and Invoice (EDI-810).
Additionally, our 340-B requirements mandate that the NDC be included on all return documents (Purchase Order Acknowledgement and Advance Ship Notice).
Example
PO1*001*7*EA*12*PE*UP*072140011505*IN*269710*ND*XXX*KK*PFL~
If either Product/Service ID Qualifier (PO1-08) or Product/Service ID (PO1-09) is present, then the other is required
If either Product/Service ID Qualifier (PO1-10) or Product/Service ID (PO1-11) is present, then the other is required
If either Product/Service ID Qualifier (PO1-12) or Product/Service ID (PO1-13) is present, then the other is required
Assigned Identification
Required
String (AN)
Min 1Max 20
Alphanumeric characters assigned for differentiation within a transaction set
- PO101 is the line item identification.
Usage notes
This value is the Purchase Order line number which must be returned on the ASN and Invoice in response to this PO. Failure to return the correct value may result in processing errors. Additionally, the PO Line number association will be mandatory to be returned correctly in our future SAP environment.
Quantity Ordered
Required
Decimal number (R)
Min 1Max 15
Quantity ordered
Unit or Basis for Measurement Code
Required
Identifier (ID)
Code specifying the units in which a value is being expressed, or manner in which a measurement has been taken
EA
Each
This UOM measure (EA) is the Mandatory qualifier to be used for vendors on the Three-Way Match Program/Invoice Reconciliation in the Legacy Walgreens environment. Other values, such as "CA," may become available after Walgreens has finished its SAP deployment across all internal systems
Unit Price
Required
Decimal number (R)
Min 1Max 15
Price per unit of product, service, commodity, etc.
Usage notes
This element is not sent if the specified item and quantity are Free Goods.
Orders originating out of our Legacy/SIMS environment will only send up to 2 decimal positions; however, our future SAP system-generated orders will send up to 4 significant decimal places.
Basis of Unit Price Code
Optional
Identifier (ID)
Code identifying the type of unit price for an item
Usage notes
This element is not sent if the specified item and quantity are Free Goods
CT
Contract
PE
Price per Each
Direct Store orders always contain a value of PE in this element.
Product/Service ID Qualifier
Required
Identifier (ID)
Code identifying the type/source of the descriptive number used in Product/Service ID (234)
- PO106 through PO125 provide for ten different product/service IDs per each item. For example: Case, Color, Drawing No., U.P.C. No., ISBN No., Model No., or SKU.
Usage notes
Walgreens' SAP Implementation will standardize on the use of "UP" (11-digit UPC plus check-digit) for all items, except in the case of EANs or GTINs. For all Purchase Orders (especially 340-B), this value MUST be listed on LIN02 of the EDI-856 and PO106 on the EDI-855.
EN
European Article Number (EAN) (2-5-5-1)
UA
U.P.C./EAN Case Code (2-5-5)
The UA qualifier is used ONLY for deals and assortments.
UI
U.P.C. Consumer Package Code (1-5-5)
UK
U.P.C./EAN Shipping Container Code (1-2-5-5-1)
UP
U.P.C. Consumer Package Code (1-5-5-1)
VN
Vendor's (Seller's) Item Number
The VN qualifier is used ONLY for expense items.
Product/Service ID
Required
String (AN)
Min 1Max 48
Identifying number for a product or service
Usage notes
Walgreens' SAP Implementation will standardize on the use of "UP" (11-digit UPC plus check-digit) for all items, except in the case of EANs or GTINs.
For all Purchase Orders (especially 340-B), this value MUST be listed on LIN03 of the EDI-856 and PO107 on the EDI-855
Product/Service ID Qualifier
Optional
Identifier (ID)
Code identifying the type/source of the descriptive number used in Product/Service ID (234)
Usage notes
This value is the qualifier for the 6-digit Walgreens Item Code (WIC). For 340-B Orders, this value MUST be listed on LIN08 of the EDI-856 and PO112 on the EDI-855.
IN
Buyer's Item Number
Product/Service ID
Optional
String (AN)
Min 1Max 48
Identifying number for a product or service
Usage notes
This value is the Legacy 6-digit Walgreens Item Code (WIC) or 6-digit SAP Article Number. For 340-B Orders, this value MUST be listed on LIN09 of the EDI-856 and PO113 on the EDI-855.
Product/Service ID Qualifier
Optional
Identifier (ID)
Code identifying the type/source of the descriptive number used in Product/Service ID (234)
Usage notes
For 340-B Orders, this value MUST be listed on LIN06 of the EDI-856 and PO110 on the EDI-855.
ND
National Drug Code (NDC)
Product/Service ID
Optional
String (AN)
Min 1Max 48
Identifying number for a product or service
Usage notes
For 340-B Orders, this value MUST be listed on LIN07 of the EDI-856 and PO111 on the EDI-855.
Product/Service ID Qualifier
Optional
Identifier (ID)
Code identifying the type/source of the descriptive number used in Product/Service ID (234)
Usage notes
For Rx Primary Source Vendor Only. This Code is used to identify Special Shipping Instructions for Partial Fill Items
KK
Special Material Identification Code
Product/Service ID
Optional
String (AN)
Identifying number for a product or service
Usage notes
For Rx Primary Source Vendor Only. When the PO112 is sent with the "KK" code, the PO113 element will contain the value of "PFL." This value MUST be used on the shipping container/tote for this item, when this Purchase Order is shipped to the store
PFL
Partial Fill
Summary
CTT Loop
RequiredMax 1
010
Transaction Totals
RequiredMax use 1
To transmit a hash total for a specific element in the transaction set
- The number of line items (CTT01) is the accumulation of the number of PO1 segments. If used, hash total (CTT02) is the sum of the value of quantities ordered (PO102) for each PO1 segment.
Usage notes
The CTT segment is used for all Purchase Order types. Distribution Center and Central Direct orders use all elements listed.
Example
CTT*1~
Number of Line Items
Required
Numeric (N0)
Min 1Max 6
Total number of line items in the transaction set
030
Transaction Set Trailer
RequiredMax use 1
To indicate the end of the transaction set and provide the count of the transmitted segments (including the beginning (ST) and ending (SE) segments)
Example
SE*0000*0001~
Number of Included Segments
Required
Numeric (N0)
Min 1Max 10
Total number of segments included in a transaction set including ST and SE segments
Transaction Set Control Number
Required
Numeric (N)
Min 4Max 9
Identifying control number that must be unique within the transaction set functional group assigned by the originator for a transaction set
Functional Group Trailer
RequiredMax use 1
To indicate the end of a functional group and to provide control information
Example
GE*000000*000000~
Number of Transaction Sets Included
Required
Numeric (N0)
Min 1Max 6
Total number of transaction sets included in the functional group or interchange (transmission) group terminated by the trailer containing this data element
Group Control Number
Required
Numeric (N0)
Min 1Max 9
Assigned number originated and maintained by the sender
Interchange Control Trailer
RequiredMax use 1
To define the end of an interchange of zero or more functional groups and interchange-related control segments
Example
IEA*00000*000000000~
Number of Included Functional Groups
Required
Numeric (N0)
Min 1Max 5
A count of the number of functional groups included in an interchange
Interchange Control Number
Required
Numeric (N0)
Min 9Max 9
A control number assigned by the interchange sender
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article