-
Notifications
You must be signed in to change notification settings - Fork 1
Add allowances use cases docs #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
4ef2a73
87a695d
bc5b41f
e43854d
a7f7e25
5013ab7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,177 @@ | ||||||
| # Allowances | ||||||
|
|
||||||
| ## Overview | ||||||
|
|
||||||
| An `Allowance` is a packaged spending benefit that a `Property` attaches to a `Rate`, giving guests a defined amount they can redeem against specified on-property services — for example, food & beverage, spa, or minibar charges. Rather than discounting the room `Rate`, the `Property` adds value while protecting its Average Daily Rate (ADR). | ||||||
|
|
||||||
| From an accounting perspective, the allowance represents a liability the `Property` assumes at activation: the `Property` has committed to absorbing qualifying charges on the guest's behalf, up to the specified amount. When an allowance is activated for a `Reservation`, the system posts an allowance product order item (a `ProductOrder` with `ProductType = Allowance`) to the guest's `Bill`. When a qualifying charge is subsequently posted — one whose `Accounting Category` matches the allowance's permitted consumption categories — the system automatically creates an `AllowanceDiscount` order item that offsets the charge up to the remaining allowance balance. | ||||||
|
|
||||||
| Any unspent allowance is retained by the `Property` as additional revenue, which is known as `Breakage`. | ||||||
|
|
||||||
|
Comment on lines
+5
to
+10
|
||||||
| Integrations — such as point-of-sale (POS) systems, accounting systems, and kiosk or self-service applications — can use the **Mews Connector API** to: | ||||||
|
|
||||||
| * post charges that are automatically offset against a guest's allowance | ||||||
| * retrieve allowance-related order items for billing, reconciliation, and balance reporting | ||||||
|
|
||||||
| ## Key concepts | ||||||
|
|
||||||
| There are several types of order item specific to allowances. Understanding these is essential for working with allowance data through the API. | ||||||
|
|
||||||
| ### Allowance-related order item types | ||||||
|
|
||||||
| | Order item type | What it represents | | ||||||
| | --- | --- | | ||||||
| | `ProductOrder` (with `ProductType = Allowance`) | The allowance product — the liability posted to the guest's bill when the allowance is activated. | | ||||||
| | `AllowanceDiscount` | A discount automatically applied to a qualifying charge, offsetting the charge up to the remaining allowance balance. | | ||||||
| | `AllowanceBreakage` | Unspent allowance retained by the `Property` as revenue at checkout. See `Breakage`. | | ||||||
| | `AllowanceContraBreakage` | The accounting contra entry for breakage, ensuring double-entry accounting integrity. | | ||||||
|
|
||||||
| ### Automatic discounting | ||||||
|
|
||||||
| When a charge is posted to a guest who has an active allowance, and the charge's accounting category matches the allowance's permitted consumption categories, the system automatically creates an `AllowanceDiscount` item to offset the charge. | ||||||
|
|
||||||
| {% hint style="info" %} | ||||||
| No additional API call is needed to trigger the discount. | ||||||
| {% endhint %} | ||||||
|
|
||||||
| ## Retrieving allowance-related order items | ||||||
|
|
||||||
| Use [`Get all order items`](../operations/orderitems.md#get-all-order-items) to retrieve order items related to allowances. | ||||||
|
|
||||||
| You can filter: | ||||||
|
|
||||||
| * by reservation using `ServiceOrderIds` | ||||||
| * by bill using `BillIds` | ||||||
| * by time period using, for example, `CreatedUtc`, `UpdatedUtc`, or `ClosedUtc` | ||||||
| * by item type using `Types` | ||||||
|
|
||||||
| ### "How to" use cases (retrieving items) | ||||||
|
|
||||||
| | "How to" use case | API operations | | ||||||
| | --- | --- | | ||||||
| | How to get all order items for a reservation (including allowance items) | [`Get all order items`](../operations/orderitems.md#get-all-order-items) (use `ServiceOrderIds`) | | ||||||
| | How to get allowance discount items | [`Get all order items`](../operations/orderitems.md#get-all-order-items) (use `Types` filter with `AllowanceDiscount`) | | ||||||
| | How to get breakage items | [`Get all order items`](../operations/orderitems.md#get-all-order-items) (use `Types` filter with `AllowanceBreakage`) | | ||||||
|
||||||
| | How to get breakage items | [`Get all order items`](../operations/orderitems.md#get-all-order-items) (use `Types` filter with `AllowanceBreakage`) | | |
| | How to get breakage items | [`Get all order items`](../operations/orderitems.md#get-all-order-items) (use `Types` filter with `AllowanceBreakage` and `AllowanceContraBreakage`) | |
Copilot
AI
Apr 27, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For “breakage items for reconciliation”, the filter guidance uses only Types = AllowanceBreakage. Since the docs below state breakage and contra-breakage always occur in pairs, this should include AllowanceContraBreakage as well (or clarify how to retrieve/reconcile the contra entry).
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -45,6 +45,23 @@ This page summarises all of our 'how to' use cases, together with the main use c | |||||||||||||||||||||||||||||||||||||
| | How to record an alternative external payment | [Add alternative payment](../operations/payments.md#add-alternative-payment) | [Kiosk](kiosk.md) | | ||||||||||||||||||||||||||||||||||||||
| | How to post end-of-day accounting items | [Add outlet bill](../operations/outletbills.md#add-outlet-bills) | [Point of sale](point-of-sale.md) | | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| ## Allowances | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| | <div style="width:350px">'How to' use case</div> | <div style="width:200px">API Operations</div> | <div style="width:150px">Use cases</div> | | ||||||||||||||||||||||||||||||||||||||
| | :------------------------------------------------------------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------- | | ||||||||||||||||||||||||||||||||||||||
| | How to get all order items for a reservation (including allowance items) | [`Get all order items`](../operations/orderitems.md#get-all-order-items) (use `ServiceOrderIds`) | [Allowances](allowances.md) | | ||||||||||||||||||||||||||||||||||||||
| | How to get allowance discount items | [`Get all order items`](../operations/orderitems.md#get-all-order-items) (use `Types` with `AllowanceDiscount`) | [Allowances](allowances.md) | | ||||||||||||||||||||||||||||||||||||||
| | How to get breakage items for reconciliation | [`Get all order items`](../operations/orderitems.md#get-all-order-items) (use `Types` with `AllowanceBreakage`) | [Allowances](allowances.md) | | ||||||||||||||||||||||||||||||||||||||
| | How to get all allowance-related items on a bill | [`Get all order items`](../operations/orderitems.md#get-all-order-items) (use `BillIds`) | [Allowances](allowances.md) | | ||||||||||||||||||||||||||||||||||||||
| | How to get allowance items over a period | [`Get all order items`](../operations/orderitems.md#get-all-order-items) (use `ClosedUtc` or `ConsumedUtc`) | [Allowances](allowances.md) | | ||||||||||||||||||||||||||||||||||||||
| | How to identify allowance product items among order items | [`Get all order items`](../operations/orderitems.md#get-all-order-items) (check `Data.Product.ProductType = Allowance`) | [Allowances](allowances.md) | | ||||||||||||||||||||||||||||||||||||||
| | How to find the original charge for an allowance discount | [`Get all order items`](../operations/orderitems.md#get-all-order-items) (use `OrderItemIds` with `DiscountedOrderItemId`) | [Allowances](allowances.md) | | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+50
to
+58
|
||||||||||||||||||||||||||||||||||||||
| | <div style="width:350px">'How to' use case</div> | <div style="width:200px">API Operations</div> | <div style="width:150px">Use cases</div> | | |
| | :------------------------------------------------------------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------- | | |
| | How to get all order items for a reservation (including allowance items) | [`Get all order items`](../operations/orderitems.md#get-all-order-items) (use `ServiceOrderIds`) | [Allowances](allowances.md) | | |
| | How to get allowance discount items | [`Get all order items`](../operations/orderitems.md#get-all-order-items) (use `Types` with `AllowanceDiscount`) | [Allowances](allowances.md) | | |
| | How to get breakage items for reconciliation | [`Get all order items`](../operations/orderitems.md#get-all-order-items) (use `Types` with `AllowanceBreakage`) | [Allowances](allowances.md) | | |
| | How to get all allowance-related items on a bill | [`Get all order items`](../operations/orderitems.md#get-all-order-items) (use `BillIds`) | [Allowances](allowances.md) | | |
| | How to get allowance items over a period | [`Get all order items`](../operations/orderitems.md#get-all-order-items) (use `ClosedUtc` or `ConsumedUtc`) | [Allowances](allowances.md) | | |
| | How to identify allowance product items among order items | [`Get all order items`](../operations/orderitems.md#get-all-order-items) (check `Data.Product.ProductType = Allowance`) | [Allowances](allowances.md) | | |
| | How to find the original charge for an allowance discount | [`Get all order items`](../operations/orderitems.md#get-all-order-items) (use `OrderItemIds` with `DiscountedOrderItemId`) | [Allowances](allowances.md) | | |
| | <div style="width:350px">'How to' use case</div> | <div style="width:200px">API Operations</div> | <div style="width:150px">Use cases</div> | | |
| | :------------------------------------------------------------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------- | | |
| | How to get all order items for a reservation (including allowance items) | [`Get all order items`](../operations/orderitems.md#get-all-order-items) (use `ServiceOrderIds`) | [Allowances](allowances.md) | | |
| | How to get allowance discount items | [`Get all order items`](../operations/orderitems.md#get-all-order-items) (use `Types` with `AllowanceDiscount`) | [Allowances](allowances.md) | | |
| | How to get breakage items for reconciliation | [`Get all order items`](../operations/orderitems.md#get-all-order-items) (use `Types` with `AllowanceBreakage` and `AllowanceContraBreakage`) | [Allowances](allowances.md) | | |
| | How to get all allowance-related items on a bill | [`Get all order items`](../operations/orderitems.md#get-all-order-items) (use `BillIds`) | [Allowances](allowances.md) | | |
| | How to get allowance items over a period | [`Get all order items`](../operations/orderitems.md#get-all-order-items) (use `ClosedUtc` or `ConsumedUtc`) | [Allowances](allowances.md) | | |
| | How to identify allowance product items among order items | [`Get all order items`](../operations/orderitems.md#get-all-order-items) (check `Data.Product.ProductType = Allowance`) | [Allowances](allowances.md) | | |
| | How to find the original charge for an allowance discount | [`Get all order items`](../operations/orderitems.md#get-all-order-items) (use `OrderItemIds` with `DiscountedOrderItemId`) | [Allowances](allowances.md) | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: beside Copilot comments, I'd suggest reordering the individual use case sections in the order of understand -> read -> interpret -> post -> test. The assumption is that users will most likely run into Allowance when fetching data, while posting the allowances & co. will affect only a subset of those users.
Here's my proposal for reordering the sections:
understand:
2. Key concepts
read:
3. Retrieving allowance-related order items
4. Identifying allowance products (read)
interpret:
5. Working with allowance discounts (interpret)
6. Working with breakage and profits (interpret)
post:
7. Posting charges against an allowance
8. Partial consumption /edge case/
9. Charges that do not qualify /edge case/
test:
10. Testing your integration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed