Unaccrued transaction sweep
This page is for administrators, accountants and accounting managers who make sure no shipment or receipt is left without its accrual. The Unaccrued transaction sweep finds commitments (accrual instances) whose goods have passed their accrual point but which have accrued nothing at all, counts them, and puts an accrual event back on the queue for each one so the accrual event processor posts it. It is the safety net behind the posting hooks, and it posts nothing itself.
Runs: a batch job you schedule; daily is the shipped target. Nothing schedules it for you and nothing checks that it runs. Set up by: Accounting manager or Accountant (a System administrator can too). Watched by: Accountant and Accounting manager.
Why it exists
When a packing slip, product receipt or invoice posts, Earmark adds an accrual event to the queue as part of that posting, inside the posting's own transaction: the queue rows commit with the document or roll back with it. What that step cannot see is a document that reached its accrual point without Earmark's hook adding a row for the commitment (for example a posting path where the hook did not run). Such a document posts normally and nothing tells you: a lost capture raises no workbench row and no message. The sweep is the only record of those cases and the only repair: its count says how many commitments have moved goods with nothing accrued, and it puts them back on the queue.
When it runs
| Trigger | What runs |
|---|---|
| Its recurring batch job | One sweep of the company. |
| You open it and select OK with Batch processing off | The same sweep, once, straight away. |
Nothing else starts it. In particular, a lost capture never produces an execution exceptions workbench row (the workbench lists an Accrual event capture operation, but nothing in this release raises it), so there is no row to retry: schedule the sweep, or run it by hand when you suspect a lost accrual.
To run it now or schedule it: open Earmark > Periodic tasks > Unaccrued transaction sweep (also under Related links > Periodic tasks on the Deal control workspace). The dialog has no fields of its own, only the Run in the background tab: switch Batch processing on and set a Recurrence. Schedule it in every company where an Earmark module is on.
How often: Unaccrued transaction sweep cadence in Earmark parameters is 1,440 minutes (daily) as shipped. It is a target for you: it schedules nothing, and no setup gap or tile checks the job against it. Daily finds a lost accrual within a day. Running it more often finds one sooner; running it less often leaves a lost accrual out of the deal balance, the cap and the claims for longer. Whatever the recurrence, run it once more before you reconcile a period (Close a period).
On the Batch jobs page (System administration > Inquiries > Batch jobs) the job's task runs the generic
SysOperationServiceController class, so find it by its description.
Settings
| Setting | Where | Default | Effect |
|---|---|---|---|
| Unaccrued transaction sweep cadence | Earmark > Setup > Earmark parameters, Accrual processing tab | 1,440 minutes | A target for the recurrence you set. Read by nothing. |
| Accrual point of the deal | The deal | Set per deal | Decides which document the sweep looks for: Ship the packing slip or product receipt, Invoice the invoice or vendor invoice. A Manual commitment is never swept. |
| Recurrence | Sweep dialog, Run in the background tab | None | How often it actually runs. |
What it does
- Selects the candidates: every accrual instance in the company that is Active, belongs to an order line (has an inventory transaction origin), is not the vendor side of a supplier-funded mirror, and has no accrual transaction of any kind.
- Checks the accrual point of each, with the same test the posting uses. A Manual accrual point is skipped. A commitment whose order line cannot be read is skipped with "Commitment ... was skipped by the unaccrued transaction sweep because its inventory transaction origin could not be read. ..." and is looked at again next time.
- Counts each commitment whose goods have passed the accrual point as found.
- Leaves it alone if an accrual event for it is already Queued or Processing.
- Finds the document that should have accrued: for Ship, the packing slip number (sales) or product receipt number (purchase) on the order line's inventory transactions; for Invoice, the invoice or vendor invoice number. It looks only at the forward rows (a sales line's issues, a purchase line's receipts) and takes the first document it finds. If there is none it warns "Commitment ... is past its accrual point but the sweep could not identify the packing slip or invoice that carried it, so it has not been put back on the queue. ..."
- Queues an accrual event for that document, exactly as the posting would have. The queue refuses a second event with the same document, commitment and movement, so the sweep cannot queue one twice, and it does not queue again a document whose event is still kept on the queue, whatever its status. If the row cannot be written it warns "Commitment ... is unaccrued but could not be put back on the accrual event queue, and has been skipped. ..."
- Reports "Unaccrued transaction sweep finished: ... commitment(s) found whose goods have moved with nothing accrued, of which ... were put back on the accrual event queue. ..."
Each repair is saved on its own; one commitment that cannot be repaired never undoes the others. The re-queued events are posted by the next Accrual event processor run.
Before it can run
- An Earmark module is on in the company. Otherwise the menu item is not shown.
- The Accrual event processor is scheduled. The sweep only queues; without the processor, its repairs wait in the queue.
- The commitments exist. An order line accrues only through a commitment Earmark attached to it, usually by building a deal price on it; a line with none has nothing for the sweep to find.
What goes in and what comes out
| In | Out |
|---|---|
| Active accrual instances with no accrual transaction | Queued rows on Accrual event queue, origin Document, movement type Accrual |
| The order lines' inventory transactions and their packing slip, receipt or invoice numbers | The summary and any warnings in the infolog or the batch job's log |
It writes no accrual transaction, journal, balance, timeline row or workbench row.
Watching it
- Batch job history (System administration > Inquiries > Batch jobs): the summary line and any warnings. Found is the measure of what the posting hooks lost; put back is what this run repaired. Found and put back both high, then found high and put back zero on the next run, means the repairs are made and are waiting for the processor.
- A found count is not always a lost event. A commitment whose only event was answered without posting has no accrual transaction, so the sweep counts it as found every run. That happens when a control stopped the movement (for example the cap was reached, or the quantity was below the qualifying minimum). The sweep does not queue that document again while its answered event is kept on the queue; once retention cleanup deletes that event (after Accrual event retention (days)), the next sweep queues it again and the processor answers it afresh. Read the event's Last message on Accrual event queue before treating the count as a fault.
- One answered event is put back. A forward accrual that was refused because its document date fell in a closed or on-hold period, and that produced no movement, is returned to the queue by the next sweep (its Last message then reads "Returned to the queue by the unaccrued-transaction sweep…"), and the processor posts it on the processing date. The sweep recognizes such an event by the refusal text in its Last message, so an event processed under a different language or date format is not recognized and stays answered: post a manual accrual for it.
- Accrual event queue (Earmark > Inquiries and reports > Accrual event queue): the re-queued rows, with origin Document.
- Unaccrued transactions tile on Deal control: it carries no number and opens the whole Accrual instances list, not only the unaccrued ones. The count is in the sweep's summary and in the reconciliation.
- Accrual reconciliation: when commitments are unaccrued, it warns "... commitment(s) have passed their accrual point with nothing accrued. ..." See Reconcile accruals against the general ledger.
When it fails
The sweep reports problems with single commitments as warnings, never as workbench rows, and carries on. Each skipped commitment is looked at again on the next run.
| Warning | What to do |
|---|---|
| ... could not identify the packing slip or invoice that carried it ... | Check that the order line's inventory transactions carry a document number. If they do not, post the accrual by hand from the commitment (Post a manual accrual). |
| ... its inventory transaction origin could not be read ... | Nothing for now; it is retried next run. If it repeats, check the order line still exists. |
| ... could not be put back on the accrual event queue ... | Read the cause at the end of the message; it is retried next run. |
Running it again is safe at any time, including straight after a run or while the processor is running: it never queues a second event for the same commitment and document.
What it does not catch. It looks only at commitments with no accrual at all. A commitment that has accrued once (for example on the first delivery of a partly delivered line) is not looked at again. It re-queues accruals, never a lost return. A commitment with a Manual accrual point, and the vendor side of a mirror (which accrues through pairing), are outside it. For those, use the reconciliation and the order's accruals (Read the accruals on an order).
Effects on the rest of Earmark
- The events it queues are posted by the Accrual event processor, which then updates the deal balance, checks the controls and creates the journal, as for any shipment.
- After the processor has run, the reconciliation's unaccrued warning clears for those commitments.
- Claims and deal balances include the repaired accruals only after the processor has posted them.
Related
- Run or schedule the accrual batch jobs
- Installation guide, section 7, Batch jobs to schedule
- I want to catch accruals the hooks missed
- Understand what happens when a packing slip or invoice posts
- Check that accruals flowed today
- Page reference: Accrual instances
- Accrual event processor
- Background steps and retry
- Configuration reference