OrderStoreDiscount
The percent discount the store's register gives the customer the order lands on (found by the order's phone), taken off the lines the store priced and posted on the invoice as savings lines without a product code, one per tax class of the discounted lines (usually one). The store's Customer Orders screen never applies a customer's discount by itself, so it is taken once. The register takes it only when the order's total is above the customer's minimum for the discount, and never off an item marked for no discount or, unless the store gives the discount on sale items too, off a line that got its own sale or deal.
Type: object.
| Name | Type | Description |
|---|---|---|
amount required | string | What the store took off, negative: the percent of base rounded half up to the cent. Pattern: ^-[0-9]{1,6}\.[0-9]{2}$ |
base required | string | The total of the store-priced lines that took the discount. Pattern: ^[0-9]{1,6}\.[0-9]{2}$ |
percent required | string | The discount in percent, two decimals ("10.00"). Pattern: ^[0-9]{1,3}\.[0-9]{2}$ |
priceRule required | string | The price rule the order was priced under. One of: register. |
source required | string | customer: the customer's own discount. One of: customer. |
parts | array of object | Present when the discount was posted as more than one savings line (lines of different tax classes took it); the parts add up to amount. |
parts[].kind required | string | One of: discount. |
parts[].quantity required | string | One of: 1. |
parts[].unitPrice required | string | The savings line's price, negative. Pattern: ^-[0-9]{1,6}\.[0-9]{2}$ |
No other fields appear.