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/Scheme — entity reference
REFERENCE · Last reviewed

Scheme — entity reference

A promotional or trade scheme - the header record that makes discounts, free goods and reward points apply automatically to transactional documents. Only schemes with Status Approved are evaluated; the scheme engine runs on Orders, Invoices, Credit Notes, Purchase Orders, Bills and Service Orders, picking schemes whose schemeType matches the document, whose validFrom/validTo covers the document date and whose account/partner/account-group scoping matches. The actual qualification rules live on child SchemeLine rows (labelled Scheme Slabs), each pairing SchemeCondition rows (what must be bought) with SchemeBenefit rows (what is granted). On insert, SchemePeriod rows are generated from periodType. Every application is mirrored into SchemeLedger rows, which are the source of record for validCount limits and budget enforcement; SchemeAccountBudget rows cap spend globally and per partner.

Fields

FieldLabelTypeRequiredWhat it does
AccountGroupIdAccount GroupLookup → AccountGroup
AccountIdAccountLookup → Account
ApplicableTransactionTypeApplicable Transaction TypePickListWhen set, the document's transaction type must equal this value or the scheme is skipped; empty means any transaction type.
ApplicationApplicationPickListHow the scheme is triggered: Auto Apply schemes run automatically inside the document save; Apply On Selection schemes only surface in recommendation and qualification lists and take effect when a user explicitly applies them (the ApplyScheme server action on the document). Values: Auto Apply, Apply On Selection.
BranchIdBranchLookup → Branch
BusinessHoursIdBusiness HourLookup → BusinessHours
ClaimablePercentageClaimable PercentagePercent
ClaimGenerationFrequencyClaim Generation FrequencyPickListValues: Daily, Weekly, Monthly.
CreatedByIdCreated ByLookup → UserAccountYes
CreatedDateTimeCreated DateDateAndTimeYes
IdIdGuidYes
IgnoreBudgetIgnore BudgetBooleanYesSkips all budget gating for this scheme: it applies on both Sale Order and Sale Invoice regardless of budget configuration or remaining budget. Without it, a scheme lacking both a global and a partner-scoped SchemeAccountBudget is suppressed on the Sale Invoice.
IncludeChildAccountTransactionsInclude Child Account TransactionsBooleanYesFor Per Period schemes: also count PerformanceKPI accrual rows of the document account's child accounts toward the period totals, not just the account itself.
IncludeRelatedAccountTransactionsInclude Related Account TransactionsBooleanYesFor Per Period schemes: also count PerformanceKPI accrual rows of sibling accounts under the same parent account toward the period totals.
IsClaimableIs ClaimableBooleanYes
ModifiedByIdModified ByLookup → UserAccountYes
MultipleFulfilmentTreatmentMultiple Fulfilment TreatmentPickListWhat happens when several slabs of this scheme qualify on the same document: Apply All Fulfilled applies every qualifying slab, Apply First Fulfilled keeps only the first qualifying slab in sequence, Apply Last Fulfilled keeps only the last. Values: Apply All Fulfilled, Apply First Fulfilled, Apply Last Fulfilled.
NameScheme NameTextYes
OriginalSchemeIdOriginal SchemeText
OwnerIdOwnerLookup → UserAccountYes
PartnerAccountGroupIdPartner Account GroupLookup → AccountGroup
PartnerAccountIdPartner AccountLookup → Account
PerformCloneSchemePerform Clone SchemeBooleanYes
PeriodEndDatePeriod End DateDate
PeriodStartDatePeriod Start DateDate
PeriodTypePeriod TypePickListYesGranularity of the SchemePeriod rows generated on insert: Yearly (one period spanning validFrom-validTo), Quarterly, Monthly, Weekly, Bi-Weekly or Daily. Missing validFrom/validTo default to today plus a year (yearly/quarterly/monthly) or a month (weekly/daily). Periods are the accrual buckets for Per Period scheme types. Values: Validity Period, Per Order.
RecordTypeIdRecord TypeGuid, hidden
ReferenceSchemeIdReference SchemeLookup → Scheme
RoundOffTypeRound Off TypePickListCeil or Floor rounding the engine applies to computed scheme values (for example derived free-item quantities); empty means no rounding. Values: Floor, Ceil.
SchemeBudgetScheme BudgetDecimalLegacy header-level global budget; a value greater than zero counts as the scheme having a global budget. The live model expresses the scheme-wide budget as a partner-less SchemeAccountBudget row instead, and this header field is normally empty on migrated data.
SchemeCodeScheme CodeText
SchemeQuotaScheme QuotaPercent
SchemeTypeScheme TypePickListYesWhich document the scheme evaluates against: Per Sale Order, Per Sale Invoice, Per Sale Order And Invoice, Per Purchase Order, Per Bill, Per Purchase Order And Bill, Per Repair Order, Per Repair Order And Invoice - each qualifying on the single document - or the Per Period variants (Per Period Sale Order/Sale Invoice/Purchase Order/Bill/Repair Order), which qualify on totals accumulated in PerformanceKPI rows across the matching SchemePeriod. Values: Per Sale Order, Per Sale Invoice, Per Sale Order And Invoice, Per Purchase Order, Per Bill, Per Purchase Order And Bill, Per Repair Order, Per Repair Order And Invoice, Per Period Sale Order, Per Period Sale Invoice, Per Period Purchase Order, Per Period Bill, Per Period Repair Order, Sales Order Per Period.
SequenceNumberSequence NumberNumberOrder in which schemes are loaded and evaluated by the engine; lower numbers are considered first.
StatusStatusPickListValues: Draft, Pending Approval, Approved, Deactivated.
SupplierAccountIdSupplier AccountLookup → Account
UIPropsUI PropsText
UpdatedDateTimeModified DateDateAndTimeYes
UtilizedAmountUtilized AmountDecimalDenormalized consumption figure refreshed from live SchemeLedger rows (sum of netSchemeDiscount2) so admins can watch the budget deplete. Display-oriented: budget enforcement compares against the larger of this stored value and the live ledger sum, so a stale figure cannot wrongly admit a scheme.
ValidCountVal CountNumberCap on how many distinct documents per customer account the scheme may apply to. Enforced live against SchemeLedger: the engine counts distinct applied documents of the current type for the account (excluding the document being saved) and stops applying once the count reaches this value. Zero or empty means unlimited.
ValidFromVal FromDate
ValidToVal ToDate

