XTranslator Lite — User Manual
XTranslator Lite is a desktop application for parsing, mapping, and translating EDI (Electronic Data Interchange) files in X12 format. It lets you:
- Read an X12 file and see its segments, elements, and subelements as an annotated tree.
- Map the parts of an EDI document you care about into a flat CSV report.
- Map the other way: take a CSV of data and rebuild a valid X12 EDI document from it (including the envelope segments and generated control numbers).
Everything you configure — the mappings and the routing rules — is saved locally as YAML in your user app-data directory.
Contents
- The Main Window
- Working with Mappings
- Understanding the Segment Tree
- Understanding the CSV Output Tree
- Loop Start
- Segment Repeat
- Translating EDI to CSV
- Translating CSV to EDI
- Field Functions
- Rules
- Options
- Batch Translation
- Command Line Interface
- Licensing
- Importing & Exporting Mappings
1. Important Features
| # | Feature | What it does |
|---|---|---|
| 1 | EDI X12 parsing | Reads an X12 file, auto-detects the element / segment / subelement separators from the ISA header, and builds an annotated tree of the document's unique segments. |
| 2 | Standard-based structure view | The tree is enriched from an embedded EDI-standards database, so each segment and element shows its standard name, qualifier |
| 3 | EDI to CSV mapping | Check the segments/elements you want; they become columns grouped under CSV "lines." Translate to produce a CSV file. |
| 4 | Loop-aware rows | Segments flagged as Loop Start in the EDI standard open a new CSV row, so repeating groups (e.g. an HL/LX loop) become one row per repetition. |
| 5 | Segment Repeat | A segment mapped with Repeat N reserves N sets of columns on a single row, so N consecutive instances of the segment (e.g. three DTM segments) stay together on one row. |
| 6 | CSV to EDI translation | The inverse: a CSV plus a saved mapping rebuilds a valid X12 document, generating envelope segments (ISA/GS/ST/SE/GE/IEA) and generated values (dates, counts, control numbers, HL/LX counters). |
| 7 | Field functions | Per-field value transforms applied on export (Trim, TrimStart, TrimEnd, UpperCase, LowerCase). |
| 8 | Rules | Route incoming files to the right mapping by release, transaction number, sender/receiver ID, and/or filename pattern. |
| 9 | Options | Configure input/output directories, CSV terminators, envelope sequence numbers, timestamping, and input-file cleanup. |
| 10 | Batch translation | Translate every file in an input folder at once. |
| 11 | Mapping persistence | Mappings and rules saved as YAML; importable/exportable. |
| 12 | CSV and PDF export | Produce CSV output (and PDF via the report tooling). |
| 13 | Basic / Pro licensing | Basic mode caps CSV output at 500 data rows per file; Pro removes the limit. |
1.1 Basic vs Pro license
The application runs in Basic mode by default. A purchased Pro license unlocks higher limits and is indicated in the window title as "Etasoft XTranslator Lite — Pro License".
1.2 Installation
Requirements
- Windows 11 or Windows server 2022
- Mac OS
- Linux desktop environment with X11 or Wayland support
Installing on Windows
Use the installer provided. Follow the standard installer prompts.
The application will appear in your desktop menu under Etasoft → XTranslator Lite.
Installing on Apple macOS
Unzip then drag "XTranslator Lite.app" into Applications.
Having "XTranslator Lite.app" in Applications may not be enough. Apple will quarantine the package. You can mark package as safe using few different methods.
One of the options is to use terminal command to remove quarantine attribute. Run xattr command in terminal from your home directory to enable the application.
xattr -dr com.apple.quarantine "/Applications/XTranslator Lite.app"
It is important to run command from your home directory.
Installing on Linux (Debian)
Run deb package installer or use command line:
sudo dpkg -i xtranslator-lite_1.0.0_amd64.deb
2. The Main Window
The window has a menu bar, a progress/status bar at the bottom, and two tabs: Translation and Mappings.
Menu bar
- File — New, Save, Save As…, Translate…, Retranslate, Export Mapping…, Import Mappings…, Exit.
- Settings — Rules…, Options…, License…
- Help — About…
Translation tab
The default tab. It holds:
- A toolbar:
Translate,Rules,Options,License,Clear. - A Translation History table with columns: Input, Output, Mapping Name, Total Rows, Warnings.
- A limit warning banner (visible only for Basic users when a file was truncated to the 500-row limit).
Mappings tab
This is where you build and edit mappings:
- A Mappings dropdown to select the active mapping, with
New,Save,Rename,Delete, andSeparatorsbuttons. - A left panel — the Mapping Segments & Elements tree (see §4).
- A right panel — the CSV output tree, with a view-mode toggle button that reads
EDI to CSVorCSV to EDI(see §5).
The status bar shows a progress bar plus three colored counters: skipped (orange), custom errors (purple), and errors (red).
Save behaviour: the
Save,Rename, andDeletebuttons are enabled only after a mapping has been changed (the app tracks a "mapping modified" flag). Edits to the tree (checking fields, changing Repeat, renaming a CSV column, setting a function) all mark the mapping as modified and enable Save.
3. Working with Mappings
A mapping is the unit of work. It captures:
- Its name (max ~50 characters).
- The EDI context it applies to: release (e.g.
005010), transaction-set number (e.g.850), and the sender/receiver IDs observed from the source file's ISA envelope. - The segment/element/subelement tree with which elements are checked for output.
- The CSV lines (loop groups) and their fields, with per-field names and functions.
- The separators (segment
~, element*, subelement:) observed in the source. - A view mode:
Output(EDI to CSV) orInput(CSV to EDI).
Workflow:
- Create a mapping (Mappings tab ▸
New, or File ▸ New). You may start from a standard template by selecting a release and transaction number. - Load a source file so its segments populate the tree.
- Check the segments/elements you want to capture (left tree) and arrange/rename the CSV fields (right tree).
- Set Loop Start and Repeat where needed (see §6, §7).
- Save the mapping.
- Translate (see §8 / §9).
Mappings and rules are stored together in xtranslator_mappings.yaml in the user app-data directory. Deleting a mapping also deletes any rules that reference it.
4. Understanding the Segment Tree
The left panel shows the parsed EDI document as a tree of unique segments (duplicates are collapsed to one node per segment+qualifier). Columns:
| Column | Meaning |
|---|---|
| ☐ (checkbox) | Check to include the segment/element in the CSV output. |
| Loop | The segment ID. |
| ID | The segment or element ID. |
| Name / Qualifier | The standard name (and qualifier, if any). |
| Repeat | The segment's Repeat count (editable, see §7). |
Key points:
- Envelope segments (
ISA,GS,ST,SE,GE,IEA) are always present in the tree. If the source file is missing an envelope segment, the standard definition is shown so it can still be mapped. - Loop Start segments are those flagged as loop starts in the EDI standard (and are not envelope segments). These are the segments that begin a new CSV row — see §6.
- Elements under a segment show their standard names; subelements (composite parts, separated by
:) nest one level deeper. - If a segment is not found in the standards database, its elements are shown positionally (e.g.
01,02, …) rather than by name.
Use Show Mapping menu item to jump to mapping field on the opposite side of the map.
5. Understanding the CSV Output Tree
The right panel shows the CSV lines that will be produced. It is a tree:
| Column | Meaning |
|---|---|
| CSV Line Name | The name of the CSV line (a loop group, an envelope segment, or a header group). Editable. |
| CSV Field Name | The name of a field within the line. Editable. |
| EDI ID | The source EDI reference, in the form <segment>-<element> (e.g. N1-02). For repeated instances it appends #<n> (e.g. DTM-01 #2). |
| Function | The per-field function (editable dropdown, see §10). |
How lines are formed
When you check fields in the left tree, the app groups them into CSV lines:
- Each envelope segment (
ISA/GS/ST/SE/GE/IEA) becomes its own CSV line, so its fields are emitted as a separate row in document order. - Each Loop Start segment becomes its own CSV line, and captures the non-loop segments that follow it (until the next loop start).
- A non-loop body segment that appears before any loop (e.g.
BHT) becomes its own CSV line, emitted in document order. - Fields with no enclosing loop are grouped into a generic "Header" line.
- Only lines that end up holding at least one checked field are shown.
The view-mode toggle
The EDI to CSV / CSV to EDI button sets the mapping's view mode:
EDI to CSV(Output mode): the mapping is used to turn EDI files into CSV.CSV to EDI(Input mode): the mapping is used to turn CSV files back into EDI.
The mode is saved with the mapping and restored when you reopen it. In batch translation, the mode (together with rule/filename matching) decides which mapping is applied and which direction runs.
Editing CSV fields
- Rename a field: double-click the CSV Field Name cell.
- Set a function: double-click the Function cell to open the dropdown.
- Reorder fields within a line: use the move up/down actions on a selected field.
- Remove a field: deselect it from the left tree (or use the context menu).
- Save all column names: use the context menu's Save All.
6. Loop Start
Loop Start is the mechanism that turns a repeating EDI group into one CSV row per repetition.
What it is
In the EDI standard, some segments are flagged as loop starts — they mark the beginning of a repeating group (a "loop"), such as an HL hierarchy loop or an LX detail loop. When you load a file, the segment tree marks these segments (they are exactly the segments that are loop starts in the standard and are not envelope segments).
Look for markers in the EDI side of the map Loop column.
How it drives CSV rows
When translating EDI to CSV, each occurrence of a mapped loop-start segment opens a new CSV row. All the fields that follow — up to the next loop-start segment — accumulate into that row. Concretely:
- The CSV line is named after the loop-start segment (and its name is written into the first, "Row Name" column of each emitted row, so the row can be matched back to its loop on the way to EDI).
- A header line (fields with no enclosing loop — e.g. top-level constants, or the
ISAheader row) is emitted as a leading row and its values are carried forward as constants onto every other row. - If a loop repeats without an explicit loop-start boundary (i.e. the standard did not flag the start segment), the app detects the repetition by noticing that a mapped field in the current row is being filled a second time, and opens a fresh row for the same line instead of silently overwriting the value.
What it enables
Loop Start is what makes a looped EDI document produce a flat, row-per-iteration CSV — the shape that a spreadsheet or database import expects.
Caveat: a segment's loop-start flag comes from the standards database. If the standard has no loop-start flag for a particular repeating segment, row boundaries fall back to "a repeated mapped field starts a new row." In unusual documents this heuristic can occasionally mis-group rows; Loop Start + Repeat are the knobs to correct that.
Use Repeat column in mappings and set it to values greater than 1 to force repeated segments that are not Loop Start segments into multiple CSV fields.
7. Segment Repeat
Repeat controls how many consecutive instances of a single segment the mapping covers on one CSV row.
The setting
- Each segment has a Repeat value, editable in the left tree's Repeat column.
- The accepted range is 1 to 100 (default 1). Values are clamped to this range; out-of-range or non-numeric entries fall back to 1.
- The Repeat column is displayed only when the value is greater than 1.
How Repeat works — EDI to CSV
A segment mapped with Repeat = N reserves N sets of CSV fields on its line:
- The first instance of the segment writes into the first set of columns (occurrence 0).
- The second instance writes into the second set (occurrence 1), and so on up to N.
- All N instances land on the same row (the row opened by the enclosing loop start), not as separate rows.
Each extra occurrence's CSV field is keyed internally by an occurrence suffix and, in the UI, shown with a #<n> suffix in the EDI ID (e.g. DTM-01 #2).
Example:
LIN*…~DTM*050*…~DTM*232*…~DTM*233*…withDTMat Repeat = 3 produces one CSV row with three pairs of DTM columns (Qualifier/Date × 3).
How Repeat works — CSV to EDI
On the way back, a segment with Repeat = N rebuilds up to N segment instances, one per filled set of columns:
- Each reserved set whose columns contain data becomes one segment instance.
- Unfilled sets produce no segment (so a partially-filled row does not emit empty segments).
Repeat overruns
If an input file contains more instances of a segment within a loop than its Repeat value, the extra instances cannot be placed into a reserved column. The app:
- Reuses the last reserved slot for the extra instances (so later values can overwrite earlier ones, or spill into separate rows), and
- Emits a warning per offending segment: "Segment '…' has more input instances within a loop than its Repeat value of N allows; extra instances may overwrite values or appear in separate CSV rows. Increase the Repeat value for segment '…' to keep all instances together."
Warnings are listed in the Warnings column of the Translation History (capped by the Repeat warnings max option) and logged.
Click an eye icon to open warnings screen.
Rule of thumb: set Repeat to the maximum number of consecutive instances of that segment you expect inside one loop iteration.
When Repeat is set to number greater than 1 it will emit extra CSV fields to hold additional occurrences of the segment.
8. Translating EDI to CSV
This is the default Output mode.
Switch mapping direction by clicking on EDI to CSV and CSV to EDI button.
Single file
- With a mapping selected, click Translate (toolbar) or File ▸ Translate….
- The app checks that input/output directories are configured (Options) and that at least one rule exists.
- It loads the selected file, builds the segment tree, and matches a rule to determine which mapping to apply (see §11).
- It prompts you for a CSV save path and writes the CSV.
- The result is added to the Translation History.
How the CSV is built
- Each mapped loop-start segment occurrence opens a row; following fields fill that row (§6).
- Repeat groups consecutive segment instances on one row (§7).
- Header fields (no enclosing loop) are carried onto every row and also emitted as a leading row.
- Each row's first column is the Row Name (the CSV line's name). A row writes only its own line's columns, so unrelated loops don't pad every row with empty cells.
- Field functions are applied to each value on export (§10).
- CSV terminators (row/field) come from Options.
- Basic license: output is capped at 500 data rows; extra rows are dropped and a limit banner appears.
The output file name is <input basename>_output[<timestamp>].csv (timestamp only if Append timestamp is enabled).
Retranslate
File ▸ Retranslate re-runs the translation for the last selected file (useful after editing a mapping) without re-selecting the file.
9. Translating CSV to EDI
This is the Input mode — the inverse of EDI-to-CSV. A CSV file plus a saved mapping rebuilds a valid X12 EDI document.
Selecting the direction
The mapping must be in CSV to EDI view mode (toggle in the right panel). In batch translation, CSV input files are routed to an Input-mode mapping by:
- An execution rule whose filename pattern matches the CSV, then
- The first Input-mode mapping whose CSV header columns match the file's header row, then
- The first Input-mode mapping as a fallback.
How the EDI is built
- Each CSV data row drives one pass over the mapping's loop body (the segments belonging to a loop line). A loop block therefore repeats once per CSV row, with CSV values substituted into the mapped element positions.
- Non-loop body segments (constants) are emitted once.
- Header values (from the leading/header row) are carried onto every row.
- A loop iteration is emitted only if the row carries data for at least one segment in that loop; an empty row produces nothing.
- Repeat: a segment with Repeat N rebuilds up to N instances, one per filled set of columns (§7).
- Envelope segments (
ISA,GS,ST,SE,GE,IEA) are always generated, even if the mapping has no explicit envelope mapping. Their CSV values (control numbers, sender/receiver IDs, dates/times) flow back into the envelope when present. - Generated values are filled for fields not supplied by the CSV, in priority order:
- Control numbers (interchange / group / set) come from the Options sequences and are zero-padded to the X12 minimum widths.
- Dates and times (e.g. ISA date
yyMMdd, GS dateyyyyMMdd, timeHHmm) are generated from the current time. - HL / LX counters receive valid sequential values so parent/child dependency numbers stay consistent.
- Sequence numbers are incremented and persisted after a translation, so the next document starts from the following value.
The output file name is <input basename>[<timestamp>].edi.
The round trip
Because EDI-to-CSV and CSV-to-EDI are built from the same mapping, a document can go EDI ▸ CSV ▸ EDI:
- EDI ▸ CSV: the loop starts produce rows, Repeat keeps consecutive instances on one row, and the Row Name column records which loop each row came from.
- CSV ▸ EDI: the Row Name column routes each row back to its loop run, Repeat rebuilds the segment instances, and the envelope + generated values complete the document.
Values you explicitly capture in the CSV (e.g. control numbers, party IDs, dates) round-trip from the CSV rather than being regenerated; values you leave to the app (HL/LX counters, and any control numbers not in the CSV) are generated.
10. Field Functions
Each CSV field can have a function applied to its value during export. Set it from the Function column dropdown (double-click to edit). Available values:
| Function | Effect |
|---|---|
None |
No transformation (default). |
Trim |
Removes leading and trailing whitespace. |
TrimStart |
Removes leading whitespace only. |
TrimEnd |
Removes trailing whitespace only. |
UpperCase |
Converts to upper case. |
LowerCase |
Converts to lower case. |
Notes:
- Unknown or blank functions pass the value through unchanged.
- For envelope/party-ID fields where spacing is meaningful, trim functions are not auto-applied, so literal spacing is preserved.
11. Rules
A rule routes an incoming file to a named mapping. Rules are shared by both EDI and CSV input.
A rule matches on:
- Release (e.g.
005010) - Transaction number (e.g.
850) - Sender ID
- Receiver ID
- Filename pattern (glob,
*and?)
Any field set to * (or left blank) matches any value. For EDI files, the envelope fields are matched in addition to the filename pattern; for CSV files, only the filename pattern applies.
Behaviour:
- No matching rule ▸ the file is skipped (single-file translation shows an error alert listing the observed release/transaction/sender/receiver).
- Multiple rules matching different mappings ▸ the file is skipped as a conflict (in single-file mode you are prompted to resolve).
- Rules are managed in the Rules dialog (Settings ▸ Rules… or the toolbar
Rulesbutton). - Deleting a mapping also removes its rules.
12. Options
Configured via Settings ▸ Options…:
| Option | Purpose |
|---|---|
| Input directory | Folder scanned for input files (single-file and batch). |
| Output directory | Folder where output CSV/EDI files are written. |
| Append date timestamp | Adds a _yyyyMMdd_HHmmss suffix to output file names. |
| Delete input files when done | Removes each input file after it is translated (batch). |
| CSV row terminator | Row separator for CSV output (default \r\n). |
| CSV field terminator | Field separator for CSV output (default ,). |
| Repeat warnings max | Cap on how many per-translation Repeat-overrun warnings are listed in history (default 10). A non-positive value disables history entries (logging is unaffected). |
| Interchange / Transaction Group / Transaction Set sequences | Starting values (1–1,000,000) for generated control numbers in CSV-to-EDI output. |
| Reset Sequences | Resets all three counters back to 1. |
Both directories are required before any translation; if missing, the app prompts you to open Options.
13. Batch Translation
The same batch engine is available without the GUI — see Chapter 14, Command Line Interface.
File ▸ Translate… (with both directories configured) translates every file in the input directory at once:
- Recognized input files:
*.edi,*.txt,*.x12,*.dat, and*.csv(processed in name order). .csvfiles drive the CSV-to-EDI direction; all others drive EDI-to-CSV.- Each file is matched to a mapping by its rules (EDI) or by filename/header (CSV); files with no matching rule or mapping are skipped and reported as errors.
- Output files are written to the output directory with the same base name and the appropriate extension (
.csv/.edi). - A progress bar tracks the run; results (including per-file warnings) are added to the Translation History.
- Delete input files when done (Options) removes each input after a successful translation.
14. Command Line Interface
Besides the graphical app, XTranslator Lite ships a headless command-line interface (CLI) for running translations from a terminal, a cron job / scheduled task, a CI pipeline, or a server with no display. The CLI reuses the exact same mappings, rules, and Options settings as the GUI — nothing about your configuration changes.
Starting the CLI
On an installed application, a dedicated xtranslator-cli binary is provided alongside the GUI launcher; it is already the CLI, so you pass the command directly with no --cli flag:
xtranslator-cli --version
Commands
| Command | What it does | Pro required? |
|---|---|---|
--version |
Prints the application name and version. | No |
--license |
Prints the active license mode and its details (email, expiry) for a Pro license. | No |
--mappings |
Lists the data-directory path and every named mapping in the local store. | No |
--translate [inDir] [outDir] |
Translates every file in the input directory once, then exits. | Yes |
--watch [inDir] [outDir] |
Watches the input directory and translates files as they appear, until you stop it. | Yes |
--help |
Prints the usage text. | No |
Omitting the command (running just --cli) prints the help text.
Directories
Both --translate and --watch accept optional [inDir] [outDir] arguments:
- If a directory is omitted, the value saved in Settings ▸ Options is used.
- The input directory must already exist.
- The output directory is created automatically if it does not exist.
If the required directory is missing from both the command line and Options, the CLI prints a message and exits with status 2.
One-shot translation (--translate)
xtranslator-cli --translate /data/in /data/out
The CLI scans the input directory, translates every recognized file, and prints a per-file line followed by a summary:
Starting translation of 3 file(s).
[1/3] 837A.txt
ok: 837A.csv (42 rows, mapping "837 Claim")
[2/3] claims.csv
skipped: no Input-mode mapping matched this CSV file, skipping.
[3/3] 270.dat
ok: 270.csv (18 rows, mapping "270 CA")
Finished: 2 succeeded, 1 failed, 3 total.
Behaviour mirrors GUI batch translation (see Chapter 13):
- Recognized input files:
*.edi,*.txt,*.x12,*.dat,*.csv(processed in name order). .csvfiles drive CSV-to-EDI; all others drive EDI-to-CSV.- Each file is routed to a mapping by its rules (EDI) or by filename/header (CSV); files with no match are skipped and reported.
- Output files are written to the output directory with the same base name and the appropriate extension (
.csv/.edi). - Delete input files when done (Options) and Append date timestamp (Options) apply exactly as in the GUI.
Continuous translation (--watch)
xtranslator-cli --watch /data/in /data/out
--watch is the unattended, always-on mode. It:
- Prints
Watching <inDir> every 10s; press Ctrl-C to stop.on start. - First sweeps whatever is already in the input directory, so files dropped before you started are not left behind.
- Then re-scans every 10 seconds, translating only files it has not already handled (identified by name + size + last-modified time, so a file replaced with the same name is picked up again).
- Runs until you stop it — press Ctrl-C to stop cleanly. The in-flight file finishes so no half-written output is left behind.
Licensing in the CLI
--translate and --watch require an active Pro license. If you are in Basic mode, the CLI refuses to run and prints:
The command --translate requires a Pro license, but this installation is running in Basic mode.
Please purchase a Pro license and activate it in XTranslator-Lite under Help > License, then run the CLI again.
Run --cli --license to see the currently active license.
The informational commands (--version, --license, --mappings, --help) stay available in Basic mode so you can diagnose the situation. See Chapter 15, Licensing.
Single-instance behaviour
The CLI uses the same data directory (and embedded database) as the GUI, so only one can run at a time. If the GUI is already open, the CLI prints:
XTranslator is already running; the CLI cannot use the same data directory.
and exits with status 1.
Exit status codes
| Code | Meaning |
|---|---|
0 |
Success (or a clean --watch stop, and --help). |
1 |
Another instance is already holding the data directory. |
2 |
Usage error, missing directory, no Pro license, or a translation run in which at least one file failed. |
Note:
--translateexits2if any file in the run is skipped or fails, even when other files succeeded — check the summary line to see which files were affected. This is useful for schedulers: a non-zero exit tells you the run was not fully clean.
15. Licensing
XTranslator Lite runs in Basic or Pro mode:
- Basic (default, no token): CSV output is capped at 500 data rows per file. When a file would produce more, the output is truncated and a limit banner appears.
- Pro: unlimited rows and Pro-gated features (e.g. custom validation rules are enforced only in Pro mode).
A Pro license is a JWT token stored in the user settings. The app validates that the token is structurally valid, is issued for this application, is of type pro, and has not expired. The title bar shows the active mode (… — Pro License / … — Basic License), and a near-expiry notice is shown when a Pro license is close to expiring. Manage the token in Settings ▸ License….
16. Importing & Exporting Mappings
- Export (File ▸ Export Mapping…) writes the current mapping and its associated rules to a YAML file.
- Import (File ▸ Import Mappings…) merges mappings from a YAML file into the local store; the imported mapping is selected as the active one.
This makes it easy to share or back up mappings between machines.