Run vendor settlement
This page is for accounts payable managers who claim vendor deal money, and for the accounting manager and administrator who set it up. Run vendor settlement gathers the accrued money vendors owe you, or you owe them, groups it per vendor, currency and direction, and turns each group into a vendor claim. It then posts the claims' journals where they post automatically and submits each claim for approval; once approved, each claim line becomes a proposal for Accounts payable to post.
Runs: on demand, or as a batch job you schedule. Nothing runs it for you. Set up by: Accounting manager (parameters and posting control); System administrator (the claim approval workflow). Watched by: Accounts payable manager (the run log and the workbench); Accounts payable clerk (the proposals that follow approval).
Why it exists
Vendor deal money accrues continuously: supplier rebates on purchases, the vendor side of supplier-funded customer programs, and sales-triggered accruals owed to a third party. Collecting it from each vendor (or paying it) needs a claim per vendor and currency, and a supplier-funded program's vendor side can be claimed nowhere else. The run does that per vendor in one pass, keeps one vendor's problem from stopping the others, and logs what each run produced. Preview only lets you see what a run would claim before it writes anything.
When it runs
| Trigger | Where | Who |
|---|---|---|
| Run now | Accounts payable > Earmark > Run vendor settlement, or Earmark > Periodic tasks > Run vendor settlement | Accounts payable manager (Run vendor settlement) |
| Scheduled | The same dialog, Run in the background tab: set Batch processing and a Recurrence | The same role |
| Retry one failed group | Earmark execution exceptions, a Vendor settlement run item row, Retry selected | Accounts payable manager, Accounts receivable manager, Accounting manager |
The batch class is MGCEarmarkVendorSettlementRunController. Scheduled runs appear on System
administration > Inquiries > Batch jobs, and the job runs in the company where it was created.
Clear Preview only before you schedule. It is ticked by default, and a preview writes nothing, so a scheduled job left on preview claims nothing, every time.
Recurrence. Earmark recommends none; match it to how often you invoice or collect from vendors. Two things to weigh: a recurring job keeps the values saved with it, so Period end (one of the job's saved parameters, never reset by the run) stays the date it was saved with and later runs claim nothing accrued after that date until you change the job; and the claims each run raises go straight into approval, so a frequent run means many small claims for approvers and Accounts payable.
Settings
| Setting | Where | Default | Effect |
|---|---|---|---|
| Supplier rebate on purchases | Dialog | Ticked | Include supplier rebates. |
| Supplier-funded customer program | Dialog | Ticked | Include the vendor side of supplier-funded programs. Only this run claims it. |
| Sales-triggered vendor accrual | Dialog | Ticked | Include accruals owed to a third-party vendor. |
| Vendor selector | Dialog | All | All, Group (a vendor group) or Table (one vendor). |
| Vendor relation | Dialog | Blank | The vendor or vendor group. Required unless the selector is All. |
| Currency filter | Dialog | Blank | One currency only. Blank is every currency. |
| Minimum amount | Dialog | 0 | A group whose total (ignoring its sign) is below this is left for a later run. |
| Period end | Dialog | Today | Accruals posted up to this date are included. |
| Preview only | Dialog | Ticked | Report the groups and write nothing. |
| Post automatically for the Claim movement type | Earmark > Setup > Earmark parameters, Posting control tab | Per company | Set, the run posts each claim's claim journals straight away so it can submit the claim. Cleared, the journals wait for a person and the claims stay Open. |
| Claimable by | The deal | Per deal | Only money on deals claimable by Vendor is selected. |
| An active Earmark claim approval workflow | System administration > Workflow > User workflows | None | Needed for the run to submit what it raises (Approval workflows). |
| Vendor proposal journal name | Claim settlement tab | Blank | Not used by the run itself; needed when the claims are approved. |
| Vendor settlement run number sequence | Number sequences | Not set | The Run ID. Without one, the run is logged under an id made of VS- and a unique code. |
There is no minimum accrual age and no maximum per run here: every eligible accrual up to Period end is included.
What it does
- If the vendor module is off, it reports "The vendor module is switched off; this run selected nothing." and stops.
- It selects accrual transactions that are Accumulated, posted on or before Period end, on a deal claimable by Vendor, of a shape you ticked, in the currency and for the vendors you chose, on a module and shape that is switched on.
- It groups them by invoice account, currency and direction (money the vendor owes you is kept apart from money you owe the vendor), and drops every group whose total is below Minimum amount.
- With Preview only set, it reports each group as "Would claim vendor/currency <group>: <n> transaction(s).", then "Preview complete: <n> group(s) would be claimed. Nothing was written.", and stops. The group is shown as invoice account|currency|direction number. A preview never asks the license, so at the license block date it still lists the groups a real run would refuse.
- Otherwise, for each group in turn, on its own:
- It generates the claim through the same routine as Generate claims, which writes each claimed accrual's claim movement and an unposted claim journal. Transactions the routine refuses (for example ones already claimed) are named in the run's messages.
- It stamps the claim's direction.
- It posts the claim journals whose Post automatically was set when they were created.
- It submits the claim for approval. A claim that is not ready (a journal held for review, no active workflow) stays Open, and the reason is in the run's messages.
- If anything in the group throws, the group is recorded as a Vendor settlement run item row on Earmark execution exceptions and the run moves to the next group.
- After the last group, it logs the run once: Run ID, Status (Completed, or Completed with exceptions if any group failed), the parameters, Claims, Exceptions, Total amount (summed across currencies without conversion), Run by and Run date and time.
- It links each claim it raised to the run.
- It sends the Earmark vendor settlement run completed business event, then reports "Vendor settlement run <run> complete: <n> claim(s) raised, <n> exception(s)."
Before it can run
- Vendor deals is on in Earmark parameters, and the shapes you include are on.
- The deals are Claimable by Vendor, and their accruals have posted.
- The claim journal names and the posting profile are set, as for any claim (Generate claims).
- To have claims submitted in the same run: Post automatically is on for Claim, and the Earmark claim approval workflow is active.
- For the step after approval: Vendor proposal journal name is set (Hand approved vendor claims to accounts payable).
What goes in and what comes out
| In | Out |
|---|---|
| Accumulated accruals on vendor-claimable deals, up to Period end | One vendor claim per vendor, currency and direction group |
| Each claimed accrual's claim movement and its claim journal (posted when set to post automatically) | |
| Each claim submitted for approval, or left Open with the reason | |
| One row in Vendor settlement runs per real run (none for a preview) | |
| The Earmark vendor settlement run completed business event | |
| A Vendor settlement run item row on the workbench for each failed group |
Watching it
- Vendor settlement runs: Accounts payable > Earmark > Vendor settlement runs or Earmark >
Inquiries and reports > Vendor settlement runs, filterable on Status. Also the OData collection
MGCEarmarkVendorSettlementRuns. - The run's messages: the infolog, or the batch job's log for a scheduled run. Skipped transactions, unsubmitted claims and the summary are reported only there.
- The claims: Earmark > Claims > All claims. Open claims the run could not submit wait there.
- After approval: Accounts payable > Earmark > Vendor proposals awaiting AP and the Vendor proposals awaiting AP tile on the Earmark workspace.
- Earmark execution exceptions: Vendor settlement run item rows (a failed group) and Journal post rows (a claim journal the run tried to post and could not).
- The business event Earmark vendor settlement run completed. It has no switch of its own: it is sent while Publish deal events is on (Business events).
When it fails
| What you see | Kind | What to do |
|---|---|---|
| "Select at least one vendor shape …" or "A vendor or vendor group must be named when the vendor selector is not set to All." | Verdict at the dialog; nothing runs | Correct the dialog. |
| "The vendor module is switched off; this run selected nothing." | Verdict | Nothing to fix unless the module should be on. |
| "The claim journal for claim line <line> has not been posted, so the approval credit cannot be raised against it." | Verdict; the claim stays Open | Post the claim journals, then submit the claim from All claims (Run vendor settlement). |
| A Journal post row | Failure; the claim stays Open | Fix the cause, then Retry selected. Submit the claim afterwards. |
| Status Completed with exceptions and a Vendor settlement run item row: "Vendor settlement run item <group> failed: <cause>" | Failure for that group only | Fix the cause, then Retry selected on the row, which reruns that group. The row reads Resolved whenever the rerun does not throw, even if it raised no claim (for example at the license block date), so check All claims for the vendor afterwards. |
| "Claim <number> was generated and submitted, but could not be stamped with its settlement run reference. …" | Cosmetic | The claim is fine; only its link to the run is blank. The number shown is the claim's record ID, not its claim ID. |
| On production at the license block date, the license message for each group | Verdict | Nothing is claimed and the accruals stay Accumulated. The run is still logged as Completed with no claims and still sends Earmark vendor settlement run completed. Run it again once the license is restored (License check). |
Re-running is safe. Accruals already claimed are refused by the claim routine, so a rerun, a batch retry or a workbench retry claims only what is left and never claims anything twice. A claim recovered through Retry selected is generated and submitted correctly but is not linked to the original run, because a logged run is never changed.
Effects on the rest of Earmark
- Accrual transactions: each claimed accrual's state moves from Accumulated to Claimed, so it drops out of the next run and out of Generate claims.
- Approval: every submitted claim goes through the Earmark claim approval workflow like a customer claim (Approval workflows). On approval each line becomes a proposal for Accounts payable, never posted automatically (Hand approved vendor claims to accounts payable). A deleted proposal is re-proposed from the claim (Re-propose a vendor claim line whose proposal was deleted).
- Deal balances: the claim movements post under the deal and balance locks, as any claim does.
- Reversal: an approved vendor claim is reversed from the claim (Reverse an approved vendor claim). A vendor claim reversed before its proposals post keeps the header posting status Proposed and stays on Vendor proposals awaiting AP, shown as Reversed.
Related
- Guide: Run vendor settlement (raise vendor claims).
- Roles: Accounts payable: what you do and where, including preview a vendor settlement, run vendor settlement, read past vendor settlement runs, know why a vendor claim from the run is still Open, find a vendor claim missing after a settlement run and know what the license block stops on the vendor side.
- Pages: Vendor settlement runs, Earmark execution exceptions.
- Process: Run a vendor deal.
- Setup: Installation guide, section 7. Batch jobs to schedule; Configuration reference.
- Reference: Entity reference, Business events.
- Other operations: Generate claims, Approval workflows, Journal auto-post, Background steps and retry.