START A CONVERSATION

Let’s talk about your next build.

Prepare your brief below, then review and send it in your email app to sales@nextlabsonline.com.

THE FIRST CONVERSATION

Your product idea, AI opportunity or automation challenge—and a useful first milestone.

All fields are required.

A few sentences about the problem, your users and timing are enough.

We’ll use your details to respond to your enquiry. Please don’t include patient records, passwords or confidential information. Privacy Policy · Website Terms.

Logistics & supply chain / EDI & Message Standards

EDI 852 Product Activity Data: Using Sell-Through for Replenishment

By Vikasraj YadavPublished 9 min read

For edi and integration analysts, it leads at shippers, 3pls and carriers · Understand the problem

EDI 852 Product Activity Data: Using Sell-Through for Replenishment — Two supply chain IT and finance staff sitting at a wooden table with two side-by-side out-of-focus monitors, two closed laptops, a blank ruled clipboard, and a plain cream folder, overlooking a warehouse floor with pallet racking and an orange forklift.

EDI 852 Product Activity Data: Using Sell-Through for Replenishment: Illustrative TMS–ERP order and invoice handoff review beside a warehouse floor; not a client facility.

At a glance · Quick answer

Quick answer: edi 852 product activity data

The X12 852 Product Activity Data transaction sends a supplier each location's activity by ZA01 code: QA for stock available, QS for quantity sold, QR for received and QP for on order, with store quantities in SDQ pairs. A VMI engine averages QS, subtracts QA plus QP from an order-up-to level, and rounds the gap to case pack.

TL;DR — what you’ll learn

  • Map four ZA01 codes first, QA, QS, QR and QP, and read every quantity with its unit in ZA03 or SDQ01 before it reaches the replenishment run.
  • One SDQ segment carries up to ten store and quantity pairs, SDQ03 to SDQ22; a translator that reads only the first pair drops nine stores in ten.
  • Order quantity is the order-up-to level minus QA and QP, rounded to case pack; in the worked US case that is 170 units rounded to 15 cases of 12.
  • In consignment programs QS drives revenue under ASC 606-10-55-80, and in India Section 31(7) caps the wait for an invoice at six months from removal.

Topics: edi 852 product activity data · 852 store on-hand sales and receipts · vmi trigger math · x12 852 za activity codes · 852 sdq destination quantity

All quantities, amounts, product codes and events are illustrative teaching examples.

The weekly sell-through file arrives every Monday, the replenishment planner downloads it into a spreadsheet, and by Wednesday the stores that sold out on Saturday are still waiting for a truck. When an order finally goes out, it is sized from on-hand figures that are six days old and ignore the cases already in transit. The supplier ends up shipping too little to the busy stores and too much to the quiet ones.

The X12 852 Product Activity Data transaction exists to fix that lag. It carries each location's on-hand, sales, receipts and on-order quantities in coded segments that a replenishment engine can read without a person opening a file. Mapped correctly and checked against the supplier's own shipments, it lets a vendor-managed inventory program calculate an order-up-to quantity per store each reporting period and round it to case pack.

  • What this guide covers: the segment layout, the ZA activity codes worth mapping, per-store quantities in the SDQ segment, and the order arithmetic that turns them into a replenishment proposal.
  • What it adds: a worked order in dollars and rupees, a unit-of-measure failure trace, the revenue and GST consequences for consignment programs, and an onboarding checklist for a new trading partner.

What the 852 carries, and how it differs from the 846 and 867

The 852 reports what happened to a product at the buyer's locations: stock, sales, receipts and orders. The 846 reports what inventory a seller or a location has available, and the 867 reports product transfers and resales. Choosing the wrong set for a replenishment program means mapping fields that were never designed to carry store demand.

X12's own description says the 852 can be used "to advise a trading partner of inventory, sales, and other product activity information," so that the partner can plan and ship, or propose replenishment quantities, for distribution centres, warehouses or retail outlets. The receiver is expected to keep movement records for its partners so that replenishment can be calculated from the data provided.

  • 852 Product Activity Data: sent by a retailer, distributor or warehouse to its supplier; carries quantities by activity code and location for a reporting date or period.
  • 846 Inventory Inquiry/Advice: used by a seller to state available inventory or by one location to inform another; our 846 mapping guide covers 3PL balance snapshots.
  • 867 Product Transfer and Resale Report: reports transfers between locations or resales to end customers, and can include demand beyond actual sales, which suits distributor chargebacks better than store replenishment.
  • 830 Planning Schedule: sends forecast requirements rather than actual activity; see our 830 planning schedule guide for how forecasts and firm releases differ.

