Skip to main content

Scheduled Job

This article explains the scheduled receipt job: how to set it up, which gifts it creates receipts for, and which receipts it emails. It is written for Salesforce administrators and the staff who run receipting.

What the Scheduled Job Does​

The scheduled job receipts new single gifts automatically, without anyone opening Batch Receipts. Each run:

  1. finds recent opportunities (or payments, when receipting by payment) that are ready for a single receipt,
  2. creates their receipts and .pdfs, and
  3. if you chose the Create receipts and email them option, emails the receipts that are waiting to be emailed.

It is meant for day-to-day receipting of new gifts. Consolidated receipts, recurring donations, back-dated gifts and year-end runs are still done with Batch Receipts.

Setting Up the Job​

Open the Receipt Settings tab and select Scheduled Jobs. You need the Receipt Admin permission set to see this page.

OptionChoices
How often should the job run?Every 10 minutes, Every 30 minutes, Every hour, Every 12 hours, or Every day (the default).
When should the first job run?The hour of the first run, in your own Salesforce time zone.
ActionCreate receipts only, or Create receipts and email them.

Click Schedule. The page then shows the job's details instead of the form: its created date, created by, next and previous run, time zone and status. Click Refresh to update them. To change the frequency, time or action, click Delete and schedule the job again. You can have only one scheduled job.

Run It as Someone Who Can See Everything​

The job runs as the person who scheduled it, and only selects gifts and receipts that person can see in Salesforce. Schedule it as a user who can view all the records it needs, such as a System Administrator. If that user is later deactivated, the job stops running. Delete it and schedule it again as another user.

Which Gifts Get a Receipt​

Each run picks up:

  • When Enable Receipt by Payment is off: opportunities with a Receipt Status of "Eligible" and a Payment Date of yesterday or later.
  • When it's on: payments with a Receipt Status of "Eligible" and a Payment Date of yesterday or later.

Gifts that are "Eligible for Consolidated", including the gifts of recurring donations, are left for Batch Receipts. Once a gift is receipted its Receipt Status changes, so a later run doesn't receipt it again. The Receipt Eligibility article explains the statuses.

Back-dated gifts are missed. A gift entered today with a Payment Date from last week is never picked up. Neither is an older gift that becomes eligible later, for example when it is marked "Paid" or its donor's address is fixed. Use Batch Receipts with a date range to catch these.

Which Receipts Get Emailed​

With the Create receipts and email them option, the email step starts once the run's .pdfs are all finished. It emails every receipt that is "To Be Emailed" and hasn't been emailed yet, not only the receipts the run just created.

  • Emails always go through Salesforce, even when Send Emails Using is set to "Amazon SES". Dryad Mailer is used only by Batch Receipts > Email receipts.
  • Each email uses the receipt's email template and sender address, and has the receipt's .pdf attached. The Email Setup article explains who receives the email.
  • Before each group of emails, the app checks the Daily Email Limit and the email allowance Salesforce has left. Receipts that don't fit stay "To be Emailed" and are picked up by a later run.

With the Create receipts only option, nothing is emailed. Receipts wait as "To be Emailed" until you send them from Batch Receipts > Email receipts, or with the Email Receipt button on each receipt.

When a Run Is Skipped​

A run does nothing, with no receipts and no emails, if a "Create Receipts" or "Create .pdfs" job started today is still running. That includes the previous run of the scheduled job and anything started from Batch Receipts. This stops two jobs from receipting the same gifts. The next run picks up where it left off.

Before checking, the run closes any .pdf segments whose jobs ended without finishing them, so a stalled job doesn't block it for good.

Troubleshooting​

SymptomCheck
A gift didn't get a receiptCheck its Receipt Status is "Eligible" and that its Payment Date was yesterday or later when the job ran. Otherwise, receipt it with Batch Receipts or the New Receipt button.
No logs at the time the job should have runLook for a "Create Receipts" or "Create .pdfs" log from today that is still "In Progress". Check the job's status and next run on the Scheduled Jobs page, and that the user who created it is still active.
Receipts were created but not emailedCheck the job's action is Create receipts and email them. Open the receipt: its delivery status must be "To be Emailed". "To be Printed" means the donor doesn't prefer email, or the receipt is missing an address or email template.
Old receipts were emailed by the jobThe email step sends every receipt still waiting to be emailed, however old. Send or set them as emailed beforehand, or choose Create receipts only.
Some gifts or receipts are never picked upThe person who scheduled the job may not be able to see them. Schedule the job again as a user who can see all records.