See how Freehand recovers margin you're already losing

Map your commercial agreements to real-world execution - recovering 2-5% in lost margins and ensuring 100% audit coverage.

What to expect in the call

We identify exactly where you’re leaking margins

See how our AI Teams cross-check contracts, and resolve overcharges

Get a savings estimate based on your current spend and systems.

Trusted & Recognized by

KEARNEY
pwc
Gartner

We'll find $500,000 in 30 days

All Articles

GL Coding: What It Is and Why Freight Makes It Hard

GL coding assigns freight charges to the right account and cost center. Learn how it works, why freight invoices complicate it, and how to automate it.

Craig Edwards

Head of Solutions Consulting (US GTM Team)

14

mins

GL coding is the process of assigning a general ledger account, cost center, and other reporting dimensions (department, location, project) to a transaction before it posts to the books. For freight invoices specifically, a single shipment can carry charges that legitimately split across multiple cost centers, which is why freight GL coding breaks more often than standard vendor invoice coding.

Key Takeaways

  • GL coding is the assignment of a transaction to a general ledger account plus supporting dimensions like cost center, department, and location, so it lands in the right place on the financial statements.
  • A standard vendor invoice usually maps to one account and one cost center; a freight invoice often needs to split across several, by origin, destination, mode, or business unit.
  • Coding rules, based on lane, mode, and shipment direction, are what make freight GL coding consistent instead of case-by-case guesswork.
  • A dollar amount that's correct but coded to the wrong cost center still triggers a correction cycle later, so accuracy in coding matters as much as accuracy in the invoice total.
  • Manual GL coding at freight AP volume doesn't scale past a sample; rules-based or automated coding is what keeps the first pass right instead of relying on a later reconciliation to catch it.

What is GL coding?

GL coding is how an accounting system decides where a dollar amount belongs.

Every transaction needs an account code (is this a freight expense, an asset, an accrual) and usually a set of dimensions underneath it: which department incurred it, which cost center owns the budget, which project or business unit it should report against.

The mechanism is a lookup: transaction details go in, coding rules match them against the chart of accounts and cost center structure, and a code comes out. Done correctly, that code never needs to be touched again. Done wrong, someone in accounting has to trace it back and recode it, often weeks after the invoice already posted.

In practical terms, GL coding is the difference between a general ledger that reflects reality and one that requires a manual true-up every close cycle to actually mean something.

Why is GL coding for freight invoices different from a standard vendor invoice?

A standard vendor invoice, an office supply order or a software subscription, usually maps to one account and one cost center.

One vendor, one purpose, one code. Freight invoices rarely work that way.

A single truckload can span multiple business units if it's a consolidated shipment. A parcel invoice can bundle charges across departments if it's billed weekly rather than per shipment. Accessorial charges (detention, liftgate, residential surcharge) sometimes belong on a different account than the base linehaul charge entirely, even on the same invoice. That means freight GL coding needs rules that account for lane, mode, direction (inbound versus outbound), and shipment structure, not just "which vendor sent this."

The single biggest pain point in freight GL coding is exactly this split. A coder (or a coding rule) has to decide how one invoice divides across multiple cost centers, when a standard AP invoice never asks that question at all.

What do freight GL coding rules actually look like?

Coding rules route a charge to the correct account and cost center based on shipment attributes rather than treating every freight invoice the same way.

A typical rule set works from origin and destination (which business unit or region owns this lane), mode (LTL, truckload, parcel, and rail often post to different account structures), and direction (inbound freight is often capitalized differently than outbound freight, a distinction covered in more depth in our guide to freight accounting).

How do you assign general ledger codes to a freight invoice?

Assigning a GL code comes down to four steps, whether a person or a rules engine is doing it.

Step 1: Identify the invoice's coding-relevant attributes

Pull the origin, destination, mode, direction, and charge type (base linehaul versus accessorial) off the invoice. These are the attributes any coding rule needs to make a decision.

Step 2: Match those attributes against the coding rule set

