Skip to main content

Generate claims

This page is for administrators, accounts receivable staff and accounts payable managers who run or schedule claim generation. Generate claims turns accumulated accruals into claims, one claim for each counterparty type, invoice account and deal currency, raised against the account that pays. You can run it as a periodic sweep over everything that is eligible, or by hand over accrual transactions you select.

Runs: a batch job you schedule (Earmark > Periodic tasks > Generate claims), or on demand, from that menu item or from Accrual transactions. It never runs by itself. Set up by: Accounting manager (Earmark parameters and posting setup); the batch job itself is created by an Accounts receivable clerk or Accounts payable manager. Watched by: Accounts receivable clerk (the claim queue); Accounts receivable manager, Accounts payable manager and Accounting manager for execution exceptions.

Why it exists​

An accrual records deal money that is owed, but nobody has been asked for it yet. A claim is the document that carries that money to approval and then onto the counterparty's account as a credit. Generation is a separate step for two reasons: returns, credit notes and corrections get time to arrive before an accrual becomes a claim (the minimum age), and a person reviews and submits each claim before anyone approves it. The sweep exists so that accrued money does not sit unclaimed because nobody pressed a button. It never submits a claim for approval.

When it runs​

TriggerHow to start itWho can
Scheduled sweepEarmark > Periodic tasks > Generate claims, then the Run in the background tab: switch Batch processing on and set a RecurrenceAccounts receivable clerk, Accounts payable manager
Sweep nowThe same menu item, then OKThe same roles
By hand over a selectionAccrual transactions (Earmark > Inquiries and reports > Accrual transactions), select rows, then Claims group > Generate claimsThe same roles (both also hold Inquire into Earmark accruals, which opens the list)
Inside the vendor settlement runRun vendor settlement uses the same claim generator, one vendor group at a timeAccounts payable manager (Run vendor settlement)

A batch job runs in the company where you create it, so schedule one in each company that uses Earmark. The job's task appears on System administration > Inquiries > Batch jobs with the class name MGCEarmarkClaimGenerationSweepController and the caption Generate Earmark claims (periodic).

Recurrence. Earmark prescribes none. The parameter help for Minimum accrual age for generation (days) describes a nightly sweep, and the user guide's tip assumes one. The trade-off: each run raises one claim per counterparty type, invoice account and currency, so running more often gives customers more, smaller claims sooner, and running less often gives fewer, larger ones. The help for Maximum accruals per generation run says to lower it if generation competes with the Accrual event processor for the same batch window, because both take the same deal locks.

Before you schedule it, set Default claim assignee rule to Unassigned or Default owner. With Generator, every claim the job raises is assigned to the user the batch job runs as.

A scheduled job keeps the dialog values it was saved with. Changing the two parameters later does not change a job that is already scheduled.

Settings​