Segment map: XQ dates, reporting location, LIN item and ZA activity

An 852 has a small heading and a repeating detail loop. Read the heading for the reporting period and the location, then read each LIN loop for the item and its ZA activity segments. Ownership of each field decides who fixes it when a value is wrong.

In the AmerisourceBergen version 4010 guide, the heading carries ST, the mandatory XQ reporting date and action segment, optional XPO preassigned purchase order numbers, and N1 loops. XQ02 is the report start date and XQ03 the end date when a range is reported; XQ01 carries a transaction handling code, with "G" meaning plan orders and ship product. The summary closes with CTT, whose CTT01 counts LIN segments, then SE.

Scroll horizontally to see all columns.

Who owns each 852 field on the retailer and supplier side, and who approves a correction
Segment and elementContentOwner of the valueApproves a mapping change
XQ02 and XQ03Reporting start and end dates, CCYYMMDDRetailer EDI teamSupplier replenishment lead
N1 with N101 = RL, or SDQ locationsReporting location, or store codes per quantityRetailer store master dataSupplier customer master owner
LIN02 to LIN31Item identifiers, such as UPC, buyer item code or other qualified IDsRetailer item master, matched to supplier GTINsSupplier item master owner
ZA01, ZA02, ZA03Activity code, quantity and unit of measureRetailer POS and store inventory systemsSupplier replenishment lead with the EDI analyst
ZA04 and ZA05Optional date qualifier and date for the activityRetailer EDI teamEDI analyst
CTT01Count of LIN segments for completeness checksRetailer translatorEDI analyst
From a retailer's 852 file to a case-rounded store order Step 1, Receive 852: Parse XQ, LIN, ZA and SDQ. Reporting period from XQ02 and XQ03; Store codes from SDQ pairs; 997 acknowledgment returned. Step 2, Normalise: Units, stores and period checks. CA converted to EA by pack size; Unmatched store codes held; Missing week flagged. Step 3, Calculate: Order-up-to gap per store. Average daily QS; Inventory position QA plus QP; Gap rounded to case pack. Step 4, Release: Limits, planner review, shipment. Hold above twice the usual order; Planner approves outliers; Invoice and e-way bill in India. From a retailer's 852 file to a case-rounded store order Activity codes are parsed, checked against shipments, turned into a gap and released after limits 1 · RECEIVE 852 Parse XQ, LIN, ZA and SDQ • Reporting period from XQ02 and XQ03 • Store codes from SDQ pairs • 997 acknowledgment returned 2 · NORMALISE Units, stores and period checks • CA converted to EA by pack size • Unmatched store codes held • Missing week flagged 3 · CALCULATE Order-up-to gap per store • Average daily QS • Inventory position QA plus QP • Gap rounded to case pack 4 · RELEASE Limits, planner review, shipment • Hold above twice the usual order • Planner approves outliers • Invoice and e-way bill in India

ZA activity codes that drive replenishment, and the ones to park

Map four codes first: QA for current stock, QS for quantity sold, QR for quantity received and QP for quantity on order. Add QI and QO when the partner sends them; park the rest until a planner asks for them. Every quantity must be read with its unit of measure, in ZA03 or in SDQ01.

The ZA01 element is X12 data element 859, Activity Code. Retailer guides each pick a subset, and the AmerisourceBergen outbound 4010 map lists more than twenty, from bailment sales to retail sales quantity. Definitions matter: QA is "Current Inventory Quantity Available for Shipment or Sale," which some partners report net of damaged or held stock and others do not. Ask which one before using it as on-hand.

  • QA, available quantity: the starting point of inventory position; confirm whether held and damaged units are excluded, because QH and HL codes exist to report them separately.
  • QS, quantity sold: the demand signal; confirm with the partner whether it reports point-of-sale scans or shipments out of its own warehouse.
  • QR, quantity received: receipts during the period; compare with what you shipped to measure in-transit loss and late receiving.
  • QP, quantity on order: defined as on order, not yet received; check whether your open shipments already appear here before adding them again.
  • QI and QO: quantity in transit and quantity out of stock; QO is useful as a lost-demand marker when QS reads zero only because the shelf was empty.
  • QU and Q2: quantity returned by consumers and quantity returned; net them against QS only if the partner's QS is gross.

