CompuDime API docs

Reference / Schemas

Promotion

One promotion the store's register may apply. A field the promotion does not have is absent. Money is as the POS stores it; a percent deal is never converted to a price. runningNow is the register's own answer at the moment in evaluatedAt (the store database's clock): the store's TIS01 register window rules, applied by the store agent exactly as the register applies them. The dates hold (an empty date always holds); beginTime counts only on the begin date (and not at all without a begin date); endTime counts only on the end date, or on every day when there is no end date; days, when listed, must include the weekday. A scheduled price has no days. A package deal has no window. A mix and match membership is running when one of the product's qualifying deals would pool it in its group now. A promotion a store-written rule decides (the product's own rule, the store's discount rule, a scheduled price's condition or rule) says storeRuleDecides and status storeRule, carries no runningNow, and is never evaluated by the API; status undetermined (with undeterminedReason) marks store data the API cannot evaluate exactly, such as a time of day that is not four digits. runningNow does not weigh one promotion against another: the register charges the best of the deals that apply, a running scheduled price replaces the product's own price it sets, and on a ticket where discounts are off (see discountsOnByDefault) the register gives none of them.

Type: object.

NameTypeDescription
promotionId requiredstringStable id: <type>:<productCode> for a deal kept on the product, scheduledPrice:<row id> for a scheduled price.
status requiredstringAt evaluatedAt: running (applied now), notNow (within its dates, but its time of day or weekdays exclude this moment; a mix and match membership whose qualifying deals are not on), upcoming (begins after today), ended (will never apply again; only an activeOn read of a past day returns one), storeRule (a store-written rule decides; not evaluated), undetermined (the store's data cannot be evaluated exactly; see undeterminedReason). One of: running, notNow, upcoming, ended, storeRule, undetermined.
type requiredstringsale (a unit sale price), package (the standing N for a price deal, no window), packageSale (a package sale), caseSale (a case sale), mixMatch (the product's membership of a mix and match group) or scheduledPrice (a price the store scheduled for a product, a category or a brand). One of: sale, package, packageSale, caseSale, mixMatch, scheduledPrice.
brandstringThe product's brand; on a brand scheduled price, the brand it covers.
categorystringThe product's category; on a category scheduled price, the category it covers.
departmentstringThe product's department.
descriptionstringThe product's description.
maxQuantityintegerOnly this many get the deal; the rest pay the next price (units, or cases for a case sale).
maxQuantityPerstringWhat maxQuantity counts, on a product's own deal: line (one ticket line), customerDay (the customer's discounted units today, earlier tickets included) or customerPromotion (since the promotion began). A per-customer limit needs a customer on the ticket. One of: line, customerDay, customerPromotion.
minQuantityintegerThe line's count must reach this for the deal to apply (a sale and a package sale count units, a case sale counts cases).
mixMatchPromotionMixMatch
modestringamount: price is the deal price. percent: percentOff is taken off the regular price (a sale), the package price or the regular price times quantity (a package sale), or the case price (a case sale); the register rounds to whole cents. One of: amount, percent.
percentOffnumberPercent off, in percent (15 is 15 %).
permanentChangebooleanscheduledPrice only: once it starts, the price becomes the product's own price (a scheduled price change) instead of running for a period.
pricenumberThe deal price for quantity units (one unit when quantity is absent; a case sale's price is per case).
priceFieldstringscheduledPrice only: which price it sets while it runs. One of: price, sale, casePrice, caseSale, packagePrice, packageSale.
productCodestringThe POS product code; absent on a category or brand scheduled price.
quantityintegerUnits the price buys: the package size, or the units in a case.
regularPricenumberThe product's own regular unit price.
runningNowbooleanWhether the register applies it at evaluatedAt. Absent when a store rule decides or the data cannot be evaluated exactly.
scopestringscheduledPrice only: whom the price covers. The register uses a product's own scheduled prices first, then its category's, then its brand's (brand only where the store's registers keep brands on tickets); among rows of one price field the lowest price per unit wins. One of: product, category, brand.
storeRulestringThe name of that rule, when it has one (a scheduled price's condition has none).
storeRuleDecidesbooleanPresent and true when a store-written rule decides whether the register applies it; the API never evaluates such a rule.
undeterminedReasonstringWhy the promotion could not be evaluated exactly (status undetermined).
unitsPerCaseintegerUnits in one case (the POS column PrdMstr.UPC, which is not a barcode).
windowPromotionWindow

No other fields appear.