Home / Help Center / pos-app-wholesale / wholesale / Order Intake
📥 wholesale

Order Intake

Order Intake turns a free-form order message — copied from WhatsApp, email or a typed note — into a structured draft order by parsing each line for a quantity and product name, then attempting to match that name against your product catalog before you review and submit it as a real wholesale order.

📍 Menu path: Wholesale → Order Intake
👤 Who uses it: All roles with the Billing feature enabled

Overview

Parsing is done line-by-line with four regex patterns covering common formats ("10 x Name", "Name - 10", "Name: 10", "10 Name") — lines that don't match any pattern are listed separately as "skipped".

Each line that does parse into a quantity + name is then fuzzy-matched against your product list using a simple case-insensitive substring check (the parsed name contains the product name, or vice versa) — the first match found wins, so ambiguous or partial names can match the wrong product.

Matched items get productId, unit and pricePerUnit pre-filled from the matched product's current selling price; unmatched items get pricePerUnit 0 and unit "piece" and must be filled in manually before creating the order.

Every field (product name, quantity, unit, price) is editable in the results table before you submit — nothing is written to the database until you click "Create Wholesale Order".

Creating the order sends plain items (no tax context, no wholesaleCustomerId) to the same POST /wholesale/orders endpoint used by Wholesale Orders — tax is still auto-calculated server-side for items that carry a productId.

Before You Start

Step-by-Step Guide

1 Parse a pasted order message

  1. Open Wholesale → Order Intake and paste the order text into the left-hand box (one item per line).
  2. Click "Parse Order". A summary appears showing total lines, how many parsed, and how many were skipped.
  3. Any lines that could not be parsed at all are listed under "Skipped lines (could not parse)" — rewrite them manually in the item table on the right, or fix the source text and re-paste.

2 Review and correct parsed items

  1. Each parsed line appears as a row with a "✓ matched" or "? unlinked" badge — unlinked rows have no productId and default to ₹0 price and unit "piece".
  2. Edit Product name, Qty, Unit or Price directly in the table; for unlinked items you must set a price manually or the line will contribute ₹0 to the order.
  3. Click the × on a row to drop an item you don't want to include.

3 Create the order

  1. Enter a Customer Name (required — this is free text, the same as a manual order, not a picker over your Customers or Wholesale Customers lists).
  2. Click "Create Wholesale Order" — a success toast shows the generated order number, and the form resets so you can paste the next message.
  3. The new order appears on the Wholesale Orders page in DRAFT status, exactly as if it had been entered by hand.

Every Field & Button, Explained

Field / ButtonWhat it does
Paste order message (textarea)Free-form text; each line is parsed independently. Blank lines and separator lines (e.g. "---") are ignored.
Parse Order buttonDisabled until there is text and while a parse request is in flight; calls POST /wholesale/orders/intake/parse.
Parse summary ("N lines • N parsed • N skipped")N parsed is items successfully split into quantity+name; N skipped is lines that matched none of the four regex patterns.
✓ matched / ? unlinked badgeMatched means the parsed product name was found (via substring match) in your product catalog and a real productId was attached; unlinked means no catalog match was found, so the row starts at ₹0 and must be priced manually.
Product (editable)The parsed or matched product name; can be freely retyped, but retyping does not re-run catalog matching — it is stored as plain text on the order line.
Qty / Unit / Price ₹Editable per-line values; Price × Qty recomputes the line total live as you type.
Customer Name *Required free-text field; must be filled before "Create Wholesale Order" is enabled.
TotalSum of Qty × Price across all rows shown in the table — this is a client-side estimate; the actual order total returned by the server also adds tax for any matched item.

Tips & Best Practices

Troubleshooting & FAQ

A line I know should parse ends up in "Skipped lines".
The parser only recognizes four specific line shapes: "10 x Name", "Name - 10" (or ":"), "Name 10 ", and "10 Name". A line with, for example, two numbers (a quantity and a price on the same line) or unusual punctuation will not match any pattern and is skipped outright — rewrite it manually in the results table.
A parsed item shows "✓ matched" but linked to the wrong product.
Matching is a simple case-insensitive substring check against all products (parsed name contains the product name, or the product name contains the parsed name) — the first product found this way is used. With short or overlapping product names this can attach to a similar but incorrect product; always review the matched Product name before submitting.
An unlinked item still shows a tax amount / doesn't show a tax amount after the order is created.
Tax is calculated server-side per item only when the item has a productId. Unlinked items are sent with productId null, so they always get 0 tax regardless of what you type as the price — only items that show "✓ matched" (or that you manually re-link by picking the exact matching product name so it resolves on the server) will get a real tax calculation.
I want to attach this order to one of my Wholesale Customer accounts to apply their discount/credit limit.
This screen doesn't support that — Customer Name here is free text sent straight to createWholesaleOrder with no wholesaleCustomerId, so no Wholesale Customer discount, credit hold or credit limit check is ever applied to orders created through Order Intake. Create or adjust the order afterwards from Wholesale Orders if you need those checks.