Replenishment from an X12 852 starts with four ZA01 activity codes, QA on-hand, QS sold, QR received and QP on order, each read with its unit of measure in ZA03 or SDQ01; a version 4010 import should convert every quantity to the item master's base unit and hold any file lacking a conversion factor.

SDQ versus an RL location: per-store quantities in one segment

An 852 states its reporting location either once in N1 with qualifier RL or per quantity in the SDQ segment, never both. SDQ lets one ZA segment carry up to ten store quantities, which keeps files for large chains compact and makes store-code mapping the most fragile step.

The transaction set notes in the AmerisourceBergen guide state that the reporting location is required and that the N1 with RL and the SDQ method "are mutually exclusive". They also require the item quantity either in ZA02 or in SDQ. In the 4010 SDQ layout, SDQ01 is the unit of measure, SDQ02 an identification code qualifier such as 92 for a code assigned by the buyer, SDQ03 the store code and SDQ04 its quantity.

Per-store quantities in an X12 852 travel in the SDQ segment as up to ten location and quantity pairs, SDQ03 through SDQ22, under unit SDQ01; a chain reporting 400 stores therefore needs 40 SDQ segments under each ZA activity code, and the import should count store rows against pairs received.

Because the pairs run from SDQ03 and SDQ04 up to SDQ21 and SDQ22, a translator that reads only the first pair silently drops nine stores in every ten. Build a test file that fills every pair in several segments, load it, and compare the store rows created with the number of populated location elements before the feed goes live.

ST*852*000004117~
XQ*G*20261102*20261108~
LIN**UP*012345678905*IN*448210~
ZA*QA~
SDQ*EA*92*01142*96*01187*41*01203*0~
ZA*QS~
SDQ*EA*92*01142*182*01187*77*01203*121~
ZA*QP~
SDQ*EA*92*01142*48*01187*0*01203*72~
CTT*1~
SE*11*000004117~

-- Order-up-to proposal per store (all quantities in eaches)
d      = sum(QS over n weeks) / (7 * n)        -- average daily sales
SS     = z * sigma_d * sqrt(L + R)             -- safety stock
S      = d * (L + R) + SS                      -- order-up-to level
IP     = QA + QP + T                           -- T = vendor units shipped,
                                               --     not yet in QP
Q      = max(0, S - IP)
Q_ship = C * ceil(Q / C)                       -- C = case pack
-- L lead time days, R review period days, z service factor

The sample is illustrative, built to the segment rules above: each ZA carries only its activity code, because SDQ carries the unit and the store quantities. In the formula, add T only for shipments the retailer has not yet booked into QP, or the same cases are counted twice. Rounding up to case pack is a business choice; some programs round to the nearest case and accept a small shortfall.

Turning on-hand, sales and receipts into a store order

A store order proposal is the gap between an order-up-to level and inventory position, rounded to case pack. With weekly 852 files, the review period is seven days, and the safety stock covers demand variability across lead time plus that review gap.

The worked example uses one item at one store in each market. Figures are illustrative: the same arithmetic serves a US chain sending X12 852 and an Indian retailer that shares the same quantities in another format. Indian law does not require X12; the trading partner agreement sets the file format.

Scroll horizontally to see all columns.

Worked store order from four weeks of sell-through, US in dollars and India in rupees
StepUS store, X12 852 weekly ($)India store, weekly sell-through file (₹)
QS over four weeks168 + 182 + 175 + 189 = 714 units420 + 455 + 438 + 467 = 1,780 units
Average daily sales d714 / 28 = 25.51,780 / 28 = 63.6
Lead time L plus review R4 + 7 = 11 days5 + 7 = 12 days
Safety stock, z = 1.651.65 x 6 x √11 = 33 units1.65 x 14 x √12 = 80 units
Order-up-to level S25.5 x 11 + 33 = 31463.6 x 12 + 80 = 843
Inventory position QA + QP96 + 48 = 144310 + 120 = 430
Gap Q314 - 144 = 170843 - 430 = 413
Case pack and shipped quantity12 per case: 15 cases = 180 units24 per case: 18 cases = 432 units
Value at unit cost180 x $4.20 = $756.00432 x ₹185 = ₹79,920 taxable value
Tax on the replenishment invoiceNot applicable to the order valueGST at 18% = ₹14,385.60; invoice ₹94,305.60
Movement documentBill of ladingE-way bill required: consignment value including tax exceeds ₹50,000

