Practical guide

How to validate a TMS CSV file before importing freight data

Validate file structure before interpreting freight fields, and validate the interpreted rows before writing records. A well-formed file can still contain shifted columns, ambiguous decimals or duplicate shipments.

Agree the file contract

Pin the delimiter, encoding, headers and field types.

RFC 4180 describes a commonly used CSV format, including quoted fields. Make the partner’s dialect explicit rather than assuming every export follows it. Use a parser that understands quotes and line breaks inside a field; splitting a line on commas is not sufficient.

Keep source identifiers as strings, and distinguish an empty field from an absent column. Preview the parsed counts and mapping revision before applying changes.

Worked example

One quoted address should not shift the columns.

A synthetic export has a quoted consignee address containing a comma, a shipment ID with leading zeroes, and a decimal string in a partner-specific format. Verify the address stays in one column, the ID is unchanged and the decimal is interpreted only under the agreed format. Quarantine the row if the chosen source contract cannot resolve it.

Acceptance checks

Test a rejected row without duplicating valid shipments.

Related resources

Continue with a scoped check.

Check CSV headers in the local readiness scanner

Prevent false merges after import

Software direction

Make transport data issues visible before the handoff.

Explore the public demo and compare proposed software plans. Paid access is not open yet.

Compare plans