Skip to main content

Code invoice line items with GL accounts

Your environment may differ

Field names and available options like cost centers, departments, item types, charge categories, and validation rules are configured for each customer's accounting setup. The exact labels you see may differ from this article. That's by design.

GL coding assigns a general ledger account to each line item on an invoice. It keeps every expense categorized correctly in your accounting system.

Line items table with the GL account dropdown open on one row, showing the configured GL values

Line items table with the GL account dropdown open on one row, showing the configured GL values.

How line items get coded

Three ways, often working together.

Agent suggestions

The agent suggests GL codes for each line item based on:

  • Vendor history. How you have coded this vendor's invoices in the past.
  • Line item descriptions. What the line says (for example, "printer paper" suggests Office Supplies).
  • Patterns across your organization. How similar line items have been coded.

Suggestions appear pre-filled on line items. You can accept or change them.

Agent instructions (automation)

Your company's Agent instructions can encode coding conventions. For example, the instructions can say "code all invoices from Staples to account 5200" and the agent applies that automatically. Agent-instruction behavior overrides the agent's default suggestion when a convention matches.

Manual coding

You pick the GL account yourself from a searchable dropdown. Useful for one-off invoices, new vendors without history, or cases where neither suggestions nor Agent instructions have the right answer.

Code a line item

GL coding lives on freeform expense lines, which the platform shows in the Expenses tab of the invoice detail page (the Items tab is for item-master-backed lines and inherits coding from the matched item).

  1. Open the invoice detail page from the invoices list.
  2. In the row of tabs in the right-side panel area, click the Expenses tab. The tab shows the dollar total of expense lines next to its label (for example, Expenses 12,645.30 USD).
  3. The Expenses tab shows each expense line with description, quantity, unit price, line total, and per-line action buttons including Search GL account…, Search cost center…, Search project…, plus additional dimension fields hidden under a Show N more fields expander.
  4. To code a line, click Search GL account… on that line. A search popover opens.
  5. In the popover's search field, type an account number (for example, 5200) or a keyword (for example, office supplies). Matching accounts appear below the search field as you type. You can also scroll the list and click the small triangle to the left of any parent account to expand its children.
  6. Click the account you want. The popover closes, and the GL Account on the line now shows the selected account number and name.

GL Account search popover open under a Search GL account button on an Expenses-tab line item, with 5200 typed in the search field and matching accounts shown below

GL Account search popover open under a Search GL account button on an Expenses-tab line item, with 5200 typed in the search field and matching accounts shown below.

Items vs Expenses
  • Items tab — line items backed by your ERP's item master (catalogued products with SKUs). GL coding for these comes from the item master record by default; you don't pick a GL account per invoice line.
  • Expenses tab — freeform expense lines (consulting fees, one-off purchases, anything not in the item master). These DO require a GL account per line, set as described above.

If an invoice has both Items and Expenses lines, you only do GL coding on the Expenses lines.

Dimension coding

Beyond GL accounts, line items can carry dimension values (cost center, department, project, and others, depending on your ERP). Dimension fields sit next to the GL account field on each line. See Dimensions.

Split coding

Some invoices need a line item split across multiple GL accounts. For example, a consulting invoice might go 60% to Operations and 40% to Marketing. Mod AI supports split coding so you can allocate portions to different accounts.

Fix coding with Copilot

If you need to change coding across many line items, type the request into the Copilot chat bar. Review the diff and accept or reject. Faster than clicking through every row.

tip

Review the agent's suggestions. They improve over time as it learns your coding patterns. The more invoices the system processes, the less manual coding you do.

We use cookies to understand how visitors use our site.