The Indian column shows why the GST team belongs in the design. Rule 138(1) of the CGST Rules requires an e-way bill before moving goods whose consignment value exceeds ₹50,000, and Explanation 2 counts the tax charged in that value. A store order sized purely by the formula can cross the threshold, so the shipment planner should know which proposals need one before the truck is booked.

Checking the 852 against your own shipments before trusting it

Retailer activity data is only as good as store receiving, so compare QR with what you shipped and delivered before letting QA and QP drive orders. A gap that persists for more than two reporting periods points to a mapping or receiving problem, not to demand.

  • Receipts versus shipments: sum QR by store for the period and compare with delivered quantities from your proof of delivery; flag stores where the difference exceeds one case.
  • On order versus open shipments: list your shipped-not-received units by store and check whether they already appear in QP; this decides whether T in the formula is zero.
  • Zero sales with zero stock: treat QS of zero alongside QA of zero, or a QO value, as unmet demand rather than no demand, or the formula will shrink the next order.
  • Period continuity: confirm that each file's XQ02 follows the previous file's XQ03, so a missing week is detected before averages are calculated.
  • Line count: compare CTT01 with the LIN segments received; a mismatch means a truncated file, which a functional acknowledgment alone may not reveal.

Incident trace: a unit-of-measure slip that tripled a store order

The fault below came from one changed element in the retailer's map, and the supplier's translator accepted it because the code was valid. A unit check against the item master would have stopped it at the first file.

  1. Mon 2 Nov, 06:10: File 000004117 arrives for the week ending 1 Nov. The retailer has switched store 01142's QA from eaches to cases after a system upgrade, so SDQ01 reads CA and the store reports 8 instead of 96.
  2. Mon 2 Nov, 06:12: The translator validates the segment, sends the 997 acceptance and loads 8 as eaches because the import ignores the unit element.
  3. Mon 2 Nov, 07:30: The replenishment run sets inventory position at 8 + 48 = 56 against S of 314 and proposes 22 cases, 264 units, instead of 15 cases.
  4. Tue 3 Nov, 14:00: The order ships under VMI auto-release. Store 01142 receives 84 more units than planned, enough for over three days of sales, and its backroom fills.
  5. Controlled path: the import compares SDQ01 with the item master pack levels, converts CA to eaches at 12 per case, writes QA as 96 and logs the change for the EDI analyst; the proposal stays at 15 cases.

Consignment programs: when QS becomes the revenue trigger

Where the supplier still controls stock on the retailer's shelf, the 852 sales quantity stops being a planning input and becomes the basis for revenue and invoicing. Accounting and GST teams then depend on the same QS values the planner uses, so the data needs stricter controls.

Under US GAAP, ASC 606-10-55-80 lists indicators of a consignment arrangement: the entity controls the product until a specified event such as sale to the dealer's customer, can require its return or transfer, and the dealer has no unconditional obligation to pay. PwC's guide illustrates a manufacturer recognising revenue when consumers buy from the retailer. Ind AS 115 carries matching consignment guidance in paragraphs B77 and B78.

In a scan-based or consignment program, the supplier recognises revenue when the retailer's 852 reports quantity sold, because ASC 606-10-55-80 and Ind AS 115 paragraph B77 keep control with the supplier until consumer sale; QS values that drive invoicing should reconcile to the retailer's settlement within 0.5% each period.

India adds a GST timing rule. Section 31(7) of the CGST Act says that where goods sent on approval for sale or return are removed before the supply takes place, the invoice must be issued before or at the time of supply or six months from the date of removal, whichever is earlier. A consignment program that bills only on reported sales therefore needs an ageing report on stock moved to stores without an invoice.

Translator rules versus planner judgement on 852 feeds

Syntax, code lists, units and period continuity can be checked by fixed rules every time a file arrives. Whether a sales spike is real demand, a promotion or a data error is a judgement for a planner, though software can rank the proposals that deserve a second look.

Scroll horizontally to see all columns.

Which 852 checks run as fixed translator rules and where software only helps a planner decide
Task on the 852 feedFixed rule in the translator or importWhere software or AI assistsWho decides
Rejecting a quantity that arrives without a unit of measureYes, ZA02 needs ZA03, and SDQ01 is mandatoryNone neededEDI analyst reviews rejects
Converting CA to EA using pack sizeYes, from the item masterNone neededItem master owner maintains pack sizes
Detecting a missing week between XQ periodsYes, date continuity checkNone neededEDI analyst requests a resend
Reading a QS spike at one store as demand or errorNoComparing the spike with the promotion calendar and nearby stores and scoring how unusual it isReplenishment planner
Treating zero QS with zero QA as lost demandPartly, a flag when both are zeroEstimating lost sales from the store's prior weeksReplenishment planner
Releasing a proposal above twice the usual orderYes, a hold thresholdExplaining which inputs pushed the order upPlanner approves or edits
Billing consumer sales in a consignment programYes, QS totals tied to the settlement reportMatching store-level variances to likely causesAccounts receivable lead