Compare the attributes to the rule set that maps lane, mode, and direction to a specific account and cost center. A consolidated shipment or a multi-charge invoice may match more than one rule, one per portion of the invoice.

Step 3: Assign the account, cost center, and dimensions

Apply the matched account code plus any supporting dimensions (department, location, project) the chart of accounts requires. Split proportionally across cost centers if the invoice covers more than one.

Step 4: Validate before the entry posts

Confirm the coded entry against the invoice total before it posts to the ledger. This is the step manual processes skip most often under volume, which is exactly where miscoding accumulates.

Worked example

A shipment moves from a manufacturing plant in Ohio to a distribution center in Texas, and the invoice includes a base linehaul charge plus a detention fee. A coding rule set routes the linehaul charge to the Texas distribution center's freight-in cost center, based on destination, while the detention fee routes to a separate operational-exceptions account, since it reflects a dock delay rather than the cost of moving the goods.

Without that rule, both charges land in one bucket, and the exceptions account, the one finance actually wants to monitor for recurring dock problems, never accumulates the data that would surface the pattern.

What happens when GL coding is wrong?

Four error types account for most of the downstream cost, and none of them are visible until someone traces a number back to its source.

Error typeImmediate effectDownstream cost
Wrong cost centerBudget owner sees an expense that isn't theirsManual correction, disputed ownership between departments
Wrong account (expense vs. accrual)Financial statement misstates the periodRestatement or adjusting entry at close
Inconsistent coding across similar shipmentsFreight cost by lane or mode can't be compared period over periodSpend analysis becomes unreliable, decisions based on bad data
Coded after the fact instead of at invoice receiptClose cycle slows down waiting on manual recodeDelayed month-end close, more analyst hours per cycle

A dollar amount that's correct but coded to the wrong cost center still isn't done.

A global retail and grocery chain running 1,100+ stores across 31 carriers had over $2M in freight costs misallocated across its store network every year, coarse coding that couldn't attribute which shipment belonged to which store, so regional managers were running P&Ls on numbers that were already wrong before anyone reviewed them. Moving GL coding from manual, invoice-by-invoice judgment calls to rules-based routing applied at intake cut analyst workload on coding by 81% and shortened the freight audit cycle by 67%.

What are the benefits of accurate GL coding?

Every benefit of accurate GL coding is the direct inverse of the errors above.

  1. Financial statements reflect reality: Expenses land in the account and period they actually belong to, with no restatement needed at close.
  2. No correction cycle: A dollar amount coded right the first time never triggers a recode, a disputed cost-center ownership conversation, or a journal entry rework.
  3. Cost-center P&Ls are trustworthy: Regional and departmental managers see freight costs that actually belong to them, not a coarse allocation that quietly misattributes spend.
  4. Freight spend becomes comparable period over period: Consistent coding by lane and mode is what makes a spend analysis or a carrier negotiation decision reliable instead of built on shifting data.
  5. Month-end close moves faster: Coding at invoice receipt instead of after the fact removes the wait for manual recodes that otherwise delays close.
  6. Analyst time goes to exceptions, not routine coding: The same rules-based routing that cut analyst workload by 81% in the case above frees analysts to work the coding decisions that actually need judgment.
  7. Budget disputes between departments drop: When cost centers are coded correctly the first time, there's no after-the-fact argument over which team's budget absorbs a shared shipment's cost.

How do you automate GL coding for freight?

Automating GL coding means encoding the routing logic (lane, mode, direction, cost center ownership) into rules that apply the moment an invoice or accrual is created, rather than relying on an accounting team member to make the same judgment call thousands of times a month.

That requires the underlying invoice data to already be structured and validated, since a coding rule can only route a charge correctly if it knows what the charge actually is and whether it's accurate in the first place.

Freehand's GL coding agent applies these rules automatically to invoices that have already passed rate and accessorial validation, so the account and cost center assignment happens on the first pass instead of getting corrected during close. This works alongside automated freight accruals, which apply the same coding logic at tender time rather than waiting for the invoice to arrive.

{{blue-cta}}

