Flxpector Validation Reference
Flxpector — EDI Validation Reference
This document describes Flxpector's validation logic for Flxpoint EDI files using the X12 004010VICS standard.
How Validation Works
Flxpector validates against Flxpoint-specific rules, not just the generic X12 004010 standard. This means:
- The rules define which segments are Required (R), Optional (O), or Not Used (N)
- The rules define which element codes are allowed (e.g., only specific SAC codes)
- The rules define element lengths, types, and conditional relationships
- Flxpector checks every segment/element against these rules
Validation Hierarchy
Level 1: Structural Validation - Is the envelope valid? (ISA/GS/ST/SE/GE/IEA) - Are control numbers matching? (SE02=ST02, GE02=GS06, IEA02=ISA13) - Are segment counts correct? (SE01, GE01, IEA01) Level 2: Segment Validation - Are all Required (M) segments present? - Are segments in the correct order? - Are segments within allowed loop repetitions? Level 3: Element Validation - Are all Required (M) elements present within each segment? - Do element values match allowed code lists? - Do element lengths meet min/max requirements? - Are data types correct? (ID, AN, N, N0, N2, R, DT, TM) Level 4: Conditional/Relational Validation - C (Condition): If element A present -> elements B,C must be present - E (Exclusive): Only one of elements A,B,C can be present - L (List): If element A present -> at least one of B,C must be present - P (Paired): If any of A,B,C present -> all must be present - R (Required): At least one of A,B,C must be present
Error Types Flxpector Catches
1. Missing Required Segments
What: A segment marked Required/Mandatory is not present in the EDI file.
Example: Missing TD5 in 856 (carrier details), missing BIG in 810, missing BIA in 846.
Severity: Fatal — transaction will not validate.
2. Missing Required Elements
What: An element within a segment that is marked Mandatory is missing or empty.
Example: TD503 (SCAC code) missing from TD5 segment in 856. This is the #1 failure for 856 files.
Severity: Fatal.
3. Invalid/Unknown Code Values
What: An element value doesn't match the allowed code list.
Example: Using SAC02=D240 (Freight) when FLX only allows G821 (Shipping). Using an unrecognized service level code in TD512.
Severity: Fatal — the code is not in the accepted values.
4. Incorrect Data Format
What: Element value doesn't match expected data type or format. Example: Date not in CCYYMMDD format, ISA date not in YYMMDD format, numeric field containing letters. Severity: Fatal.
5. Element Length Violations
What: Element value is shorter than minimum or longer than maximum length. Example: ISA06 not exactly 15 characters (must be right-padded with spaces), ISA13 not exactly 9 digits. Severity: Fatal.
6. Segments Out of Order
What: Segments appear in wrong sequence relative to the defined order. Example: DTM appearing before BEG in an 850, IT1 appearing in the heading section. Severity: Fatal.
7. Conditional Rule Violations
What: Relational conditions between elements are not met. Example 810 ITD: If ITD03 (discount %) is present, then ITD04, ITD05, or ITD13 must also be present. Example 856 N1: If N1-03 is present, N1-04 is required (Paired condition). Example 810 CAD: If CAD07 is present, CAD08 is required. Example 810 ISS: If ISS03 (weight) is present, ISS04 (unit) is required. Severity: Fatal.
8. Control Number Mismatches
What: Trailer control numbers don't match their header counterparts. Example: SE02 != ST02, GE02 != GS06, IEA02 != ISA13. Severity: Fatal.
9. Incorrect Segment/Group Counts
What: SE01 doesn't match actual segment count, GE01 doesn't match transaction set count, IEA01 doesn't match functional group count. Severity: Fatal.
10. Loop Repetition Exceeded
What: A loop repeats more times than allowed. Example: More N1 loops than the max use allows. Severity: Warning or Fatal depending on configuration.
FLX-Specific Validation Rules
846 Inventory Advice
| Check | What Flxpector Validates | Common Failure |
|---|---|---|
| BIA01 | Must be 00 (Original) | Wrong purpose code |
| BIA02 | Must be MM | Wrong report type |
| REF01 | Must be IA | Wrong qualifier |
| LIN02 | Must be SK, UP, or EN | Unsupported qualifier |
| LIN03 | Max 48 chars, must be unique | Duplicate SKU across items |
| QTY01 | Must be 33 | Wrong quantity qualifier |
| QTY03 | EA (Each) | FLX accepts simple element format |
850 Purchase Order
| Check | What Flxpector Validates | Common Failure |
|---|---|---|
| BEG01 | Must be 00 | Wrong purpose code |
| BEG02 | Must be SA | Wrong order type |
| CUR02 | Must be USD | Wrong currency |
| REF01 | Must be IA | Wrong qualifier |
| TD512 | Must be D3/ND/SC/SI/SP | Unsupported service level |
| N901 | Must be CO | Wrong qualifier for customer order |
| N101 | Must be ST (ship-to) or BT (bill-to) | Wrong entity code |
| PO103 | Must be EA | Wrong unit of measure |
| PO106 | Must be SK, UP, or EN | Unsupported qualifier |
856 Ship Notice
| Check | What Flxpector Validates | Common Failure |
|---|---|---|
| BSN01 | Must be 00 | Wrong purpose code |
| BSN05 | Must be 0001 or 0004 | Wrong hierarchy structure |
| TD502 | Must be 2 (SCAC) | Missing = #1 FAILURE |
| TD503 | Must have valid SCAC code | Missing carrier = FAIL |
| TD512 | Service level code (required by FLX) | Missing service level |
| HL03 | Must be S/O/P/I in correct hierarchy | Wrong level codes |
| REF01 at shipment | CN for tracking | Wrong qualifier |
| MAN01 at pack | CP for package tracking | Wrong qualifier |
| REFCN + MANCP | Mutually exclusive | Both present = error |
| N101 | Must be SF (Ship From) | Wrong entity |
| N103 | Must be 92 | Wrong code qualifier |
| LIN02 | UP, EN, SK, or BP | Wrong product qualifier |
| SN103 | Must be EA | Wrong unit |
810 Invoice
| Check | What Flxpector Validates | Common Failure |
|---|---|---|
| BIG01 | Date: current or within 17 months | Future date or too old |
| BIG04 | PO Number required | Missing PO reference |
| REF*DP | DP qualifier with value | Missing department number |
| ITD01 | Must be 01/02/05/08/12 | Wrong terms code |
| ITD conditionals | Discount fields pairing | Missing paired discount field |
| IT103 | Must be EA | Wrong unit |
| IT105 | Must be QT/LE/WE | Wrong price basis |
| IT106 | Must be UP/EN/SK/BP | Wrong product qualifier |
| TDS01 | N2 type (implied decimal) | Sending 12.00 instead of 1200 |
| SAC02 | Whitelist: G821/C310/D240/F050 (Faiyaz 2026-04-16) | Codes outside the whitelist produce warnings, not errors |
| CAD04 | SCAC required if CAD present | Missing carrier code |
| CAD07->CAD08 | If CAD07 present, CAD08 required | Missing reference number |
| ISS03->ISS04 | If weight present, unit required | Missing weight unit |
Flxpector vs Flxpoint Processing — Decision Matrix
Use this to determine what to do when Flxpector validation and Flxpoint processing disagree:
| Scenario | Flxpector | FLX | Action |
|---|---|---|---|
| Missing required segment | FAIL | FAIL | Fix it — both reject |
| Missing SCAC in TD5 | FAIL | FAIL | Fix it — critical |
| QTY03 as simple element | PASS | PASS | FLX accepts simple format |
| Non-unique ISA13 | WARN | PASS | Best practice to fix, not required |
| Extra CTP segment | PASS | IGNORE | Harmless — FLX ignores it |
| SAC code outside G821/C310/D240/F050 | WARN | May skip | Use a whitelisted code; Flxpoint won't auto-rewrite SAC (that would mislabel charge types) |
| Strict element lengths | FAIL | PASS (sometimes) | Fix if possible, FLX may forgive |
| Control number mismatch | FAIL | FAIL | Always fix |
| Conditional rule violation | FAIL | FAIL (usually) | Fix it |
Key Takeaway
Flxpector validates against FLX-specific rules that are a superset of what Flxpoint processes. Files that pass Flxpector will work in FLX. Flxpector also catches issues that Flxpoint's processing might silently ignore — catching these early prevents downstream problems.
Something unclear?
Ask our AI assistant — it knows this spec and can explain any segment, error, or rule in plain English.