Target Edi 846
What This Is
This guide is a deep, practical reference for working with the Target EDI 846 transaction set (X12 846 - Inventory Inquiry/Advice). It explains the 846 purpose, the segments Target vendors encounter most often, and the practical steps you need to convert 846 documents into CSV for downstream systems (ERP, WMS, BI tools) while avoiding common validation failures.
Target uses 846 messages to distribute inventory availability, on-hand quantities, store-level or warehouse-level counts, and status updates. You will find real-world EDI examples, explicit segment explanations, a conversion walkthrough, code snippets (with line-by-line explanation), case scenarios, and a troubleshooting section that explains WHY errors occur and HOW to fix them.
Who This Is For
This guide is for EDI analysts, vendor integration engineers, inventory analysts, 3PL technical teams, and developers who receive Target 846 files and must validate, parse, and convert them into CSV for internal systems or reporting.
Key Segments Explained
Below are the critical segments you will encounter in Target 846 files, how Target commonly uses them, and why they matter.
- ISA / GS / ST — Interchange, Functional Group, and Transaction headers. These control envelopes identify sender/receiver IDs, delimiters, version (e.g., 00401 or 004010), control numbers, and transaction boundaries. Bad ISA/GS control numbers cause TA1 or 997 functional acknowledgments with rejection codes.
- BIA — Beginning Segment for Inventory Inquiry/Advice — BIA establishes the transaction purpose (Original, Cancel, Replace), a reference number, and the document date/time. Target uses BIA to correlate the 846 to internal processes; an incorrect transaction set purpose code (e.g., sending a cancel when expecting original) causes confusion and operational errors downstream.
- LIN — Item Identification — LIN identifies the item (UPC, GTIN, Seller SKU) using Product/Service ID Qualifier and Product ID. Target commonly requires exact product ID qualifiers (e.g., UPC or GTIN); using the wrong qualifier or wrong length triggers lookups failures in Target's systems.
- QTY / SN1 / CTP — Quantity and inventory detail segments. QTY reports quantity values with qualifiers (e.g., available, on-hand). SN1 is used in some implementations to report shipped/available quantities. CTP may report price/cost data if included. Mismatched qualifiers or missing units of measure are typical causes of misinterpretation.
- DTM — Date/Time Reference — Specifies the date/time the inventory snapshot is for. Timezone mismatches and mismatched date formats (CCYYMMDD vs YYMMDD) are frequent causes of "stale data" complaints.
- N1 / N3 / N4 — Party Identification — Used to designate locations (ship-to, ship-from, store, warehouse). For store-level inventories Target often sends multiple N1 loops; if loop structure hierarchy is incorrect you will see AS2/ VAN rejections or operational discrepancies.
- REF — Reference Identification — Used for secondary identifiers (ASN number, location codes). Target often relies on specific REF qualifiers to link 846 to POs or location IDs.
Example EDI Snippet
Below is a compact, realistic X12 846 example. This example uses the standard X12 segment terminator (~), data element separator (*), and sub-element (:) characters. After the snippet, each important line is annotated.
ISA*00* *00* *ZZ*SENDERID *ZZ*TARGET *231214*1200*U*00401*000000905*0*P*>
GS*IB*SENDERID*TARGET*20231214*1200*905*X*004010
ST*846*0001
BIA*00*INV12345*20231214*1200
N1*ST*TARGET STORE 1234*92*1234
LIN*1*UP*012345678905
QTY*33*150*EA
DTM*036*20231214
REF*IA*LOC1234
LIN*2*UP*012345678912
QTY*33*0*EA
DTM*036*20231214
SE*11*0001
GE*1*905
IEA*1*000000905
Line-by-line explanation:
ISA*— Interchange header: controls the entire interchange. ISA element 13-16 contain control information (date/time, control number). If the ISA control number is duplicated or out-of-sequence you will see TA1 responses.GS*IB*— Functional group header for Inventory Inquiry/Advice. GS02 (sender) and GS03 (receiver) identify trading partner IDs.ST*846*0001— Transaction Set header. ST02 is the transaction set control number.BIA*00*INV12345*20231214*1200— BIA01 purpose (00 = original), BIA02 Reference ID, BIA03 date, BIA04 time. Target uses the reference to track the snapshot.N1*ST*TARGET STORE 1234*92*1234— N1 loop identifying the store (N103 is name, N104 qualifier identifies store code).LIN*1*UP*012345678905— LIN identifies an item: LIN02 qualifier 'UP' indicates UPC, LIN03 the UPC value.QTY*33*150*EA— QTY01 (33 = on-hand quantity qualifier), QTY02 quantity (150), QTY03 unit of measure.DTM*036*20231214— Date qualifier 036 (inventory date) and date.REF*IA*LOC1234— Additional reference like internal location code.SE*11*0001— Transaction set trailer, element count (11) and ST control number.
CSV Output Example
Below is a simple CSV mapping showing a flattened representation of the same 846 snippet. This table demonstrates a typical conversion where each LIN/QTY pair becomes a CSV row.
| document_ref | store_id | product_qualifier | product_id | qty_qualifier | quantity | uom | inventory_date | location_ref |
|---|---|---|---|---|---|---|---|---|
| INV12345 | 1234 | UP | 012345678905 | 33 | 150 | EA | 2023-12-14 | LOC1234 |
| INV12345 | 1234 | UP | 012345678912 | 33 | 0 | EA | 2023-12-14 | LOC1234 |
Step-by-Step Conversion Process
-
Confirm Delimiters and Envelope Consistency
- Open the file and read the ISA segment. Note the element separator (usually
*), sub-element separator, and segment terminator (last character of ISA). If your parser assumes different delimiters you will get mis-parsed segments. - Validate ISA control number and GS/GE counts. If ISA/GS control sequence does not match your expected sequence, record the mismatch and do not import until you reconcile — otherwise duplicate or missing interchange processing occurs.
- Open the file and read the ISA segment. Note the element separator (usually
-
Validate Transaction Header (ST/BIA)
- Confirm
STtransaction set identifier is 846. If not, route to other handlers. - Ensure BIA01 (purpose code) is correct for your expected processing (Original/Replace). If BIA02 (reference ID) is missing, the file cannot be correlated and should be rejected.
- Confirm
-
Extract Store/Location Context (N1 Loops)
- Parse each N1/N3/N4 loop to get store or warehouse identifiers and normalize them to your internal location codes. If Target uses a different qualifier, map it to your system's store dimension.
- When multiple N1 loops exist, confirm that the subsequent LIN segments apply to the correct N1 scope based on Loop boundaries.
-
Parse Items (LIN) and Quantities (QTY)
- For each LIN, read the product qualifier and product id. Validate product id length and format for UPC/GTIN — perform an internal lookup against your product master.
- Read associated QTY segments. Ensure QTY qualifier codes are expected; convert UOM to the canonical unit used in your ERP.
-
Normalize Dates and Times (DTM)
- Convert X12 date format to ISO date (
YYYY-MM-DD). If timezone information is absent, default to your agreed-upon timezone with Target or annotate as UTC. - If DTM is missing, flag the row for review — inventory snapshots without dates are operationally useless.
- Convert X12 date format to ISO date (
-
Validate and Enrich
- Cross-check product IDs against your catalog and enrich with internal SKUs, descriptions, and category codes.
- Flag and report items with missing master data. This is typically where chargebacks / penalties begin because mismatch causes replenishment failures.
-
Output CSV and Run Final Validations
- Export rows to CSV using the header mapping shown above. Ensure CSV escaping of delimiters and consistent date formats.
- Run counts: ensure the number of LIN segments equals the number of output rows. Log mismatches and hold imports until reconciled.
Common Errors and Fixes
Below are frequent real-world issues when processing Target 846 files, why they occur, and how to fix them.
- Error: TA1 - Interchange Control Acknowledgment (syntax error)
Cause: Bad ISA delimiters or header syntax. Fix: Inspect ISA for correct element and segment terminators. Use a deterministic parser or PlainEDI validation to detect delimiter mismatches before ingestion. PlainEDI validates ISA-level syntax on upload: PlainEDI. - Error: 997 AK9 with 'E' (Functional Group Syntax Error)
Cause: Incorrect GS/GE counts or missing required segments in the 846. Fix: Validate GS control numbers and ensure every ST has a matching SE with correct element counts. Tools like PlainEDI will check ST/SE counts and report mismatches during upload: PlainEDI. - Error: Missing BIA Reference (BIA02 empty)
Cause: Sender omitted the document reference. Target operations cannot correlate snapshots without it. Fix: Reject and request resend or set up an automated quarantine that emails the trading partner. Add a pre-processor rule to block BIA02-empty transactions. - Error: Product ID Qualifier mismatch (LIN qualifier not recognized)
Cause: Sender used an unsupported qualifier (e.g., 'BP' instead of 'UP'). Fix: Update mapping table to accept retailer-supported qualifiers or implement a normalization layer that converts incoming qualifiers to internal canonical qualifiers. - Error: Stale or future DTM dates
Cause: Date format or timezone misinterpretation; or sending a snapshot dated in the future. Fix: Normalize all dates to ISO and implement a business rule that flags dates older than X days or greater than today+Y hours. Communicate policy to Target via trading partner support if frequent. - Error: Duplicate LINs for same item/store
Cause: Sender included multiple LIN loops for the same item/store because of multiple location refs. Fix: Aggregate quantities according to your business rules (sum by store+item) or request a change to the sender to provide unique location qualifiers. - Error: CSV import fails due to special characters
Cause: Unescaped commas or newline characters in N1/N3 text fields. Fix: Quote fields properly and escape embedded characters. Pre-scan EDI N1 segments and sanitize text before CSV export.
Case Studies and Real-World Examples
Case Study 1 — Multi-store Inventory Snapshot
A mid-size vendor received daily 846 files from Target with store-level inventory for 1,800 SKUs. The vendor's old parser treated LIN loops as transaction-level items and dropped the N1 store context, causing inventory updates to go to a default warehouse and generating replenishment errors. Fix: Implemented the step-by-step conversion above, captured N1 store IDs, and added aggregation rules. After implementing PlainEDI validation on upload, the vendor reduced parsing exceptions by 87% and eliminated duplicate replenishment events.
Case Study 2 — Product ID Qualifier Errors
A supplier used GTIN values but sent qualifier code 'VP' by mistake. Target's system could not match items, and replenishment failed. Fix: Added a mapping table to accept both 'GT' and 'VP' as variant qualifiers, and created an automated alert to notify the partner when an unrecognized qualifier appears. PlainEDI was set to enforce a whitelist of qualifiers during parsing.
How PlainEDI Helps
PlainEDI provides pre-upload validation that checks ISA/GS/ST envelope consistency, ST/SE counts, required BIA fields, recognized product qualifiers, DTM date formats, and segment loop hierarchy. Using PlainEDI before ingest reduces common rejections and lets you catch delimiter issues, missing elements, and segment mis-ordering early in the pipeline.
Related Resources
- Target EDI compliance requirements
- how to convert Target EDI to Excel
- reading 997 functional acknowledgments
- edi-to-csv for small business vendors
- how to validate EDI files before sending
- integrating EDI with ERP systems
FAQ
Q: What is the purpose of the X12 846 transaction for Target?
The 846 Inventory Inquiry/Advice provides inventory status and availability data. Target uses it to communicate on-hand quantities, store or warehouse availability, and relevant dates so suppliers and systems can reconcile inventory and replenish appropriately.
Q: How do I know which delimiters the 846 file uses?
Inspect the ISA segment. ISA is fixed-width for the first 106 characters where the element separator is at position 4, and the segment terminator is the last character after ISA. Use a parser that dynamically reads these delimiters rather than assuming defaults.
Q: What causes a TA1 or 997 rejection on an 846?
TA1/997 rejections are caused by interchange- or group-level syntax errors, incorrect delimiter usage, missing required segments (like BIA), or incorrect ST/SE counts. Validate ISA/GS headers and run a pre-processor to check ST/SE element counts to prevent rejections.
Q: How should I treat multiple N1 loops in one 846?
Respect N1 loop scopes: identify each N1 (store/warehouse) and ensure subsequent LIN/QTY segments are associated with the correct location. If LIN loops don't include explicit location refs, use the most recent N1 context. If ambiguous, hold for manual review.
Q: How do I map QTY qualifiers to business meanings?
QTY qualifiers (e.g., on-hand, available, allocated) must be mapped to your internal codes. Maintain a qualifier lookup table that converts X12 qualifier codes to your inventory fields. If your system requires a single canonical quantity, document and apply aggregation rules (sum, last value, or highest priority qualifier).
Q: Should I convert Target 846 to CSV or push to ERP directly?
CSV is useful for reporting, quick uploads to spreadsheets, or as an intermediary format for systems without EDI. For automated inventory updates, integrate with your ERP using native APIs or EDI-to-ERP connectors to avoid CSV import errors. Use a canonical CSV mapping (shown above) if you must export CSVs.
Q: What are the typical penalties for inventory and ASN compliance at Target?
Target enforces penalties for non-compliance in areas like OTIF and ASN accuracy. Effective date for current program details referenced here: 2025-12-14. Verify specific dollar amounts and thresholds in Target's vendor portal because penalty rates and policies change. Implement rigorous 846 validation to reduce the risk of compliance failures.
Q: How can PlainEDI prevent errors with Target 846 files?
PlainEDI validates ISA/GS/ST envelopes, checks ST/SE counts, validates required segments like BIA and DTM, enforces product ID qualifier whitelists, and reports delimiter/syntax issues on upload. Using PlainEDI before ingestion reduces operational rejections and speeds reconciliation. Upload and validate your files at PlainEDI.
Final Recommendations
Operational success with Target 846 requires strict validation at the interchange and transaction level, consistent product ID mappings, date normalization, and clear handling of N1 scopes. Implement automated validation that checks ISA/GS syntax, ST/SE counts, BIA presence, known product qualifiers, and expected DTM formats. Use PlainEDI as a pre-ingest validator to catch envelope/segment issues early and to enforce qualifier whitelists and date rules.
For long-term reliability: maintain a running mapping of Target-specific qualifiers and location codes, automate aggregation rules for duplicate LIN entries, and create exception workflows that quarantine suspect shipments for human review. Finally, check Target's vendor portal regularly for compliance updates and penalty changes — the effective date referenced here is 2025-12-14; verify current requirements directly in the portal.
Ready to validate your Target 846 files now? Upload and validate your file with automated checks at PlainEDI.