Actions

ActionLabelTypeWhat it does
CloneCloneServerAction (Clone)Create a copy of this record
CreateSchemeBenefitCreate Scheme BenefitServerAction (CreateSchemeBenefit)Seeded as a server action but no server handler implements it - executing it performs no server work; the rewards designer creates SchemeBenefit rows directly through the data API.
CreateSchemeConditionCreate Scheme ConditionServerAction (CreateSchemeCondition)Seeded as a server action but no server handler implements it - executing it performs no server work; the rewards designer creates SchemeCondition rows directly through the data API.
CreateSchemeSlabCreate Scheme SlabsServerAction (CreateSchemeSlab)Seeded as a server action but no server handler implements it - executing it saves the record and performs no other work (the rewards designer creates SchemeLine slab rows directly through the data API instead).
DeleteDeleteDeleteDelete In View Page
DeleteEntityDetailDeleteDeleteDeleteEntityDetail
DeleteInLineDeleteDeleteDeleteInLine
EditEditEditEdit in View Pages
EditInLineEditEditInlineEdit
EditInListEditEditEdit
EditListHeaderEditEditInlineEditListHeader
ImportImportUIActionImport
NewNewNewNew
SaveSaveServerActionA plain record save; no server action handler adds behavior beyond persisting the scheme (period generation runs on insert via the lifecycle handler regardless of which save path is used).
SubmitforApprovalSubmit for ApprovalServerActionNo server handler implements this action, so it performs no approval workflow - it is a plain save. A scheme becomes live by setting Status to Approved (only Approved schemes are evaluated by the engine).

Validations

ValidationApplies toError messageNotes
Valid To RuleValidTo, ErrorValid to should be greater than the valid fromEnsures Valid To date is not earlier than Valid From date

Lookup filters

FilterLookup fieldNotes
Branch For Partner AccountBranchId