Margin by customer is 22% in the ERP, 19% in the CRM and 17% in the books, and rebates and freight explain most of the gap.
Distributors run an ERP or inventory system for orders and item cost, Salesforce or HubSpot for accounts and reps, and QuickBooks for the books. Each calculates margin on a different cost: standard cost, the cost on the day of the quote, or landed cost after freight and rebates. Mercury11 reads all three, finds where margin diverges by customer and product line, and records the cost definition the company decides on.
The systems this usually runs on
- ERP or inventory system (export)
- QuickBooks
- Salesforce
- HubSpot
- Shopify (B2B storefront)
- Stripe
- Freight and carrier invoices (export)
- Google Sheets (rebate tracker)
- Anything else: drop an export
Three costs, three margins
The ERP prices every order line at standard or average cost when it ships. The CRM shows the margin the rep quoted, at the cost on the day of the quote. QuickBooks shows cost of goods after inventory adjustments, inbound freight, duties and the vendor rebate check that arrives a quarter later. On a customer buying $1.4M a year, three points of difference is $42,000 of margin, and the sales VP, the branch manager and the controller each defend a different one.
Rebates and freight live outside all three
Vendor rebates are earned on purchases and booked when the vendor pays, often as one credit to cost of goods per quarter, so margin jumps in March, June, September and December. Customer rebates and growth incentives are promised in a contract and tracked in a spreadsheet until they are paid. Outbound freight is billed on some orders, absorbed on orders over the free-freight threshold, and the carrier invoice arrives two or three weeks after the shipment. None of these sits on the order line, which is where every margin-by-customer report starts.
The three definitions this kind of company argues about
Each is written the way it would be in Mercury11: one sentence, with a name and a date, that every answer runs on. Change them to match how your company works. Written down and applied to every answer, they are what governing the numbers AI answers from looks like in practice.
Landed cost
Margin is calculated on landed cost: vendor cost plus inbound freight and duty. Vendor rebates are accrued monthly at each program's rate on qualifying purchases and trued up when the vendor pays.
Customer rebates
Customer rebates and growth incentives reduce that customer's revenue in the month the qualifying sale ships, accrued at the contracted rate, and are trued up when paid.
Freight billed and absorbed
Freight billed to customers is revenue. Carrier cost for every outbound shipment is cost of sale for the order it shipped with, including orders that ship free over the $1,500 threshold.
Connect your ERP export and QuickBooks first
The ERP holds the order lines, so it comes first, as a daily or weekly export of invoiced lines (invoice number, customer, branch, SKU, quantity, extended price, extended cost), or as a custom integration on the Enterprise plan. QuickBooks connects by sign-in. The first comparison is margin on the ERP lines against cost of goods in the books, by month and branch. Salesforce or HubSpot follows by sign-in for the rep and account view.
Q3 gross margin in the ERP ran 2.4 points above QuickBooks: $523,200 on $21.8M of sales. Almost all of it posts as a single journal entry on the last day of each month.
A month-end lump that the order lines never see usually means a cost booked at the ledger level, such as inbound freight or an inventory adjustment, outside the ERP's item cost.
Is the month-end entry inbound freight, and should margin by customer include it?
Saved as a rule · applies to every answer, dashboard and report from now on
Locations, brands and business units
Each branch or warehouse is a business unit, and so is each product division that runs its own P&L (an industrial MRO line and a janitorial line, for example). An acquired distributor joins as its own unit with its own ERP export until it is migrated, and inherits the company’s margin rules from the first day. Stock transferred between branches is intercompany, moved at cost and never counted as a sale by the sending branch. Warehouse and delivery-fleet costs shared by branches are spread with an allocation rule.
Questions people ask in the first week
Questions people ask
Our ERP is also our ledger. Does Mercury11 still work?
Yes. If NetSuite, Acumatica, Epicor or another ERP holds both the orders and the books, its reports (invoiced lines, the trial balance, inventory valuation) come in as exports or as a custom integration on the Enterprise plan. The comparison then runs between order-line margin and the ERP's own general ledger, which disagree for the same reasons.
Can margin be reported by sales rep?
Yes, once the company agrees who the rep is. The CRM usually holds the account owner and the ERP holds the salesperson on the order. When they differ, a rule says which wins, and the rules library has common answers under rep attribution.
Our vendor rebate programs live in a spreadsheet. Is that a problem?
No. Connect the Google Sheet or upload the workbook and it is read like any other source, with each program's rate and tiers. The landed-cost rule then decides whether rebates are accrued per purchase or booked when received, and every margin figure lists which.
See it on your own numbers.
Connect the two systems that never quite agree. Mercury11 shows you where they differ, by how much, and asks its first question before the day is out. You will need someone who knows how the business defines its numbers. You will not need an engineer.