OrderStorePrice
What the store charged for one order line sent without a unitPrice. Store pricing: a line without unitPrice (omitted, or an empty string) is priced by the store when the order is dispatched, under the store's price rule (the store owner sets it in the console, per store or per integration): register, the default, charges what the store's register charges, over the whole order: the regular price, sale prices with their limits, package prices (such as 3 for $5) and package sales, case prices, mix and match groups priced together, minimum purchases, scheduled price changes and the customer's contract price (found by the order's phone); order_screen charges what the store's own Customer Orders screen charges (the item's regular price, or the customer's dollar contract price; no sale, no deal). Lines without a unitPrice for the same product are priced as one register line. A deal the register charges as a line total that is not a whole number of cents per unit is posted as the same product at two unit prices a cent apart, or, at a store that does not allow the same product twice in one order, as the product at its regular price and an adjustment line carrying the saving; storePrices shows the line total and those parts. A line with a unitPrice is never repriced; it counts toward a minimum purchase at its own price. Under register, the customer the order lands on (by its phone) also gets the percent discount the store's register gives that customer, taken off the lines the store priced (never off a line with a unitPrice, which still counts toward the customer's minimum for the discount) and posted as savings lines without a product code, one per tax class; storeDiscount shows it. order_screen gives none, like the Customer Orders screen. The store refuses to price a line, and the order parks (dispatchState parked; the dispatchError starts [INVALID_LINE] and names the line, its code and the reason; send the order again with a unitPrice on that line) when: the register would price it together with a line you priced (the same product with a quantity deal, or the same mix and match group); the item is in a buy-one-get-one group; a sale is limited per customer; the customer's contract price is a percentage (register rule); a rule the store runs while pricing may change the line and what it does cannot be proven (the reason names the rule), or a scheduled price depends on a condition; the customer's discount cannot be determined with certainty (for example it depends on the age of the customer's balance, a password prompt, or how the order is paid); the store gives discounts by loyalty points; the item is sold by weight and the line has no weight, or the register prices a weighed item with a quantity deal; the item is sold by price-embedded labels, or the code carries its own price or weight; the item is not for sale, inactive, or the register asks for its price; the price is 0; the same product is on two lines at a store that may not allow it (send one line); on the order_screen rule, the store turned off automatic prices on customer orders (POS preference #348); or the store cannot determine the product, the customer, a setting or the price with certainty. A store agent or relay that does not price lines yet parks the order unsent with [AGENT_STORE_PRICING_UNSUPPORTED] or [RELAY_STORE_PRICING_UNSUPPORTED] (a line with a weight is gated the same way); it never lands at a zero price.
Type: object.
| Name | Type | Description |
|---|---|---|
line required | integer | The line's position in the order's lines, from 1. At least 1. |
priceRule required | string | The store's price rule the line was priced under: register (what the store's register charges) or order_screen (what the store's Customer Orders screen charges). One of: register, order_screen. |
priceSource required | string | Where the price came from: regular (the item's regular price), scheduled (a scheduled price change in effect, register rule), sale (the sale price, register rule), contract (the customer's contract price), or the register's deal: package (a package price such as 3 for $5), package_sale, case (the case price for full cases), case_sale, mix (a mix and match group priced together). One of: regular, scheduled, sale, contract, package, package_sale, case, case_sale, mix. |
productCode required | string | The line's productCode as the order sent it. |
unitPrice required | string | What the store charged per unit (per pound for a weighed line), a decimal string with two decimals; never 0. For a line posted in parts, the first part's price (lineTotal is the line's total). Pattern: ^[0-9]{1,6}\.[0-9]{2}$ |
lineTotal | string | What the store booked for the line: for a weighed line weight times unitPrice cut to the cent as its invoice keeps it (1.37 lb at 3.49 is 4.78); for a line the register rule priced, the register's line total (3 of a 3 for 5.00 deal is 5.00). Absent for a counted line priced under the order_screen rule. Pattern: ^[0-9]{1,6}\.[0-9]{2}$ |
parts | array of object | Present when the line was posted as more than one invoice line: the same product at two unit prices a cent apart (the register's total over the units), or the product at its regular price and an adjustment line without a product code carrying the saving. The parts add up to lineTotal. |
parts[].kind required | string | One of: product, adjustment. |
parts[].quantity required | string | Whole units; 1 for an adjustment. Pattern: ^[1-9][0-9]*$ |
parts[].unitPrice required | string | The posted unit price; negative for a saving. Pattern: ^-?[0-9]{1,6}\.[0-9]{2}$ |
weight | string | For a weighed line: the weight in pounds the store booked, as its POS keeps it ("1.37"). Absent for other lines. |
No other fields appear.