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:

  1. The rules define which segments are Required (R), Optional (O), or Not Used (N)
  2. The rules define which element codes are allowed (e.g., only specific SAC codes)
  3. The rules define element lengths, types, and conditional relationships
  4. Flxpector checks every segment/element against these rules

Validation Hierarchy

code
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

CheckWhat Flxpector ValidatesCommon Failure
BIA01Must be 00 (Original)Wrong purpose code
BIA02Must be MMWrong report type
REF01Must be IAWrong qualifier
LIN02Must be SK, UP, or ENUnsupported qualifier
LIN03Max 48 chars, must be uniqueDuplicate SKU across items
QTY01Must be 33Wrong quantity qualifier
QTY03EA (Each)FLX accepts simple element format

850 Purchase Order

CheckWhat Flxpector ValidatesCommon Failure
BEG01Must be 00Wrong purpose code
BEG02Must be SAWrong order type
CUR02Must be USDWrong currency
REF01Must be IAWrong qualifier
TD512Must be D3/ND/SC/SI/SPUnsupported service level
N901Must be COWrong qualifier for customer order
N101Must be ST (ship-to) or BT (bill-to)Wrong entity code
PO103Must be EAWrong unit of measure
PO106Must be SK, UP, or ENUnsupported qualifier

856 Ship Notice

CheckWhat Flxpector ValidatesCommon Failure
BSN01Must be 00Wrong purpose code
BSN05Must be 0001 or 0004Wrong hierarchy structure
TD502Must be 2 (SCAC)Missing = #1 FAILURE
TD503Must have valid SCAC codeMissing carrier = FAIL
TD512Service level code (required by FLX)Missing service level
HL03Must be S/O/P/I in correct hierarchyWrong level codes
REF01 at shipmentCN for trackingWrong qualifier
MAN01 at packCP for package trackingWrong qualifier
REFCN + MANCPMutually exclusiveBoth present = error
N101Must be SF (Ship From)Wrong entity
N103Must be 92Wrong code qualifier
LIN02UP, EN, SK, or BPWrong product qualifier
SN103Must be EAWrong unit

810 Invoice

CheckWhat Flxpector ValidatesCommon Failure
BIG01Date: current or within 17 monthsFuture date or too old
BIG04PO Number requiredMissing PO reference
REF*DPDP qualifier with valueMissing department number
ITD01Must be 01/02/05/08/12Wrong terms code
ITD conditionalsDiscount fields pairingMissing paired discount field
IT103Must be EAWrong unit
IT105Must be QT/LE/WEWrong price basis
IT106Must be UP/EN/SK/BPWrong product qualifier
TDS01N2 type (implied decimal)Sending 12.00 instead of 1200
SAC02Whitelist: G821/C310/D240/F050 (Faiyaz 2026-04-16)Codes outside the whitelist produce warnings, not errors
CAD04SCAC required if CAD presentMissing carrier code
CAD07->CAD08If CAD07 present, CAD08 requiredMissing reference number
ISS03->ISS04If weight present, unit requiredMissing weight unit

Flxpector vs Flxpoint Processing — Decision Matrix

Use this to determine what to do when Flxpector validation and Flxpoint processing disagree:

ScenarioFlxpectorFLXAction
Missing required segmentFAILFAILFix it — both reject
Missing SCAC in TD5FAILFAILFix it — critical
QTY03 as simple elementPASSPASSFLX accepts simple format
Non-unique ISA13WARNPASSBest practice to fix, not required
Extra CTP segmentPASSIGNOREHarmless — FLX ignores it
SAC code outside G821/C310/D240/F050WARNMay skipUse a whitelisted code; Flxpoint won't auto-rewrite SAC (that would mislabel charge types)
Strict element lengthsFAILPASS (sometimes)Fix if possible, FLX may forgive
Control number mismatchFAILFAILAlways fix
Conditional rule violationFAILFAIL (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.