This question relates to large retail POS systems, such as those used by Walmart and other large chains.
Is there a language which is commonly used by such systems to define price rules for items? I am trying to understand how a POS can apply so many rules when calculating prices of items. For example, the system has to account for sale prices based on date/time/coupon/number of items purchased. It must account for buy-one-get-one, buy several in a category and get something, get a coupon if a specific item is purchased, multiple-item discounts, membership card pricing, etc...
I want to understand how such a set of disparate rules would be
- created easily
- made simple for system administrators to keep up-to-date
- applied efficiently by hardware during the checkout process.
No languages with which I am familiar would make this an easy task for administrators. For example, a set of "if/then" or "case" statements could be used to pick which discounts to apply, but that seems very inefficient for managing huge inventories.
I'm sure the answer varies somewhat by POS manufacturer, but I'm interested in the general method of achieving this.