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

Claim Generation Setup — entity reference

One row per automated claim scenario for the config-driven claims.generate engine — it names the source entity, the selection conditions, how rows are grouped into claims, which amount is aggregated, and how source fields map onto the resulting Claim and ClaimLine. ClaimGenerationSetupHandler dry-runs the configured query with Take(1) on every save, so a bad field path or expression fails in the admin's face rather than in the nightly run; the same handler exposes the GenerateClaims action, which enqueues a job for this setup alone. At run time the job either executes one setup (manual trigger) or every active setup in a ScheduleGroup ordered by RunOrder, streaming the source query in BatchSize chunks. Idempotency comes from GenerationKey plus the ProcessedFlagField written back onto consumed source rows.

Fields

FieldLabelTypeRequiredWhat it does
AggregateFunctionAggregate FunctionPickListSum produces exactly one claim line per group whose unit price accumulates the amount field across every source row (with quantity fixed at 1); Per Record produces one claim line per source row, mapped individually. The netting leg only ever adjusts the first line, so it is meaningful for Sum setups. Values: Sum, Per Record.
AmountFieldNameAmount FieldTextThe numeric field on the source row that is summed into the claim's value when AggregateFunction is Sum; the run fails outright if Sum is configured without it. Navigation paths are allowed and the field is eagerly included in the source query.
AmountFormulaAmount FormulaMultiLineTextAn optional expression evaluated per source row before accumulation, with the raw amount available as the variable amount and the source row own fields in scope — so a claimable percentage on the related scheme can scale each contribution. Leave it blank to accumulate the amount field unchanged.
AutoSubmitForApprovalAuto Submit For ApprovalBooleanYesWhen on, each newly written claim is submitted into its approval process straight after the run — and for target-entity setups it submits the target document type instead. Submission failures (no process configured, already pending) are logged into the run summary and never fail the generation run, and it is skipped entirely in simulate mode.
BatchSizeBatch SizeNumberYesHow many source rows the job pulls per page while streaming the query; it is clamped between 1 and 5000 at run time regardless of what is stored. Groups accumulate across pages, so this affects memory and progress reporting, not the shape of the result.
BranchPathBranch PathTextWhere on the source row to read the branch for the generated claim, defaulting to a direct BranchId when blank.
ClaimTypeClaim TypePickListYesThe type stamped onto every claim this setup produces, unless ClaimTypeSource overrides it per source row. Its picklist is the engine's own vocabulary of coded scheme and incentive types, which does not overlap the Claim entity's own ClaimType picklist — so generated claims carry values that the Claim picklist does not offer. Values: Trade Schemes(CLT-04), CLT-04R, QPS Scheme (CLT-04), Cashback(CLT-04), Provision (CLT-04), Structural Rate Difference Contract Pricing, PSR Incentive (CLT6,7), PSR Salary (CG 1,2), Training Claim, Damage, Shortage, Rate Difference, Reimbursment, Warranty Repairs.
ClaimTypeSourceClaim Type SourceTextLeave blank or set to Config to stamp the setup's own ClaimType; set it to 'SourceField:' followed by a field path to have each claim inherit that value from its source row instead. If the path resolves to null the setup's ClaimType is used as the fallback, and the run fails if neither is set.
CreatedByIdCreated ByLookup → UserAccountYes
CreatedDateTimeCreated DateDateAndTimeYes
DateFieldNameDate FieldTextWhich date on the source row the window is measured against; navigation paths are allowed, so a line-level source can be windowed by its parent's document date. It only has an effect when DateWindow is set to something other than None.
DateWindowDate WindowPickListRestricts the source query to a rolling period resolved in UTC: last calendar month, the current calendar month, or the last N days ending today (inclusive of today). None disables date filtering altogether, whatever DateFieldName says. Values: None, Last Month, This Month, Last N Days.
DateWindowDaysDate Window DaysNumberThe N used only when DateWindow is the last-N-days option; negative values are clamped to zero, which reduces the window to today alone.
FilterExpressionFilter ExpressionMultiLineTextA dynamic-LINQ predicate applied to the source query, intended as the developer escape hatch alongside the admin-friendly rule rows. When both are present the rule rows and this expression are ANDed together; it is compiled and executed with a single-row dry run every time the setup is saved.
GroupingFieldsGrouping FieldsTextYesA comma-separated list of field paths whose values, joined together, form each claim's group key — one claim per distinct combination. It is mandatory: a run with this blank fails immediately. The same key is what merges partial results as the source query is streamed in chunks, and it becomes part of the claim's GenerationKey.
HeaderMappingHeader MappingMultiLineTextJSON object mapping claim header field names to source paths or the same token set as LineMapping. It is evaluated once, from the first source row that opens each group, so it should only carry values that are constant within the group key.
IsActiveActiveBooleanYes
LineMappingLine MappingMultiLineTextJSON object mapping claim-line field names to source field paths or tokens. Tokens available: an item lookup by name, a literal constant, the aggregated amount, the parent header id, and a format template that interpolates source paths into a string. Anything not starting with a token prefix is treated as a navigation path on the source row; unknown field names fall through into the record's custom-fields bag rather than erroring.
Modified ByModified ByLookup → UserAccountYes
NameDocument NumberTextYes
NettingAmountFieldNetting Amount FieldTextThe field summed on the netting source and subtracted from the claim amount. It is mandatory once a netting source is set — the run throws rather than netting zero if it is left blank.
NettingBranchPathNetting Branch PathText
NettingDateFieldNameNetting Date FieldText
NettingDateWindowNetting Date WindowPickListValues: None, Last Month, This Month, Last N Days.
NettingFilterExpressionNetting Filter ExpressionMultiLineTextDynamic-LINQ predicate narrowing the netting source before summing. It is dry-run validated on save alongside the main query, so a bad expression here fails at save time.
NettingPartnerPathNetting Partner PathText
NettingSourceEntityNetting Source EntityTextEnables the netting leg: after collection, the engine sums a second source per group and subtracts it from the aggregated claim amount, which is how contract-rate differences and credit-note payouts already given are deducted. Candidates whose amount falls to zero or below after netting are dropped and no claim is written for them.
OwnerIdOwnerLookup → UserAccountYes
OwnerResolutionOwner ResolutionPickListHow the generated claim's owner is chosen: Resource User assigns the user behind the active PSR/DSR resource matching the claim's partner and branch, Branch Owner assigns the branch record's owner, None leaves the owner as the job's default. Unmatched candidates simply get no owner rather than failing. Values: None, Resource User, Branch Owner.
PartnerAccountPathPartner Account PathTextWhere on the source row to read the partner account for the generated claim; it defaults to a direct PartnerAccountId on the row when left blank. The same value is used to match rows on the netting leg unless a separate netting partner path is given.
ProcessedFlagFieldProcessed Flag FieldTextThe boolean on the source row that marks it as already claimed; it is both a filter (the query only takes rows where it is null or false) and a write-back (successfully claimed rows are flagged in the same transaction as the claim). Navigation paths are supported so a parent-level flag can be used. Leaving it blank means sources are re-read every run, which is correct only for regenerate-each-period types such as salary.
RuleSuccessCriteriaRule Success CriteriaPickListHow the child rule rows combine when no custom logic formula is given: OR joins them with logical or, anything else (including the default) joins them with logical and. It is ignored entirely once RuleSuccessCustomLogic is filled in. Values: AND, OR.
RuleSuccessCustomLogicRule Custom LogicTextA boolean formula over the child rules' sequence numbers, such as '(1 AND 2) OR 3', supporting AND, OR, NOT and parentheses.
RunOrderRun OrderNumberYesSequencing within a scheduled run: when the job is triggered for a schedule group it executes that group's active setups in ascending order of this number. It is ignored when a single setup is triggered directly.
ScheduleGroupSchedule GroupPickListNames the cron-driven batch this setup belongs to; a job schedule row per group carries the actual cron expression, and the scheduled run picks up every active setup with a matching group. A setup with this blank can still be run manually but will never run on a schedule. Values: Nightly, Monthly (Day 1), Weekly.
SimulateModeSimulate ModeBooleanYesDefaults to on. In simulate mode the run computes candidates and reports what it would have created to the jobs ledger but writes no claims and flags no source rows — safe for parallel running against an existing process. A manual trigger can override it per run; leaving it on is the usual reason a correctly configured setup appears to create nothing.
SourceEntitySource EntityTextYesThe entity name whose rows are scanned for claimable value — resolved against the live model by name, so any first-party or tenant entity works (SchemeLedger, InvoiceLine, CreditNote and Resource are the typical ones). Tenant and soft-delete filters are applied automatically, and every navigation the setup's paths walk is eagerly included.
StrategyKeyStrategy KeyTextSelects an alternative collection strategy from the registered catalog for behaviour that genuinely cannot be expressed as configuration. Leave it blank for the standard config-driven pipeline, which is what every shipped scenario uses.
SupplierAccountIdSupplier AccountLookup → AccountThe supplier or principal stamped onto every claim this setup generates — a fixed account per setup rather than something read from the source row.
TargetEntityTarget EntityTextRedirects the engine's output away from Claim to another document type (a No-Dues certificate, for example), written through the metadata-driven data service so tenant custom entities work. This mode has no GenerationKey duplicate guard, so ProcessedFlagField becomes mandatory — the setup is refused on save without it. Header, lines and source flags are also not one transaction in this mode, so a mid-run failure can leave a header with unflagged sources.
TargetLineEntityTarget Line EntityTextThe line entity written under TargetEntity; each candidate line becomes one row, with the parent token resolving to the created header's id. Leave blank for header-only target documents.
UpdatedDateTimeModified DateDateAndTimeYes

Actions

ActionLabelTypeWhat it does
BulkDeleteDeleteDeleteDelete the selected records.
DeleteDeleteDeleteDelete
DeleteInListDeleteDeleteDelete the record.
EditEditEditEdit the ClaimGenerationSetup.
EditEntityEditEditEditEntity
EditInLineEditEditInlineEdit inline.
EditInListEditEditInlineEdit inline in the list.
GenerateClaimsGenerate ClaimsServerAction (GenerateClaims, async)Does not generate claims inline — it enqueues a background generation run scoped to this setup alone and returns the job run id, so results appear on the Jobs screen rather than in the response. The enqueue key is bucketed to the minute, so double-clicks collapse into one run while a deliberate re-run a minute later goes through. Whether it actually writes anything still depends on the setup's simulate mode unless the caller overrides it.
NewNewNewCreate a new ClaimGenerationSetup.