Templates / Order to cash / payment-collection

Payment Collection & Dunning

Sends an invoice and waits for the payment message, correlated on the invoice id. Each payment is applied to the ledger: a settled invoice is closed, a balance under 5 is written off, and a larger balance gets a statement before waiting again. Every 14 days without payment a reminder goes out, and after the third the invoice is handed to collections.

receive taskmessage correlationtimer boundaryloopaccounts receivable
Open in editor Download .bpmn
casen template use payment-collection
collections remind settled write-off statement No remindersyet Send invoice Awaitpayment Countreminder Hand over tocollections Send paymentreminder Applypayment toledger Write offsmallbalance Send balancestatement Closeinvoice Invoice issued 14 days unpaid Third reminder? In collections Balance left? Invoice paid

Scenarios · 2

  • The customer pays in full and the invoice is closed send-invoice → await-payment → apply-payment → close-invoice → invoice-paid
  • A 2.40 shortfall is written off apply-payment → write-off → close-invoice → invoice-paid

Job types · 5

  • collections-assign Hand over to collections
  • invoice-send Send invoice, Send payment reminder, Send balance statement
  • ledger-apply-payment Apply payment to ledger
  • ledger-close-invoice Close invoice
  • ledger-write-off Write off small balance

Files · 2

Every scenario passes on @bpmnkit/engine's runScenario in the package's tests. casen template use payment-collection [dir] writes the files above into your project — see the templates guide for running the scenarios and deploying.