Skip to main content
Adjustments & Pay Runs

Automating Pay Run Invoicing and Emailing

Automating Pay Run Invoicing and Emailing

Overview

The Pay Run Reports job schedules the automatic creation and email delivery of pay run invoices, removing manual invoice creation from the Pay Runs screen. The job makes sure invoices are processed on schedule, and a companion report shows pay run status for your team to review.

The job can run in one of two modes:

  • Invoice and email (default): creates each pay run's invoice and emails it in a single pass.

  • Email only: emails pay run invoices that have already been created, without invoicing them again. Use this when invoices are created first by the Pay Run Invoicing job, reviewed by your team, and then emailed later the same day.

Setting Up the Job

The Pay Run Reports job is configured in System Administration > Scheduler Jobs.

Job Scheduling

Define the following when configuring the job:

Setting

Description

Frequency

How often the job should run

Timing

What time of day the job runs

Recipients

Email addresses the job's reports are sent to, or configure the report to be available in the Report Queue for download

Job Parameters

Parameter

Values

Description

Invoice

Yes (default) / No

โ€˜Yesโ€™ creates each pay run's invoice and then emails it. No runs the job in email-only mode, which emails pay runs that have already been invoiced (see Email-Only Mode below). Jobs saved before this parameter was introduced run as Yes, so you don't need to re-save them.

Delivery

Email / Post

Matched against each client's own report delivery type, so the job only processes clients set to the chosen delivery method. A Post run creates invoices but doesn't email them. Has no effect when Invoice is No, where only Email-delivery clients are emailed.

Run Date

Preview Date / Invoice Date

Selects pay runs whose preview date or invoice date is today. Only offered when Invoice is Yes. It is hidden as soon as Invoice is set to No, because email-only mode always selects pay runs dated today.

Recommended Timing

Invoice and Email Mode (Invoice = Yes)

  • Run the job early in the day: this gives your team time to review records before export to your accounting system.

  • Schedule the job outside peak hours: this minimises the impact of invoicing on the system during business hours.

  • Use a daily or periodic schedule: match the frequency of your pay cycles (for example, fortnightly or monthly).

Email-Only Mode (Invoice = No)

An email-only run doesn't create invoices, so the early-morning, outside-business-hours guidance above doesn't apply to it. It can run during business hours.

  • Schedule it after invoicing has finished: the pass can't run while invoicing is in progress anywhere in your system (see Expected Behaviour below). Schedule it clear of your invoicing runs rather than clear of business hours.

  • Run it on the pay run's own day: the pass only picks up pay runs dated today. A pay run invoiced today but not emailed today isn't picked up by a later day's pass, so email it from the Pay Run screen instead.

  • Running it more than once a day is safe: a second pass later in the same day only picks up pay runs that haven't been emailed yet.

Staging Job Configuration

Standard staging environment scheduling:

Job

Frequency

Purpose

payRunReports - Invoice = 'Yes', Delivery = 'Email' and Run Date = 'Invoice Date'

Early morning (staging)

Create pay run invoices and email them in one pass

payRunReports - Invoice = 'No'

Later the same day, after invoicing has finished and invoices have been reviewed

Email pay run invoices that have already been created, without invoicing them again

executeQuery - Pay Run Invoice Date Review

Daily

Review pay run invoice dates and identify discrepancies

If you donโ€™t need to review invoices before theyโ€™re emailed, use a single payRunReports job with Invoice = โ€˜Yesโ€™ instead of the first two rows.

Important: in the default mode (Invoice = Yes), schedule the payRunReports job to run in the early morning. Do not run it during work hours. This doesn't apply to an email-only job.

Email-Only Mode

Which Pay Runs Are Emailed

When Invoice is set to No, the job emails the full invoice for each pay run that:

  • is dated today

  • is at Pending status, meaning it has already been invoiced

  • has a posted invoice

  • belongs to a client whose report delivery type is Email

  • hasn't already been emailed.

The invoice isn't raised again, the invoice total doesn't change, and the pay run stays at Pending status.

How Already-Emailed Pay Runs Are Recognised

Each pay run invoice email now records the pay run it was sent for, whether it was sent by this job (in either mode) or from the Pay Run screen. The email-only pass uses this record to skip pay runs that have already been emailed, including pay runs emailed from the Pay Run screen earlier the same day.

This record only exists for emails sent from this release onward.

Before your first email-only pass: emails sent before this release carry no record, so the pass can't see them. If a pay run was emailed manually on the day this release is deployed, an email-only pass later that day would email it a second time. Schedule your first email-only pass no earlier than the next pay run day after the release, or check that no pay runs dated that day have already been emailed manually.

Expected Behaviour

A Pay Run Is Emailed Successfully

  • The pay run's full invoice is emailed.

  • No further invoice is created, and the pay run stays at Pending status.

  • Later passes skip the pay run.

A Pay Run Has Already Been Emailed

  • The pay run isn't emailed again, whether it was sent by the job or from the Pay Run screen.

An Email Fails to Send

  • The rest of the pass continues, and the other pay runs are still emailed.

  • The failed pay run is named on the job's exception report.

  • The pay run stays eligible, so a later pass can pick it up.

A Client Has No Email Recipient

  • The pay run isn't emailed.

  • The exception report names the pay run and the reason.

Invoicing Is in Progress

  • If invoicing is in progress anywhere in your system, the pass doesn't run and no pay runs are emailed. This includes another invoicing job that is still running, or a manual invoice left unfinished on the Pay Run screen.

  • The job reports this once, rather than once for every pay run.

  • Re-run the pass later the same day once invoicing has finished.

A Pay Run's Invoice Is Un-posted

  • A pay run with no posted invoice isn't selected, and isn't reported as a failure.

  • If the pay run was never emailed, it is picked up again once its invoice has been re-created and posted, provided it's still dated today.

  • If the pay run had already been emailed, it isn't emailed again automatically, even after its invoice is re-issued. This applies to both full and partial un-posts. Send the re-issued invoice from the Pay Run screen.

Pay Runs the Email-Only Pass Never Selects

  • Post-delivery clients: never emailed by the job, whatever the Delivery parameter is set to.

  • Pay runs still at Open status: these haven't been invoiced yet.

  • Ad-hoc pay runs: neither mode of the job selects these. Email them from the Pay Run screen.

Known Limitations

  • Bounced emails still count as sent. A pay run whose invoice email was accepted for sending but bounced for every recipient is treated as emailed, and later passes won't send it again. The Undelivered Pay Run Report Batches report lists bounced recipients in sent batches. Re-send these pay runs from the Pay Run screen.

  • The Pay Run screen has no duplicate-send warning. It doesn't warn you if a pay run has already been emailed, so check before sending a pay run manually.

Pay Run Invoice Date Review

This companion report shows pay run status (pending, open or past due), so your team can review and clean up records before export to your accounting system.

Report Delivery Methods

The report can be delivered via:

  • Email: sent directly to specified email addresses through the Mail Queue

  • Report Queue: available for download from the Report Queue screen.

Recommended file format: the report is generated as a CSV file for further review.