Onboarding checklist for a new 852 trading partner

Most 852 problems are settled in the first fortnight of onboarding, when the partner's guide is mapped against your item and store masters. The checklist below records the questions to close before any proposal is released without a planner's review.

Scroll horizontally to see all columns.

Implementation checklist for a new 852 partner, with the evidence that closes each item
Item to confirmQuestion for the partnerEvidence that closes itOwner
Version and guideWhich X12 version and which ZA codes will you send?Signed copy of the partner's 852 guideEDI analyst
QA definitionDoes QA exclude damaged and held units?Written answer, plus QH or HL in a test file if held stock is separateReplenishment lead
Location methodN1 with RL, or SDQ pairs, and which store code qualifier?Store list mapped to your ship-to codes with no unmatched rowsCustomer master owner
Reporting periodDaily or weekly, and on which day does XQ02 start?Four consecutive test files with continuous datesEDI analyst
QP contentDoes QP include our shipments not yet received?One test week reconciled against our open deliveriesReplenishment lead
Resend ruleHow are corrected files flagged, and do they replace or add to the earlier one?Agreed replace-by-period rule in the partner agreementEDI analyst
Shadow runNot a partner questionFour periods of proposals compared with planner ordersReplenishment lead

The planning side of these programs, including how sell-through feeds into collaborative forecasts, is covered in our CPFR software and S&OP workflow article, which focuses on forecast reconciliation and tool choice rather than on 852 field mapping. Min-max locks for VMI are set out in our VMI min-max model, and related EDI topics sit on the logistics and supply chain hub.

If you are choosing a translator or replenishment tool to run an 852 program, list the unit check, SDQ handling, period continuity test and shadow-run reporting as mandatory requirements in your request for proposal, and ask each vendor to process a ten-store SDQ test file during the demonstration.

Discuss this workflow

Describe your current systems, the recurring exception and the outcome you need. Keep shipment, customer and financial records out of the initial message.

START A CONVERSATION

Let’s talk about your next build.

Prepare your brief below, then review and send it in your email app to sales@nextlabsonline.com.

SELECTED INDUSTRYLogistics & supply chain

Article: EDI 852 Product Activity Data: Using Sell-Through for Replenishment · EDI & Message Standards

THE FIRST CONVERSATION

Your product idea, AI opportunity or automation challenge—and a useful first milestone.

All fields are required.

A few sentences about the problem, your users and timing are enough.

We’ll use your details to respond to your enquiry. Please don’t include patient records, passwords or confidential information. Privacy Policy · Website Terms.

Common operational questions

Practical answers for operations, engineering, and finance teams working on edi 852 product activity data in logistics & supply chain.

What is the difference between the EDI 852 and the EDI 846?
The 852 reports product activity at the buyer's locations, such as stock on hand, sales, receipts and orders, so the supplier can plan replenishment. The 846 states inventory available from a seller or one location to another, with no obligation to buy. Store replenishment programs normally map the 852, not the 846.
Which 852 activity codes should be mapped first?
Start with QA, current inventory available for shipment or sale, QS, quantity sold, QR, quantity received, and QP, quantity on order not yet received. Add QI for in transit and QO for out of stock when the partner sends them, and confirm whether QA excludes damaged or held units.
How should a supplier avoid double counting stock in transit?
Ask whether the retailer's QP already includes shipments the supplier has sent but the store has not received. If it does, inventory position is QA plus QP. If not, add the supplier's own shipped-not-received units. Reconcile one test week against open deliveries before automating the calculation.
Does an Indian retailer have to send sell-through as an X12 852?
No. X12 is a US-developed standard, and Indian law does not require it for sell-through data, so partners agree the format commercially. The replenishment arithmetic stays the same, but each Indian shipment still needs a GST invoice and, where consignment value including tax exceeds ₹50,000, an e-way bill.

References

Sources checked 13 November 2026. US and India statutory authorities and vendor documentation support platform facts; the worked examples and diagrams are original.

About the author

Vikasraj Yadav writes about operational decisions, software and automation for NextEdge Labs.