xMatix
Sign in Request demo
xMatix
PRODUCTS
SalesField SalesCRMRewardsClaimsInventoryProcurementWarehouse ManagementField ServiceServiceSupportTelephony & MessagingFinance & AccountingPayrollExpense ManagementCommercePortalsAnalytics & ReportingData StudioMobile AppSee all products →
PLATFORM
Platform overviewApp BuilderAutomationIntegrationsSecurity & GovernanceChange ManagementDevelopers
SENSE AI
Sense AI overviewSense AssistSense ControlSense VisionAI StudioTrust & governanceIn Claude & ChatGPTUse cases
SOLUTIONS
FMCG & DistributionManufacturing & Dealer NetworksAutomotive & DealershipsPharma & HealthcareConsumer DurablesAgri-InputsBuilding MaterialsService NetworksWarehousing & 3PLFinancial AccountingERP SoftwareIndia GST ComplianceUAE VAT & e-InvoicingSaudi ZATCA & VATAll solutions →
RESOURCES
Knowledge CenterDeveloper & CLIBlogGuidesWhat is xMatix?Company facts
COMPANY
AboutCareersPartnersEventsContactAuthorsLegal
Sign in Request demo
Home/Docs/Entity Reference/Discount Group Rule — entity reference
REFERENCE · Last reviewed

Discount Group Rule — entity reference

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

FieldLabelTypeRequiredWhat it does
ClaimablePercentageClaimable PercentageNumber
CreatedByIdCreated ByLookup → UserAccountYes
CreatedDateTimeCreated DateDateAndTimeYes
DateEffectiveFromDate Effective FromDateYesCompared 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.
DateEffectiveTillDate Effective TillDateEnd of validity, tested against the document date. Empty leaves the rule open-ended.
DiscountGroupIdDiscount GroupLookup → DiscountGroupYesMatching 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.
DiscountPercentDiscount PercentPercentCopied 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.
ExternalIdExternalText
IdIdGuidYes
ItemGroupIdItem GroupLookup → ItemGroupMatches 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.
ItemIdItemLookup → ItemEmpty 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.
ItemLotTypeIdItem Lot TypeLookup → ItemLotTypeUnlike price-list rules, lot type does not narrow a discount rule at all.
ModifiedByIdModified ByLookup → UserAccountYes
NameNameText
OwnerIdOwnerLookup → UserAccountYes
PriceListIdPrice ListLookup → PriceList
RecordTypeIdRecord TypeGuid, hidden
SKUIdSKULookup → SKUEmpty 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.
UIPropsUI PropsText
UpdatedDateTimeModified DateDateAndTimeYes

Actions

ActionLabelTypeWhat it does
BulkDeleteDelete SelectedDeleteDelete the selected records.
CloneCloneServerAction (Clone)Create a copy of this record
DeleteDeleteDeleteDelete
DeleteInListDeleteDeleteDelete in a list page
EditEditEditEdit
EditInLineEditEditInlineDelete in page.
EditListHeaderEditEditInlineEditListHeader
EditListRowEditEditEditListRow
NewNewNewInlineNew
UIActionUI ActionUIActionUI Action

Validations

ValidationApplies toError messageNotes
Date Effective Till Rule ValidationDateEffectiveTill, ErrorDate Effective Till can not be BackdatedDate Effective can't be Backdated Validation.

Lookup filters

FilterLookup fieldNotes
Active ItemsItemId
SKU For ItemSKUId