Scripting on Workplace Campaigns

Pre-Processing Script

When it runs: When the workplace giving form renders
Purpose: Pre-populate fields from the employee record, enforce eligibility, redirect based on campaign state

Common uses:

  • Look up the employee’s record and pre-populate employer, workgroup, and pay period
  • Redirect employees from a closed employer to an active one
  • Pre-select a fund designation based on the employee’s department

Post-Processing Script

When it runs: After a workplace pledge is saved
Purpose: Update employer totals, notify coordinator, trigger payroll system integration

Common uses:

  • Send a notification to the employer coordinator when a pledge is submitted
  • Update a running total in an external HR system
  • Generate a payroll file update record

Scheduled Scripts

Time-based automation for workplace campaigns:

  • Participation reminders — weekly script that identifies employees who have not yet pledged and queues reminder emails
  • Payroll file generation — nightly or weekly script that generates payroll deduction files in the format required by each employer’s payroll system
  • Employer reporting — scheduled script that generates employer-specific participation reports and emails them to coordinators

Configure scheduled scripts in Integration → Scheduled Scripts. See Scheduled Scripts.

Script Context

Variable Contents
campaign The workplace campaign form
purchaseOrder The completed pledge transaction
contact The employee’s Contact record
organization The employer Organization record
account The DonorPoint account
orderItems All pledge line items

→ Full context reference: Scripting Contexts