SettingWhereDefaultEffect
Minimum accrual age in daysSweep dialogThe Minimum accrual age for generation (days) parameter; a negative parameter opens as 30Only accruals whose posting date is at least this many days before today (in your time zone) are swept. 0 sweeps everything eligible, which suits a one-off catch-up. A negative value is refused.
ModuleSweep dialogNone, which means every enabled moduleRestricts the run to one Earmark module.
Counterparty accountSweep dialogBlankRestricts the run to accruals whose commitment names this account. Grouping still uses the account it invoices to.
Maximum accrual transactions per runSweep dialogThe Maximum accruals per generation run parameter; zero or less opens as 10,000The run stops collecting after this many transactions, oldest posting date first. What it leaves, the next run takes. Zero or less is refused. The count includes transactions that are then left out with a reason, so old transactions that are refused on every run (for example, no counterparty account) keep using up the maximum and can hold back newer ones.
Minimum accrual age for generation (days)Earmark > Setup > Earmark parameters, Claims tab1Starting value of the dialog field only.
Maximum accruals per generation runClaims tab1,000Starting value of the dialog field only.
Default claim assignee ruleClaims tabGeneratorGenerator assigns each claim to the user who ran the generation (a batch job's user, in batch). Unassigned leaves it in the pool. Default owner assigns it to Default claim owner, or to the generating user when that field is blank.
Default claim ownerClaims tabBlankUsed by Default owner.
Journal name for the Claim movement typePosting control tabNoneThe journal each claim movement is written to. Each commitment keeps the journal name it had when it was built, so a change applies only to commitments built afterwards.
Post automatically on the Claim rowPosting control tabSee the configuration referenceWhen set, the claim journals post on the next Accrual event processor run. When cleared, someone posts them.
Claimable byOn each deal (defaults on the Defaults tab)Per moduleA deal claimable by None is never claimed.

The by-hand Generate claims dialog has no settings: it acts on the rows you selected and shows what it would produce before you choose Generate.

What it does​

  1. Collect (sweep only). The sweep reads accrual transactions in state Accumulated with a posting date on or before today minus the minimum age, oldest first, on commitments that are claimable by someone. It leaves out the vendor side of a supplier-funded mirror, which only the vendor settlement run claims, and anything in a module or shape that is switched off. It stops at the maximum per run. The by-hand dialog starts from your selection instead.
  2. License check. On production, from the license's block date, nothing is claimed and the run reports the license message. The accruals stay Accumulated.
  3. Check each transaction. A transaction is left out, with a named reason, if it is not Accumulated, its commitment is claimable by None, it is a mirror's vendor side, its commitment names no counterparty account or no currency, or it is already claimed.
  4. Group the rest by counterparty type, invoice account (the account the counterparty invoices to, one step up) and deal currency. Accruals claimable by a vendor (supplier rebates and sales-triggered vendor accruals) become vendor claims the same way.
  5. For each group, in one transaction: run a Claim movement for each transaction through the accrual engine. Each movement writes its own claim journal, unposted, and moves the transaction to Claimed. A movement the engine refuses is left off the claim with its reason. If at least one movement went through, Earmark draws a claim number and writes the claim, Open, with one line per claimed transaction, assigned by the Default claim assignee rule.
  6. After each claim commits: a timeline row on the claim, and the Earmark claim generated business event when Publish Earmark claim events is on.
  7. Report. "<n> claim(s) generated over <n> accrual transaction(s).", or "No accumulated accrual transaction in the selection is eligible for a claim.", plus one line for each transaction left out.
  8. Proposal check (sweep only). Each sweep also looks for vendor proposals that Accounts payable deleted by a route Earmark did not see, and marks those claim lines Proposal deleted (see Vendor settlement run).

Before it can run​

  • At least one Earmark module is on, and the deals are Claimable by a customer or vendor.
  • A number sequence is assigned to the Earmark claim identifier (Number sequences tab of Earmark parameters). Without it, generation stops with an error; see Set up number sequences.
  • A journal name is set for the Claim movement type, and the posting profile resolves the claim accounts (Set journal names, Set up the posting profile).
  • The accruals were themselves processed: the Accrual event processor turns posted documents into Accumulated accrual transactions.
  • To submit the claims afterwards, an active Earmark claim approval workflow (Approval workflows).

What goes in and what comes out​

InOut
Accrual transactions in state AccumulatedThe same transactions, now Claimed
The commitment each one belongs to (counterparty, currency, claimable by)One Claim movement per transaction, each with its own unposted claim journal
Earmark parameters (assignee rule, claim number sequence)Claims (Open, usually Posting pending) with one line per claimed transaction, assigned per the rule
The deal balances' claimed amounts, moved by the engine
A timeline row per claim; the Earmark claim generated business event when enabled
An infolog (or batch job log) listing every claim made and every transaction left out

Watching it​

  • Batch job log (System administration > Inquiries > Batch jobs, the job's log): the summary line and one line for each transaction left out, with its reason. Reasons are warnings, not errors, so a run that correctly declined rows is not marked with errors.
  • The claim queue: Earmark > Claims > All claims, and the My claims and Unassigned claims tiles on the Earmark workspace.
  • Accrual transactions, Claimable view: what is still waiting to be claimed.
  • Journals pending review tile on the Deal control workspace: claim journals waiting for a person to post them.
  • Earmark execution exceptions (Earmark > Inquiries and reports > Earmark execution exceptions): a Journal post row when an automatic post of a claim journal is refused. The generation itself raises no workbench row.
  • Business events: Earmark claim generated, one per claim, when Publish Earmark claim events is on and the event is activated (Business events).

When it fails​

What you seeKindWhereWhat to do
A transaction is left out with a reason (already claimed, claimable by None, no counterparty account, mirror vendor side…)VerdictDialog's lower list, or the infolog and batch logUsually nothing. The reasons are listed in Generate claims from selected accrual transactions.
"The claim movement for accrual transaction <trans> was not posted: <reason>"VerdictInfolog and batch logFix what the engine names; the transaction stays Accumulated and the next run takes it.
The license message ("Earmark's license has reached its block date on this production environment. …")VerdictInfolog and batch logRestore the license. Nothing was claimed and nothing is lost. See Check the license status.
"No claim identifier could be allocated. Run the number sequence wizard, or assign a sequence to the Earmark claim identifier."FailureError in the infolog; the batch task ends in errorAssign the number sequence, then run again.
Any other error during one claim (a configuration gap the accrual engine cannot get past, or an environmental error)FailureError in the infolog; the batch task ends in errorFix the cause, then run again.
A claim journal's automatic post is refusedFailureA Journal post row on the workbenchFix the cause, then Retry selected (Journal auto-post). The claim stays Open, Posting pending.

A failure stops the run. Each claim is written in its own transaction, so a failed claim writes nothing: no movement, no journal, no claim. Claims the run had already written stay. But the run does not go on to the remaining groups, and the proposal check in step 8 does not run. Until the cause is fixed, each scheduled run stops at the same place.

A re-run is always safe. Each accrual transaction can carry only one claim movement (the engine keys it on the transaction), and an already claimed transaction is left out with a reason. A second run, or a retry of a batch task that stopped partway, claims only what is left. A transaction the run skipped because of the maximum is taken by a later run, unless older transactions that are refused every time keep filling the maximum; clear their cause, or raise the maximum for one run.

Effects on the rest of Earmark​

  • Locks. Each claim movement takes the deal, its balances and the commitment in Earmark's lock order, then the claim. The Accrual event processor takes the same deal locks, which is why the parameter help suggests a smaller maximum if the two share a batch window.
  • Balances. The deal's claimed amount moves as each claim movement is written. The accrued money is now claimed money; nothing reaches the customer until the claim is approved and its approval journal posts.
  • What waits on it. A claim cannot be submitted until every one of its claim journals has posted. With Post automatically set on the Claim row, the Accrual event processor posts them on its next run (they are never posted inside the generation itself). Otherwise a person posts them; see Post or correct an accrual journal.
  • For users. New claims appear in the claim queue and on the claim tiles, and the claimed accruals drop out of the Claimable view of Accrual transactions. To undo a claim, reverse it (Reverse a claim).