Scripting on Transactions

Post-Processing Scripts on Forms and Items

The primary scripting hooks for transaction processing are on forms and items — they fire when a transaction is submitted and saved. See:

Event Handlers on Transactions

Event handlers fire when transaction records are created or updated directly — including transactions entered by staff in the admin application, recurring payment transactions created by the nightly processor, and any programmatic transaction creation.

Configure via Integration → Event Handlers, select “Transaction” as the entity.

Event When It Fires
postInsertPurchaseOrder Any new transaction is first saved
postUpdatePurchaseOrder An existing transaction is updated

Common uses:

  • Sync transaction data to an external accounting system
  • Update a contact’s lifetime giving total when a new transaction is saved
  • Trigger a GL posting for any transaction — whether from a form or entered manually

Scheduled Scripts for Payment Processing

Time-based automation supporting the payment processing lifecycle:

  • Nightly recurring payment processing — DonorPoint’s built-in engine charges all scheduled recurring donations and sends receipt/failure emails automatically
  • Settlement reconciliation — nightly download of settlement data from payment processors for deposit reconciliation reports
  • Custom scheduled scripts — additional nightly or periodic automation configured in Integration → Scheduled Scripts

Script Context

For Event Handlers on Transactions:

Variable Contents
instance The Transaction (PurchaseOrder) record
account The DonorPoint account
user The staff member (if staff-entered)

→ Full context reference: Scripting Contexts