Data Model
Introduction
This article introduces the objects (record types) that Dryad Receipting uses in Salesforce, and the role each one plays in turning gifts into receipts. Some are objects the app adds. Others are standard Salesforce and Nonprofit Cloud objects, such as Account, Gift Transaction and Gift Commitment, that the app adds fields to.
Each object has its own article that describes its fields. The ideas behind them (receipt types, eligibility, tax rules, numbering and so on) are explained in the Core Concepts article.
The Core Objects
Receipt
The issued receipt or acknowledgment itself. It records who the receipt is for, the amounts, the charity that issued it, the templates used, and how far it has got in delivery. The app creates it from one or more gift transactions and copies the gift's values onto it at that moment. A receipt is never edited after it's issued. It is voided and replaced instead.
Receipt Assignment
The link between a receipt and each gift transaction it covers. A single receipt has one assignment, and a consolidated receipt has one for each gift. Assignments show which gifts a receipt covers, and which receipts a gift has had.
Gift Transaction
The Nonprofit Cloud record for a single gift or payment, and the starting point for every receipt. The fields Dryad Receipting adds work out whether the gift can be receipted, how much can be receipted, and which template to use. They also hold any overrides for this gift, and a link to the last receipt the gift received.
Gift Commitment
The Nonprofit Cloud record for a recurring donation or pledge, whose individual payments are gift transactions. The fields Dryad Receipting adds control receipting for the whole commitment, and several of them are copied onto each new gift transaction. The gifts of a recurring commitment are receipted together on a consolidated receipt.
Account
Accounts play two roles. Most are donors, and the fields Dryad Receipting adds hold each donor's receipt preferences: email or mail, one receipt per gift or consolidated, language, and whether to receipt them at all. A few may be Receipting Accounts: other registered charities that you issue receipts for, with their own registration number, logo, signature, templates and numbering.
Receipt Template
The design of the receipt .pdf: a page layout with merge fields that are filled in with the receipt's values. Templates are edited in the template editor and chosen in Receipt Settings, on Receipting Accounts, or on individual gifts.
Receipt Field Mapping
Controls which values are copied from the gift onto a new receipt. Each mapping says "copy this field from the gift (or its gift commitment) onto this receipt field". A standard set is installed with the app, covering the donor, the amounts and the chosen templates, and admins can add their own on the field mapping settings pages.
Batch Receipt Log
A record of one background job: creating receipts, creating .pdfs, merging, emailing, printing, or building a preview report. It shows what the job is doing, how far it has got, and any errors. Records the job works on are stamped with the log's ID, which is how the app later finds the receipts from a given batch.
Batch Receipt Log Segment
One part of a "Create .pdfs" job that is split to run in parallel. Each segment belongs to a Batch Receipt Log and tracks its own status and counts, which the log adds up.
Email
Used only with Dryad Mailer (Amazon SES). One send of receipt emails to a group of recipients, created when receipts are emailed in a batch.
Email Recipient
Used only with Dryad Mailer. One record for each receipt in a send, tracking whether that email was sent, delivered and opened.
Email Event
Used only with Dryad Mailer. A record of something Amazon SES reported about an email (sent, delivered, opened, bounced or complaint). Each event updates the matching Email Recipient.
Content Version
The standard Salesforce record behind each file. Receipt .pdfs are stored as files attached to the receipt, and the field Dryad Receipting adds holds a download link used when many .pdfs are merged into one file for printing.