EDI documents
EDI 852 Product Activity Data
The EDI 852 is the retailer's report back to the supplier: units sold, stock on hand and on order, per item and often per store. This page covers the XQ, LIN, ZA and SDQ segments with the activity codes, a weekly sample, the envelope, Kroger's two 852 programs, and the replenishment sum a supplier runs on the data.
Updated
What is an EDI 852?
The EDI 852 is the X12 Product Activity Data transaction set. A retailer, distributor or warehouse uses it to tell a trading partner what happened to its products: inventory, sales and other activity, per item, per location and per period. X12 states the purpose directly: the data lets the receiver "plan and ship, or propose inventory replenishment quantities". The EDIFACT counterpart is the SLSRPT message.
The 852 runs against the direction of most retail documents. The 850, 856 and 810 follow the order; the 852 reports what happened after the goods arrived. It is the input for two programs: vendor-managed inventory, where the supplier decides the next order from the data, and scan-based trading, where the supplier is paid for what the store scanned at the register.
Where the 852 sits in the replenishment cycle
| Step | Document | Direction | What it carries |
|---|---|---|---|
| 1 | 852 product activity | Retailer to supplier | Sold, on hand and on order per item, for a day or a week |
| 2 | Replenishment calculation | At the supplier | Target stock minus on hand minus on order |
| 3 | 855 or 850 | Supplier to retailer, or retailer to supplier | The order that results, depending on the program |
| 4 | 856 ship notice | Supplier to retailer | The replenishment shipment |
| 5 | Next 852 | Retailer to supplier | Shows the shipment as received and on hand |
The 846 inventory advice is the document most often confused with it. The 846 reports the seller's stock to the buyer; the 852 reports the buyer's stock and sales to the seller. The functional identifier of the 852 is PD, the 846's is IB.
The segments of an 852
| Segment | Name | What it carries | What goes wrong |
|---|---|---|---|
| XQ | Reporting Date/Action | XQ01 handling code, XQ02 reporting date or start date, XQ03 end date | A week read as a day: seven days of sales booked against one date |
| XPO | Preassigned Purchase Order Numbers | A range of PO numbers the supplier may use | Numbers used out of sequence or kept past the week |
| N9 | Reference Identification | Vendor number, invoice number | An invoice number that is not stored, so payment cannot be matched |
| N1 | Name | ST ship to, VN vendor, with an ID | The report location mapped to the wrong warehouse |
| LIN | Item Identification | LIN02 and LIN03: UP, UA case code, UK GTIN-14; PI buyer's item code | A case GTIN matched to the each-level item |
| ZA | Product Activity Reporting | ZA01 activity code, ZA02 quantity, ZA03 unit, ZA04 and ZA05 date | Cases read as eaches |
| CTP | Pricing Information | Unit cost, special price, net price | A price used as the invoice price without checking the list |
| SDQ | Destination Quantity | Store number and quantity, up to 10 pairs per segment | Only the first SDQ read when an item sold in more than 10 stores |
| CTT | Transaction Totals | Number of LIN loops | A count mismatch rejects the set |
ZA activity codes
X12 004010 defines 39 activity codes for ZA01. These are the ones retail guides send.
| Code | Meaning |
|---|---|
| QS | Quantity sold |
| QA | Current inventory quantity available for shipment or sale |
| QP | Quantity on order, not yet received |
| QO | Quantity out of stock |
| QW | Quantity withdrawn from warehouse inventory |
| QC | Quantity committed |
| QU | Quantity returned by consumer |
| OQ | Planned order quantity |
XQ01 says what the receiver should do. G is "plan order(s) and ship product", which hands the supplier the decision. H is "notification only", which reports and asks for nothing.
A sample 852, with delimiters
Harbor Retail, the buyer from the 850 sample, reports the week of 27 September to 3 October for the two items on PO 4500018236. Sales come per store in SDQ; the other quantities are for DC 07, named in N1.
ST*852*0001~
XQ*G*20260927*20261003~
N9*IA*0412~
N1*ST*HARBOR RETAIL DC 07*92*0007~
LIN**UP*614141104826*VN*10482~
ZA*QS*58*EA~
SDQ*EA*92*0114*21*0126*17*0131*20~
ZA*QA*96*EA~
ZA*QP*24*EA~
LIN**UP*614141104994*VN*10499~
ZA*QS*31*EA~
SDQ*EA*92*0114*9*0126*14*0131*8~
ZA*QA*40*EA~
ZA*QP*12*EA~
CTT*2~
SE*16*0001~
Check the sums first. The store quantities for item 10482 are 21 plus 17 plus 20, which is 58, the QS total. For item 10499 they are 9 plus 14 plus 8, which is 31. QP is what is on order and not yet received: the 24 and 12 units that the 855 confirmed and the 856 shipped on 3 October, still on the road at the end of the week. There are 2 LIN loops, so CTT01 is 2, and 16 segments from ST to SE, so SE01 is 16.
Then the replenishment sum. XQ01 is G, so the supplier plans the order. With a target of three weeks of sales, item 10482 needs 3 times 58, which is 174 units. 96 on hand plus 24 on order is 120, so 54 are missing, and in cases of 12 that is 5 cases, 60 units. Item 10499 needs 3 times 31, which is 93. 40 plus 12 is 52, so 41 are missing, and 4 cases, 48 units, cover it.
The envelope around it
ISA*00* *00* *01*123456789 *ZZ*NORTHFIELD *261004*0300*U*00401*000001288*0*P*>~
GS*PD*123456789*NORTHFIELD*20261004*0300*1288*X*004010~
ST*852*0001~
SE*16*0001~
GE*1*1288~
IEA*1*000001288~
The 852 comes from the retailer, so its ID is the sender in ISA06 and GS02, and the control numbers continue the retailer's sequence, here 1288. GS01 is PD. ISA13 has to equal IEA02, GS06 GE02, ST02 SE02, and SE01 has to be the real count of 16. ISA15 is P for production and T for test. 852 files are large: a retailer with 400 stores that reports 120 items per store needs up to 40 SDQ segments per item, since each SDQ holds 10 store quantities, and 4,800 of them in one weekly file.
Who sends the 852: Kroger's two programs
Kroger publishes two 852 maps in version 5010, checked on 3 October 2026. Same transaction set, two different jobs.
| Element | VMI 852 | DSD pay-for-scan 852 |
|---|---|---|
| XQ01 | G, plan orders and ship product; or H | H, notification only |
| XQ02 and XQ03 | Reporting day and week end day | Scan date |
| References | XPO with a range of PO numbers for the week; N9 IA vendor number | N9 IK invoice number |
| Item | LIN UA case code or UK GTIN-14, plus PI Kroger item code | LIN UA or UK |
| Activity | ZA QA, QP, QW, QO, QC, OQ in cases, with date qualifier 007 | ZA QS, with CTP and SDQ per store |
| Price | Not sent | CTP UCP unit cost, SPC special price, NET net price |
The VMI map hands the supplier a range of PO numbers each week and states that leftover numbers at the end of the week "should be discarded". The resulting replenishment goes back as an 855 with acknowledgment type AP, as described on the 855 page. In the pay-for-scan map the 852 itself carries an invoice number, and each item carries its prices: in Kroger's own example a unit cost of 1.07 minus a special price of 0.17 gives a net of 0.90, and the eight store quantities of that item, 11, 1, 3, 9, 3, 5, 5 and 3, add up to 40 units. More on the program under EDI with Kroger.
What goes wrong with 852 data
- Units. Kroger's VMI quantities are in cases (CA); the pay-for-scan quantities are in eaches. Reading 147 cases as 147 units understates stock by the case pack.
- Item identifiers in transition. Kroger's guide shows three samples: all items as GTIN-14 (UK), none converted (UA case codes), and some converted per manufacturer. The item lookup has to accept both forms for the same product.
- Periods. XQ02 with XQ03 is a range; XQ02 alone is one day. Booking a weekly QS of 58 as daily sales multiplies the forecast by seven.
- SDQ overflow. The eleventh store starts a second SDQ segment under the same ZA. A parser that reads one SDQ per ZA drops those stores.
- Zero versus missing. ZAQO0 says nothing is out of stock. A missing QO line says nothing at all. Kroger also uses QN with quantity 0 to mean discontinue.
Handling the 852 on the ERP side
The 852 is data, not a transaction: on its own it creates no order. Its content goes to four places.
| 852 data | ERP or planning record | Use |
|---|---|---|
| ZA QS per store and week | Sell-through history per customer and item | Forecast and promotion analysis |
| ZA QA and QP | Customer stock position | Replenishment proposal: target minus on hand minus on order |
| CTP and N9 IK, in pay-for-scan | Sales invoice or settlement | Sales booked per scan date, matched to the payment |
| XPO in VMI | Number range for the next replenishment orders | Sales orders created with the buyer's PO number |
The replenishment sum needs the same stock definitions on both sides. QA at the retailer is stock available for sale; the note on which stock counts covers why that is not the same as physical stock.
We build the 852 into an EDI integration: the file parsed per item, store and period, units converted to your ERP's base unit, sales history stored per customer, and in vendor-managed programs a replenishment proposal you approve before it becomes an order. Tell us which retailers send you 852 data.
Frequently asked questions
Who sends the EDI 852?
The retailer, distributor or warehouse that holds the stock and sees the sales. It goes to the supplier, who uses it to plan production and replenishment. In vendor-managed inventory the supplier turns it into the next order itself.
What is the difference between the EDI 852 and the 846?
Direction and content. The 846 usually goes from supplier to buyer and says what the supplier can ship. The 852 goes from retailer to supplier and says what sold and what is left on the shelf and in the distribution center.
What does ZA QS mean in an 852?
QS is the activity code for quantity sold. ZA01 names the activity and ZA02 the quantity; QA is quantity available, QP on order not yet received, QO out of stock. X12 004010 defines 39 activity codes, and each retailer's guide lists the few it sends.
What is the EDIFACT equivalent of the 852?
The SLSRPT message, the sales data report. The pairing is industry convention and consistent across sources; neither standards body publishes an official crosswalk.
Tell us what you need
Tell us which systems you use and what needs to work better. We reply personally within one working day. We help you define the work, then agree the price and timing before you commit.
- You know the price and the timeline before you commit to anything
- We work out the connection that takes the work off your hands
- We handle the build, hosting, monitoring and maintenance
- Your team has less information to retype and fewer discrepancies to chase