Truckload (TL) carrier contracts are typically priced on a per-mile basis — the freight cost for a shipment is calculated by multiplying the agreed rate per mile by the distance between the origin and destination. To do this, OTM needs to know the distance for every lane it plans.
OTM supports two approaches to sourcing distances:
- Distance Lookup (manual upload): The business team maintains a table of pre-defined distances between city pairs or zip codes and uploads them into OTM. This is the approach covered in this topic — the DISTANCE_LOOKUP file in the upload sequence stores these values.
- Third-party distance providers: OTM can integrate with mileage calculation applications such as PC*MILER or MileMaker. When a rate is configured to use one of these providers, OTM calls the external application at runtime to fetch the exact mileage rather than relying on a stored value.
OTM allows TL rate contracts to be loaded using CSV files instead of manual UI entry. This is the most efficient approach when setting up rates for multiple lanes or carriers.
Six CSV files must be uploaded in a specific order — each file builds on data created by the previous one:
- File 1 — X_LANE: Define the lane (origin and destination geography)
- File 2 — RATE_OFFERING: Define the rate offering header (carrier, mode, weight limits)
- File 3 — DISTANCE_LOOKUP: Assign a distance to the lane
- File 4 — RATE_GEO: Link the rate offering to the lane
- File 5 — RATE_GEO_COST_GROUP: Create a cost group container
- File 6 — RATE_GEO_COST: Define the actual rate amount
How to upload:
Select the file type from the dropdown, choose your CSV file, and click Upload. Repeat for each file in the order listed above.
File 1 — X_LANE
Defines the lane — the origin and destination geography. OTM matches Order Releases to lanes by comparing their source and destination against these city, state, and country values.
Key fields:
YOUR_DOMAIN.YOUR_LANE_XIDCHICAGO_IL-DALLAS_TXCITY for point-to-point TL ratesCITY for point-to-point TL ratesCSV Template — copy, save as .csv, and replace values for your lane:
X_LANE
X_LANE_GID,X_LANE_XID,SOURCE_CITY,SOURCE_PROVINCE_CODE,SOURCE_COUNTRY_CODE3_GID,SOURCE_GEO_HIERARCHY_GID,DEST_CITY,DEST_PROVINCE_CODE,DEST_COUNTRY_CODE3_GID,DEST_GEO_HIERARCHY_GID,DOMAIN_NAME
YOUR_DOMAIN.CHICAGO_IL-DALLAS_TX,CHICAGO_IL-DALLAS_TX,CHICAGO,IL,USA,CITY,DALLAS,TX,USA,CITY,YOUR_DOMAINFile 2 — RATE_OFFERING
Defines the rate offering header — the carrier, transport mode, rate service, and shipment weight constraints. This is the top-level container for the rate.
Key fields:
TL for TruckloadUSDYOUR_DOMAIN.TLYOUR_DOMAIN.SOLO for solo driver or YOUR_DOMAIN.TEAM for team driver — must exist in your domainYOUR_DOMAIN.DEFAULT if no custom version has been created_UOM_CODE column (e.g. LB) and a _BASE column (same numeric value, used internally by OTM for unit conversion).YOUR_DOMAIN.MILEMAKER or YOUR_DOMAIN.PC_MILER. Must match what you use in DISTANCE_LOOKUP.Y to activate the rate offering2 total, 1 pickup, 1 delivery.CSV Template:
RATE_OFFERING
RATE_OFFERING_GID,RATE_OFFERING_XID,RATE_OFFERING_TYPE_GID,SERVPROV_GID,CURRENCY_GID,TRANSPORT_MODE_GID,RATE_SERVICE_GID,RATE_VERSION_GID,MIN_WEIGHT_CONSTRAINT,MIN_WEIGHT_CONSTRAINT_UOM_CODE,MIN_WEIGHT_CONSTRAINT_BASE,MAX_WEIGHT_CONSTRAINT,MAX_WEIGHT_CONSTRAINT_UOM_CODE,MAX_WEIGHT_CONSTRAINT_BASE,RATE_DISTANCE_GID,IS_ACTIVE,TOTAL_STOPS_CONSTRAINT,PICKUP_STOPS_CONSTRAINT,DELIVERY_STOPS_CONSTRAINT,STOPS_INCLUDED_IN_RATE,DOMAIN_NAME
YOUR_DOMAIN.TL_RATE_001,TL_RATE_001,TL,YOUR_DOMAIN.YOUR_CARRIER,USD,YOUR_DOMAIN.TL,YOUR_DOMAIN.SOLO,YOUR_DOMAIN.DEFAULT,20000,LB,20000,40000,LB,40000,YOUR_DOMAIN.MILEMAKER,Y,2,1,1,2,YOUR_DOMAINFile 3 — DISTANCE_LOOKUP
Assigns a pre-defined distance to the lane. OTM uses this stored value when calculating freight cost rather than computing distance dynamically at runtime.
Key fields:
MI for miles, KM for kilometresCSV Template:
DISTANCE_LOOKUP
X_LANE_GID,RATE_DISTANCE_GID,DISTANCE_VALUE,DISTANCE_VALUE_UOM_CODE,DISTANCE_VALUE_BASE,DOMAIN_NAME
YOUR_DOMAIN.CHICAGO_IL-DALLAS_TX,YOUR_DOMAIN.MILEMAKER,920,MI,920,YOUR_DOMAINFile 4 — RATE_GEO
Links a Rate Offering to a Lane. One Rate Offering can cover multiple lanes — each lane gets its own RATE_GEO record.
Key fields:
{RATE_OFFERING_XID}_{X_LANE_XID}Y to activate this lane within the rate offeringCSV Template:
RATE_GEO
RATE_GEO_GID,RATE_GEO_XID,RATE_OFFERING_GID,X_LANE_GID,IS_ACTIVE,DOMAIN_NAME
YOUR_DOMAIN.TL_RATE_001_CHICAGO_IL-DALLAS_TX,TL_RATE_001_CHICAGO_IL-DALLAS_TX,YOUR_DOMAIN.TL_RATE_001,YOUR_DOMAIN.CHICAGO_IL-DALLAS_TX,Y,YOUR_DOMAINFile 5 — RATE_GEO_COST_GROUP
Creates a cost group under the Rate Geo. The cost group is a container for one or more rate cost lines — for example, a base line-haul rate and a fuel surcharge would each be a separate sequence under the same cost group.
Key fields:
1 for a single cost groupCSV Template:
RATE_GEO_COST_GROUP
RATE_GEO_COST_GROUP_GID,RATE_GEO_COST_GROUP_XID,RATE_GEO_GID,RATE_GEO_COST_GROUP_SEQ,DOMAIN_NAME
YOUR_DOMAIN.TL_RATE_001_CHICAGO_IL-DALLAS_TX,TL_RATE_001_CHICAGO_IL-DALLAS_TX,YOUR_DOMAIN.TL_RATE_001_CHICAGO_IL-DALLAS_TX,1,YOUR_DOMAINFile 6 — RATE_GEO_COST
Defines the actual freight cost — the rate amount, currency, unit of measure, and effective dates.
Key fields:
1 for a single rate line. Add additional rows with incrementing sequences to add multiple cost components (e.g. base rate on sequence 1, fuel surcharge on sequence 2).USDMI for a per-mile rate, FLAT for a flat rate1SHIPMENT.DISTANCE for a per-mile rate, leave blank for a flat rateYYYYMMDDHH24MISS, e.g. 20260101000000 for 1 Jan 2026CSV Template:
RATE_GEO_COST
RATE_GEO_COST_GROUP_GID,RATE_GEO_COST_SEQ,CHARGE_AMOUNT,CHARGE_CURRENCY_GID,CHARGE_AMOUNT_BASE,CHARGE_UNIT_UOM_CODE,CHARGE_UNIT_COUNT,CHARGE_MULTIPLIER,EFFECTIVE_DATE,EXPIRATION_DATE,DOMAIN_NAME
EXEC SQL ALTER SESSION SET NLS_DATE_FORMAT = 'YYYYMMDDHH24MISS'
YOUR_DOMAIN.TL_RATE_001_CHICAGO_IL-DALLAS_TX,1,1.99,USD,1.99,MI,1,SHIPMENT.DISTANCE,20260101000000,,YOUR_DOMAIN