One dated discount percentage inside a DiscountGroup, aimed at an item, an item group or a SKU. Matching is confined to the discount group already on the document header, then per line to a rule whose item, SKU and item group are each either equal to the line's or left blank, inside an effective-date window compared against the header's DocumentDate; item-group membership is read from ItemGroupMember rows in an item group of type Discount. Candidates are ordered by item, then SKU, then DateEffectiveFrom descending, so an item-specific rule beats a group-wide one even when the group-wide one is newer. The winner writes its percentage into the line's ContractDiscount and its own identifier into DiscountGroupRuleId, which downstream documents carry forward when an order becomes an invoice.
Fields
| Field | Label | Type | Required | What it does |
ClaimablePercentage | Claimable Percentage | Number | | |
CreatedById | Created By | Lookup → UserAccount | Yes | |
CreatedDateTime | Created Date | DateAndTime | Yes | |
DateEffectiveFrom | Date Effective From | Date | Yes | Compared against the parent document's DocumentDate, and used as the last tie-break behind item and SKU. When several documents are saved in one batch the candidate rules are pre-filtered against the earliest document date in that batch, so a rule that only becomes effective later can be missed for the later-dated documents of the same save. |
DateEffectiveTill | Date Effective Till | Date | | End of validity, tested against the document date. Empty leaves the rule open-ended. |
DiscountGroupId | Discount Group | Lookup → DiscountGroup | Yes | Matching is confined to the group already stored on the document header, so a rule belonging to any other group is never even considered — an unexpected zero discount is usually a header pointing at the wrong group rather than a missing rule. |
DiscountPercent | Discount Percent | Percent | | Copied into the matched line's ContractDiscount. It is a percent-typed field held as a fraction — five percent is stored as 0.05 — and the API scales it by 100 on read and back on write, so services copying it between records never rescale it. |
ExternalId | External | Text | | |
Id | Id | Guid | Yes | |
ItemGroupId | Item Group | Lookup → ItemGroup | | Matches when the line's item belongs to that group, using ItemGroupMember rows whose item group is of type Discount; groups of any other type are never seen by discount matching. An empty value matches every line. |
ItemId | Item | Lookup → Item | | Empty makes the rule apply to every item on the document. Item is the first ordering key, so an item-specific rule is preferred over a blank one even when the blank one starts later. |
ItemLotTypeId | Item Lot Type | Lookup → ItemLotType | | Unlike price-list rules, lot type does not narrow a discount rule at all. |
ModifiedById | Modified By | Lookup → UserAccount | Yes | |
Name | Name | Text | | |
OwnerId | Owner | Lookup → UserAccount | Yes | |
PriceListId | Price List | Lookup → PriceList | | |
RecordTypeId | Record Type | Guid, hidden | | |
SKUId | SKU | Lookup → SKU | | Empty means the rule covers all SKUs of the item. It is the second ranking key after item, so a SKU-specific rule outranks a SKU-blank one. |
UIProps | UI Props | Text | | |
UpdatedDateTime | Modified Date | DateAndTime | Yes | |
Actions
| Action | Label | Type | What it does |
BulkDelete | Delete Selected | Delete | Delete the selected records. |
Clone | Clone | ServerAction (Clone) | Create a copy of this record |
Delete | Delete | Delete | Delete |
DeleteInList | Delete | Delete | Delete in a list page |
Edit | Edit | Edit | Edit |
EditInLine | Edit | EditInline | Delete in page. |
EditListHeader | Edit | EditInline | EditListHeader |
EditListRow | Edit | Edit | EditListRow |
New | New | NewInline | New |
UIAction | UI Action | UIAction | UI Action |
Validations
| Validation | Applies to | Error message | Notes |
| Date Effective Till Rule Validation | DateEffectiveTill, Error | Date Effective Till can not be Backdated | Date Effective can't be Backdated Validation. |
Lookup filters
| Filter | Lookup field | Notes |
| Active Items | ItemId | |
| SKU For Item | SKUId | |