What are the best practices for coding invoices consistently across a team?

Consistency across a team comes from removing individual judgment calls, not from training everyone to make the same judgment call the same way.

  • Codify the rule set once, in one place: A shared rule set that maps lane, mode, and direction to an account and cost center means two analysts coding the same shipment type reach the same answer, instead of each applying their own interpretation.
  • Document exceptions as they're found, not just the standard cases: The accessorial-splits-onto-a-different-account pattern from earlier in this article is exactly the kind of exception that needs to be written down, not left to whoever happens to catch it that month.
  • Audit a sample against the rule set periodically, not just at close: Catching drift between what the rule set says and what's actually being coded before month-end prevents the reclass backlog that shows up when a controller only checks at close.
  • Automate the repetitive matching, and route only genuine exceptions to a person: Removing the routine lane/mode/direction lookup from manual work is what actually eliminates the person-to-person variance a written policy alone can't.

What's the ROI of getting GL coding right the first time?

The direct cost of bad GL coding is analyst hours: recoding transactions, tracing budget disputes between departments, and reworking journal entries during close.

The indirect cost is worse for finance leadership specifically, since freight spend that's inconsistently coded by lane or cost center can't be reliably compared period over period, which means the spend analysis a CFO or VP of Logistics relies on for negotiation and budgeting decisions is built on a shifting foundation. Getting coding right on the first pass, not the corrected pass, is what makes freight spend data trustworthy enough to act on.

{{brown-cta}}

Freight GL coding only works if the invoice data feeding it is accurate. A rules engine routing a correct dollar amount to the right cost center is still an improvement over manual coding, but it's a bigger one when the dollar amount itself has already been checked against the contracted rate. Freehand validates invoices first, then codes them, so the number landing in your general ledger is both accurate and in the right place.

Frequently Asked Questions

What's the difference between GL coding and invoice coding?

Invoice coding is the broader AP term for assigning any transaction to an account and dimensions before payment. GL coding specifically refers to the general ledger account assignment piece of that process.

Does GL coding happen before or after invoice approval?

It can happen at either point, but coding before approval (or even at tender, before the invoice arrives) means finance sees accurate cost-center data immediately instead of waiting for a post-payment correction.

Can GL coding rules differ by business unit?

Yes. Multi-entity or multi-region companies often need separate coding rule sets per business unit, since cost center structures and chart-of-accounts conventions frequently differ across entities even within the same company.

Is GL coding the same as cost allocation?

They're related but not identical. GL coding assigns a specific account and cost center to a transaction; cost allocation is the broader practice of splitting a shared cost (like a consolidated shipment) across multiple cost centers or business units proportionally.

How granular should GL codes be?

As granular as what finance actually acts on, and no more. Store-level or business-unit-level coding is worth the setup if managers make decisions at that level; coding beyond what anyone reviews just adds maintenance overhead without adding insight.

Why do coding errors keep surfacing at month-end, requiring the controller to reclass entries?

This almost always traces back to coding after the invoice posts instead of at receipt. Recoding after the fact turns every miscoded entry into a month-end correction; coding at intake against a validated rule set is what removes the reclass backlog entirely.

Every Invoice Checked. Every Charge Verified.

Freehand reads each carrier invoice against your contracted rates and flags the variance before you pay it. No sampling, no backlog.

Freight Moves Your Business - And Quietly Drains Margin.

Most AP teams process freight invoices without checking the charges against contracted rates. Overcharges live in the parts nobody double-checks.

Try Freehand
Gartner Research

Every warehouse. Every provider. Every mile.

Gartner's 2026 outlook on logistics outsourcing, and how AI Teams hold every contract to the terms you agreed.

  • Where outsourced logistics quietly loses margin
  • Why billed charges drift from the contract
  • How AI Teams close the gap
download now

More related blogs

Carrier Contract Management: Impact on Invoice Accuracy

Industry

Fuel Surcharge: What It Is and How to Verify It's Correct

Industry

Freight Class: How It's Determined, and Where It Gets Disputed

Industry