TL Rates — CSV Upload

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.
Configuring a third-party distance provider (Rate Distance) is a separate setup topic that will be covered in a future post. The RATE_DISTANCE_GID field in the files below must reference whichever distance source your environment is using — either a lookup table or a third-party provider already configured in OTM.

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:

Business Process Automation > Integration > Integration Manager > Upload an XML/CSV Transmission

Select the file type from the dropdown, choose your CSV file, and click Upload. Repeat for each file in the order listed above.

Note: Every CSV file must follow this structure: the first row is the object name, the second row is the column header, and data starts from the third row. OTM will reject files that do not follow this format.

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:

X_LANE_GID: Full GID of the lane — format: YOUR_DOMAIN.YOUR_LANE_XID
X_LANE_XID: Unique ID for this lane within the domain. Use a naming convention that clearly identifies the lane, e.g. CHICAGO_IL-DALLAS_TX
SOURCE_CITY / SOURCE_PROVINCE_CODE / SOURCE_COUNTRY_CODE3_GID: Origin city, state or province code, and 3-character country code
SOURCE_GEO_HIERARCHY_GID: Granularity of the origin geography — use CITY for point-to-point TL rates
DEST_CITY / DEST_PROVINCE_CODE / DEST_COUNTRY_CODE3_GID: Destination city, state or province, and country code
DEST_GEO_HIERARCHY_GID: Granularity of the destination geography — use CITY for point-to-point TL rates
DOMAIN_NAME: Your OTM domain

CSV 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_DOMAIN

File 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:

RATE_OFFERING_GID / RATE_OFFERING_XID: GID and unique ID for this offering. The XID becomes the name visible in OTM.
RATE_OFFERING_TYPE_GID: Use TL for Truckload
SERVPROV_GID: GID of the carrier (Service Provider) in OTM — must already exist in your domain
CURRENCY_GID: Currency for the rate, e.g. USD
TRANSPORT_MODE_GID: Transport mode GID defined in OTM, e.g. YOUR_DOMAIN.TL
RATE_SERVICE_GID: Rate service GID defined in OTM, e.g. YOUR_DOMAIN.SOLO for solo driver or YOUR_DOMAIN.TEAM for team driver — must exist in your domain
RATE_VERSION_GID: Rate version — use YOUR_DOMAIN.DEFAULT if no custom version has been created
MIN_WEIGHT_CONSTRAINT / MAX_WEIGHT_CONSTRAINT: Minimum and maximum shipment weight this rate applies to. Each requires a _UOM_CODE column (e.g. LB) and a _BASE column (same numeric value, used internally by OTM for unit conversion).
RATE_DISTANCE_GID: Distance provider GID used to calculate mileage — e.g. YOUR_DOMAIN.MILEMAKER or YOUR_DOMAIN.PC_MILER. Must match what you use in DISTANCE_LOOKUP.
IS_ACTIVE: Y to activate the rate offering
TOTAL_STOPS_CONSTRAINT / PICKUP_STOPS_CONSTRAINT / DELIVERY_STOPS_CONSTRAINT: Maximum stops allowed on a shipment. For a simple point-to-point TL rate: 2 total, 1 pickup, 1 delivery.
STOPS_INCLUDED_IN_RATE: Number of stops included in the base rate before extra-stop charges apply

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_DOMAIN

File 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:

X_LANE_GID: GID of the lane created in File 1
RATE_DISTANCE_GID: Distance provider GID — must match the value used in RATE_OFFERING
DISTANCE_VALUE: Distance between origin and destination
DISTANCE_VALUE_UOM_CODE: Unit of measure — MI for miles, KM for kilometres
DISTANCE_VALUE_BASE: Same numeric value as DISTANCE_VALUE (used internally by OTM for unit conversion)

CSV 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_DOMAIN

File 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_GEO_GID / RATE_GEO_XID: GID and unique ID for this record. Recommended convention: {RATE_OFFERING_XID}_{X_LANE_XID}
RATE_OFFERING_GID: GID of the Rate Offering created in File 2
X_LANE_GID: GID of the Lane created in File 1
IS_ACTIVE: Y to activate this lane within the rate offering

CSV 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_DOMAIN

File 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:

RATE_GEO_COST_GROUP_GID / RATE_GEO_COST_GROUP_XID: GID and unique ID. Typically the same value as RATE_GEO_GID.
RATE_GEO_GID: GID of the Rate Geo created in File 4
RATE_GEO_COST_GROUP_SEQ: Sequence number — use 1 for a single cost group

CSV 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_DOMAIN

File 6 — RATE_GEO_COST

Defines the actual freight cost — the rate amount, currency, unit of measure, and effective dates.

Important: Row 3 of this file must contain the date format declaration exactly as shown in the template below. This tells OTM's database how to parse the date columns. Do not remove or modify this line.

Key fields:

RATE_GEO_COST_GROUP_GID: GID of the Cost Group created in File 5
RATE_GEO_COST_SEQ: Sequence number — use 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).
CHARGE_AMOUNT: The rate amount
CHARGE_CURRENCY_GID: Currency code, e.g. USD
CHARGE_AMOUNT_BASE: Same numeric value as CHARGE_AMOUNT
CHARGE_UNIT_UOM_CODE: Unit of measure for the charge — MI for a per-mile rate, FLAT for a flat rate
CHARGE_UNIT_COUNT: Number of units per calculation — typically 1
CHARGE_MULTIPLIER: What OTM multiplies CHARGE_AMOUNT by — use SHIPMENT.DISTANCE for a per-mile rate, leave blank for a flat rate
EFFECTIVE_DATE: Date this rate becomes active — format YYYYMMDDHH24MISS, e.g. 20260101000000 for 1 Jan 2026
EXPIRATION_DATE: Date this rate expires — leave blank for no expiry

CSV 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

Questions & Discussion

Have a question about this topic? Post it below using your GitHub account. Comments are visible to everyone and help other OTM consultants with the same question.