> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.stock-sync.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# What is EDI Format ?

Connect and process EDI (Electronic Data Interchange) files in syncX: Stock Sync by mapping fixed-length plain text columns to your store product fields.

---

## How to Set Up an EDI File 

Go to **App** → **Feed Settings** → **Step 1: Feed Manager**

1. **Upload or Select Source**: Select EDI as your file format or upload your plain text EDI file.
2. **Determine Column Character Lengths**: Measure the start and end character positions for each data field in your EDI file using a text analyzer tool like [Online Text Tools](https://onlinetexttools.com/find-text-length).
3. **Assign Column Indices**: Map the calculated character index range to the corresponding product destination field in Step 2: Matching Column.

| You can use online character length calculators to identify the exact position and character width of each column in raw EDI files.

---

## EDI File Mapping Breakdown

An EDI file follows Electronic Data Interchange standards, storing inventory and product information in a fixed-width, plain-text format.

### 1. Plain Text EDI Structure
Standard fixed-width EDI files do not use traditional delimiters like commas or tabs; instead, fields are defined by fixed character lengths across each line.

![Example of plain text EDI file structure](https://storage.crisp.chat/users/helpdesk/website/b219050a5836c000/04da6c58-c16a-441b-a900-f83dd1_zfaumb.jpg)

### 2. Calculating Column Ranges & Index Mapping
Assign each data column a character range calculated by adding the field's length to the ending index of the previous field.

![Demonstration of mapping fixed-length text columns to indices](https://storage.crisp.chat/users/helpdesk/website/ab99f42c453f0000/f90640a7-dd47-4d4d-97b1-c23083_1r2slc0.gif)

| **Example Range Calculation**: If the first column spans character positions 1 to 35, and the second column has a length of 12 characters, the second column index is mapped as `36-48` (36 + 12 = 48, spanning index 36 to 48).

| Always verify that character counts account for trailing spaces within fixed-width fields.

---

## Key Rules & Technical Details

- **Unsupported Formats**: Standard **EDI X12 846** segment-based transaction formats are currently NOT supported.

||| syncX: Stock Sync does not support standard EDI X12 846 segment formats.

![Unsupported EDI X12 846 format example](https://storage.crisp.chat/users/helpdesk/website/b219050a5836c000/image7ol6ei-2_mk5k38.jpg)

---

## Troubleshooting Steps

* **Issue**: Fields are truncated or contain extra characters → **Solution**: Recalculate character lengths using a text length analyzer tool and update your column index ranges in Step 2.
* **Issue**: EDI X12 846 file fails to parse → **Solution**: Convert the file into a standard fixed-width plain text layout, CSV, or XML format before processing in syncX.

---

## Good Articles to Continue

* \[[Supported File Types and Formats](https://help.stock-sync.com/en/article/supported-file-formats-in-stock-sync-c9gmoq/)] → Overview of supported inventory file formats including CSV, XML, XLSX, and JSON.
* \[[How to Map Columns in Step 2](https://help.stock-sync.com/en/article/what-is-matching-column-step-2-mkzcny/)] → Complete guide to mapping source indices to store destination fields.