Wholesale guide · Phase 1
Gmail/Outlook RFQ → Excel → QuickBooks Online: Exact Field Mapping, Tax-Code Traps & Duplicate-Invoice Prevention
A wholesale RFQ looks simple in the inbox: a customer asks for 40 cases of one SKU, 12 cartons of another, freight to a jobsite, and a price before noon. The work behind it is not simple. A rep has to identify the customer, translate customer language into real SKUs, check case packs and minimum order quantities, apply the right tier price, protect margin, decide whether freight is taxable, and create a document that QuickBooks Online will accept later.
This guide treats that work as a pipeline with three controlled stages: RFQ email intake → normalized Excel table → QuickBooks Online import or API write. The goal is not to remove the rep. The goal is to stop silent failures before they become rejected CSV files, duplicate invoice numbers, wrong tax codes, or margin leaks.
1. Why the email → Excel → QBO quoting loop breaks at $2M+ volume
The manual loop survives for a long time because every individual step feels small. Open the email. Search the price list. Copy the SKU. Check the customer’s tier. Calculate freight. Paste the result into a quote template. Later, create the invoice in QuickBooks.
At $2M+ annual volume, the problem is rarely one big mistake. It is repetition. A distributor processing 30 RFQs per workday handles roughly 660 RFQs per month. If each RFQ has four lines, that is 2,640 pricing decisions. Every line carries several chances to fail:
- the customer uses an alias instead of your real SKU;
- the rep quotes an each price for a case of 12;
- a 20% markup is mistaken for a 20% margin;
- the MOQ is met in units but not in the vendor-required case increment;
- freight is entered as a negative or untaxed line;
- the invoice number is too long or already exists in QuickBooks.
Email makes the problem worse because it is unstructured input. Outlook and Gmail store conversations, not quote lines. Excel can hold structured data, but only if you force every RFQ into the same columns. QuickBooks is stricter still: its native batch invoice CSV import is limited to 100 invoices and 1,000 rows per file, and it does not support negative amounts, line discounts, or credit memos. Intuit documents those constraints in its batch invoice import instructions.
So the correct mental model is not “export a spreadsheet when the quote is done.” It is design the spreadsheet around the constraints of the final system before the rep starts pricing.
2. The exact field-by-field mapping table
Use one Excel row per invoice line. Repeat the document number, customer, and dates on every line; that is how multi-line invoice imports are grouped. Keep a few operational columns in Excel even when QuickBooks does not import them. Those columns are how you audit the batch later.
The QBO CSV headers below follow the common sample-template names such as InvoiceNo, Item(Product/Service), and ItemTaxCode. QuickBooks sometimes displays friendlier labels with spaces in the mapping screen. The safe rule is simple: download the current sample CSV from your own QuickBooks company and keep its headers verbatim.
| RFQ email field | Excel column | QBO CSV header | QBO API path | Max chars | Forbidden chars | Failure mode |
|---|---|---|---|---|---|---|
| Gmail/Outlook message ID | Source_Message_ID |
Not imported | Not posted; internal control | Not applicable | None | Same email processed twice after a retry |
| Customer or company name | Customer_Display_Name |
Customer |
CustomerRef / customer DisplayName |
100 | :, tab, quotes in DisplayName |
Customer mismatch, duplicate customer, or failed create |
| Quote or invoice number | Document_Number |
InvoiceNo |
DocNumber |
21 | Long external IDs; unsafe separators | Error 6140 or two documents colliding after shortening |
| RFQ received date | Invoice_Date |
InvoiceDate |
TxnDate |
Date field | Ambiguous text dates | Wrong posting date or rejected date format |
| Customer required-by date | Due_Date |
DueDate |
DueDate |
Date field | Ambiguous text dates | Due date conflicts with payment terms |
| Payment terms | Terms |
Terms |
SalesTermRef |
Name-dependent | Names not in QBO | Terms not found; due date becomes wrong |
| Customer PO or delivery note | Customer_Memo |
Memo |
CustomerMemo.value |
4,000 | Uncontrolled line breaks in CSV | Rows split inside the CSV or important PO text is lost |
| Your SKU | Item_Name |
Item(Product/Service) |
Line[].SalesItemLineDetail.ItemRef |
Item Name 31 | Names that do not match existing items | Item not found or wrong product selected |
| Customer SKU alias / description | Line_Description |
ItemDescription |
Line[].Description |
4,000 | Smart quotes, control characters | Encoding corruption or unreadable customer-facing line |
| Quantity | Quantity |
ItemQuantity |
Line[].SalesItemLineDetail.Qty |
Numeric | Text such as "approx." | Quantity parse failure or incorrect extension |
| UOM / case pack | Quote_UOM + Units_Per_UOM |
No native invoice-line UOM column | No standard line UOM path | Not applicable | Mixing EA, CS, BX without conversion | Case quoted at each price or quantity rounded into a broken pack |
| Unit price | Net_Unit_Price |
ItemRate |
Line[].SalesItemLineDetail.UnitPrice |
Numeric | Currency symbols, commas, more than 2 decimals | Rate parse failure, penny drift, or margin below floor |
| Extended line amount | Line_Amount |
ItemAmount |
Line[].Amount |
Numeric | Negative discount amounts in native CSV import | Import rejects the row or line math does not reconcile |
| Tax treatment | Tax_Code |
ItemTaxCode |
Line[].SalesItemLineDetail.TaxCodeRef |
Company-dependent | Codes not active in the QBO company | Tax-code mismatch or wrong sales-tax calculation |
Three details matter more than the table first suggests.
First, ItemRef is not your SKU text. In the API, the line points to a QuickBooks item object. In a CSV import, QuickBooks uses the item name to find that object. If your Excel sheet contains a customer alias, the import may fail even though the alias is correct customer language. Keep customer aliases in a crosswalk tab and resolve them to your real item name before export.
Second, QBO field limits are not forgiving. Intuit’s API documentation lists a maximum of 21 characters for DocNumber, 100 for customer DisplayName, and 31 for item Name; it also forbids characters such as :, tabs, and quotes in DisplayName. Those limits are documented in the QuickBooks Online API reference. Do not learn them at upload time.
Third, UOM is a process field, not a QBO invoice-line field. QuickBooks does not give the native invoice CSV a real case-pack conversion layer. Excel must convert CS, BX, EA, PK, and manufacturer pack sizes before the file is exported. If the customer asks for 40 boxes but your price list is per each, the conversion has to happen before ItemQuantity and ItemRate are written.
3. The 3 QuickBooks tax-code traps
Sales tax is where a technically valid CSV can still produce the wrong invoice. Intuit warns that tax codes must match when Automated Sales Tax is enabled in the batch-import instructions linked above. In production, three traps cause most of the damage.
Trap 1: Automated Sales Tax is not the same thing as manual tax codes
Automated Sales Tax calculates tax using the company, customer, item, and location data QuickBooks knows. Manual tax codes are labels your file may carry row by row. If your CSV says TAX but the active company list uses a different code, or if the item is configured differently in QuickBooks, the import can fail or post with a different treatment than the rep expected.
The control is boring but effective: keep a pasted or exported list of active QBO tax codes in a validation tab. Before export, compare every Tax_Code value to that list. Do not let reps type tax codes from memory.
Trap 2: Exempt customers still need line-level discipline
A tax-exempt contractor, reseller, school, or nonprofit may be exempt in QuickBooks. That does not mean every spreadsheet row will automatically inherit the correct result. The line still has to reconcile with the customer certificate, item taxability, ship-to state, and QuickBooks customer record.
Store the exemption status on the customer master, not in a rep’s inbox search history. Add columns for Customer_Tax_Status and Exemption_Certificate_On_File in Excel. Then make the tax output explicit: taxable, exempt, or needs review. “Blank because someone probably knows” is not a tax decision.
Trap 3: Freight is not universally taxable or universally exempt
Freight taxability depends on the state, the item being shipped, whether freight is separately stated, and how the service is configured in QuickBooks. A freight line copied from a taxable order into an exempt or out-of-state order can be wrong even when every SKU is correct.
Create a real QuickBooks service item such as FREIGHT-OUT or SHIPPING-SVC. Give it a deliberate tax mapping. Then require the rep or automation to choose the tax treatment from a controlled list. If you operate across states, document the states where you treat separately stated freight differently. For tax decisions, confirm the rule with your CPA or state guidance; the operational point is that the file must make the decision explicit.
4. Preventing Error 6140 and duplicate invoices
Error 6140 is QuickBooks telling you the document number already exists. The obvious cause is uploading the same CSV twice. The more expensive cause is a partial failure.
Imagine a 90-invoice file. Eighty invoices import. Ten fail because one item name is wrong. A coordinator fixes the item, uploads the original file again, and now receives a wall of duplicate-number errors. The first eighty invoices already exist. If the coordinator then edits numbers manually to force the file through, the audit trail becomes worse.
Use a four-part control:
- Turn on custom transaction numbers if your process depends on external quote or invoice numbers. If QuickBooks is allowed to assign numbers, your pipeline does not really control
DocNumber. - Use short deterministic numbers. A format such as
Q-260204-018orI-260204-018is readable, sortable, and far below the 21-character API limit. Put the customer’s long PO inMemoor a custom field, not in the document number. - Keep a posted-number ledger. This can be an Excel table, a Google Sheet, or a small database in n8n. Before export, check whether the proposed number was already posted. After a successful import, mark it posted with batch ID and timestamp.
- Retry only failed rows. Split the original batch into
posted,failed_fixable, andneeds_review. Never re-upload the full file because re-uploading is what creates duplicates.
The 21-character limit matters even when you never type a number longer than that. External systems often generate IDs such as RFQ-2026-02-04-ACME-000184. If a middleware step truncates that value to fit QBO, two different external IDs can collapse into the same first 21 characters. Design the QBO number yourself instead of letting a hidden truncation rule design it for you.
5. Handling wholesale line discounts and freight without breaking the CSV import
The native batch import does not support negative charges such as discounts or credit memos. That constraint changes how wholesale discounts should be represented.
For CSV import: use net price adjustment
If a customer receives a 5% contract discount, calculate the net unit price in Excel before export. For example, a $100 list price with a 5% discount becomes a $95 unit rate. Keep these audit columns in Excel:
List_Unit_PriceDiscount_PctNet_Unit_PriceDiscount_ReasonMargin_After_Discount
The exported QBO row uses Net_Unit_Price. The customer-facing quote can still explain that contract pricing was applied. The accounting file does not need a negative line to prove that the discount exists.
A separate negative discount item may be possible through a different API or app flow, but it is not the right design for the native batch CSV importer. If the customer contract explicitly requires a visible discount line, treat that requirement as a system requirement. Use the API or an import tool that supports discount objects; do not pretend the native CSV supports it.
Freight is a positive service item
Freight should normally be a positive service line using a dedicated QuickBooks item. That gives you control over description, amount, and tax treatment. It also separates freight margin from product margin. A liftgate fee, residential delivery surcharge, or small-order fee should not be hidden inside a product SKU price unless that is a deliberate pricing policy.
For line math, calculate in integer cents inside your validation process. A row is clean only when round(quantity × net unit price, 2) equals the exported line amount. This sounds strict because it is strict. Penny drift becomes a real reconciliation problem when hundreds of rows move through the file.
6. Automating the intake step — and what still breaks
Before automating the inbox, fix the Excel layer. The cheapest useful improvement costs nothing: add a Customer_Aliases tab with two columns, What_Customer_Calls_It and Real_SKU. Then add explicit rule columns to the price list: MOQ, Increment, Units_Per_Buy_UOM, Tier_A_Price, Min_Margin_Floor_Pct, and Freight_Zone_Surcharge. A rep should never quote from memory when a rule exists in the sheet.
Once the sheet is controlled, the first practical automation is a queue builder:
- Watch
quotes@yourcompany.comin Gmail or Outlook. - Save PDF and spreadsheet attachments into a dated Drive or SharePoint folder.
- Append one row per email to a
Daily_RFQ_Queuesheet with message ID, sender, subject, received time, attachment links, and status. - Notify the inside-sales channel only when a new, unseen message ID arrives.
Make is usually the easier starting point for a non-technical team because email, file, and sheet modules are visual. n8n is stronger when you have a technical operations person who needs deterministic JavaScript, branching, self-hosting, or tighter control over retries. In either tool, the message ID is important: it is the first defense against processing the same email twice.
What still breaks? Three things.
UOM conversion. Automation can copy “40 boxes” into a sheet. It cannot know whether the customer means 40 inner boxes, 40 cases, or 40 each unless your item master says so.
Alias SKUs. A model can extract the customer’s words, but extraction is not resolution. The alias crosswalk must learn corrections over time.
Margins and approval. Do not let a language model invent pricing math. It can help classify or summarize text, but margin floors, MOQs, tier prices, and freight rules should run in deterministic code. A human should approve the quote before it goes back to the customer.
That is the same duct-tape wall the old version of this playbook warned about: a simple Gmail-to-sheet flow removes copying, but it does not enforce policy. It cannot reliably remember that this customer’s “blue flange” means SKU FLG-4-BLUE, that the item sells only in increments of six, or that a 22% margin floor makes the requested discount impossible.
7. Run a pre-flight check before it hits QBO
The last stage should be a validator, not hope. Before a CSV or API write reaches QuickBooks, check the batch for the exact failures that waste hours:
- more than 100 unique invoices or 1,000 rows in one file;
- document numbers over 21 characters or duplicated after shortening;
- customer names over 100 characters or containing forbidden characters;
- item names over 31 characters or not present in QuickBooks;
- negative discount lines, credit memos, or negative amounts;
- quantity × rate not equal to the line amount after rounding;
- inactive or unknown tax codes;
- missing MOQ, increment, UOM, or margin-floor validation.
Start with the wholesale RFQ margin checker. It tests the commercial side of the quote: margin floors, UOM conversion, MOQs, increments, markup-versus-margin mistakes, and freight adders. Then use the QBO/Xero CSV validator before upload to catch file-format and accounting-system failures.
This order matters. A file can pass QBO’s character rules and still lose money because a case was quoted at an each price. It can also be commercially correct and still fail because one tax code is wrong. The safe pipeline checks both sides before the customer-facing quote or invoice is created.
The end state is not a fully automatic factory. It is a controlled queue: email becomes structured data, structured data becomes validated quote lines, and only validated lines reach QuickBooks. That is what makes the system dependable at wholesale volume.
Free browser tool
Check the quote math before it leaves Gmail
Use the wholesale RFQ margin checker to test MOQ, margin-floor, UOM, and freight rules before a quote goes out.
Questions operators ask
FAQ
How many invoices can I import into QuickBooks Online in one CSV file?
QuickBooks Online batch invoice import supports up to 100 invoices and 1,000 rows per spreadsheet. A multi-line invoice uses one row per line, so a file with 100 five-line invoices is already 500 rows. Split larger exports before upload and keep a source batch ID outside QBO.
Why does QuickBooks Online reject my discount line?
The native batch invoice CSV import does not support negative amounts, line discounts, or credit memos. For CSV imports, calculate the net unit price in Excel before export. If the customer must see a separate discount line, use the API, an import app, or a controlled manual step instead of the native CSV path.
What causes QuickBooks Error 6140?
Error 6140 means QuickBooks found a duplicate document number. It often happens when a batch is uploaded twice, a partial failure is retried without removing posted rows, or two long external IDs collapse into the same short DocNumber. Keep DocNumber at 21 characters or fewer and maintain a posted-number ledger.
Can I import quotes or estimates into QuickBooks Online by CSV?
The native batch CSV import covered here is for invoices. Estimates and quotes need the QuickBooks API, a connected import app, or a manual conversion after the customer accepts. Do not design a wholesale quoting process that assumes native estimate CSV import exists.
Is Xero or QuickBooks Online better for this workflow?
For this exact workflow, neither is automatically better. QBO is common when your US CPA already works in QuickBooks. Xero is often cleaner for teams that want simpler user access and a consistent API. Choose based on your accountant, item limits, tax setup, and how much automation you plan to run.
QuoteGuard
Stop checking every RFQ by hand
QuoteGuard runs these checks on every emailed RFQ automatically — margin floors, MOQs, UOM conversions — and drafts a branded PDF quote for one-click approval. Join the waitlist.