Overview
The Giving module contains 19 entity tables and 9 relationship tables supporting donation processing, fund management, pledges, recurring donations, and financial reporting.Visual Data Model
Core Entity Relationships
Key Relationships Explained
Donation Flow:- A
DONATIONis created with amount and payment details DESIGNATION(s) split the donation across one or moreFUNDs- Donations are grouped into
BATCHes for processing - Batches can be organized into
BATCH_GROUPs
- Donor information stored via
giving_donations_relationships(relationship_type:'Person') - Campus association via
giving_donations_relationships(relationship_type:'Campus') - Designation links via
giving_donations_relationships(relationship_type:'Designation') - Fund links via
giving_designations_relationships(relationship_type:'Fund') - Payment details via
giving_donations_relationships(relationship_type:'PaymentSource')
PLEDGE_CAMPAIGNdefines fundraising campaignsPLEDGEs are commitments made during campaigns- Person relationship tracked via
giving_pledges_relationships
RECURRING_DONATIONdefines the schedule and total amountRECURRING_DONATION_DESIGNATIONs split recurring amounts across funds- Actual donations created by Planning Center on schedule
REFUNDrepresents the refund transactionDESIGNATION_REFUNDs track which fund allocations were refunded- Maintains audit trail of original donation and refund
Query Requirements
Schema Prefix
IMPORTANT: All tables in the Planning Center Giving module are in theplanning_center schema. You MUST prefix all table names with planning_center. in your queries.
✅ CORRECT: SELECT * FROM planning_center.giving_donations
❌ INCORRECT: SELECT * FROM giving_donations
Row Level Security (RLS)
This database uses Row Level Security (RLS) to automatically filter data based on:- tenant_organization_id: You only see data for your current organization
- system_status: You only see ‘active’ records by default
- ❌
WHERE tenant_organization_id = 1(unnecessary) - ❌
WHERE system_status = 'active'(unnecessary)
Core Tables Overview
Primary Entity Tables
giving_donations- Individual donation transactionsgiving_people- Donor profilesgiving_funds- Fund definitions for designated givinggiving_designations- Donation allocations to fundsgiving_batches- Groups of donations processed togethergiving_pledges- Pledge commitmentsgiving_pledge_campaigns- Campaign definitionsgiving_recurring_donations- Automated recurring giving
Financial Processing Tables
giving_batch_groups- Groups of donation batchesgiving_payment_methods- Payment method detailsgiving_payment_sources- Sources of paymentsgiving_recurring_donation_designations- Fund allocations for recurringgiving_refunds- Refund transactionsgiving_designation_refunds- Refunds for specific designationsgiving_in_kind_donations- Non-cash (in-kind) donation records
Reference Tables
giving_campuses- Physical locations/campusesgiving_organizations- Organization settingsgiving_labels- Categorization tagsgiving_notes- Text notes
Relationship Tables
giving_donations_relationships- Links donations to related entitiesgiving_designations_relationships- Links designations to donationsgiving_pledges_relationships- Links pledges to peoplegiving_people_relationships- Links people to other entitiesgiving_batches_relationships- Links batches to related entitiesgiving_refunds_relationships- Links refunds to donationsgiving_in_kind_donations_relationships- Links in-kind donations to related entitiesgiving_recurring_donation_relationships- Links recurring donations to people and fundsgiving_recurring_donation_designation_relationships- Links recurring donation designations to funds (relationship_type = 'Fund')
Table Definitions
giving_donations
Individual donation transactions from donors.
Note: Related entities (person, batch, campus, fund, recurring donation, refund) are linked via
giving_donations_relationships using relationship_type values such as 'Person', 'Batch', 'Campus', 'Designation', 'RecurringDonation', 'Refund', etc.
giving_people
Donor profiles and information.giving_funds
Fund definitions for designated giving.giving_designations
How donations are allocated to specific funds.giving_batches
Groups of donations processed together.giving_pledges
Pledge commitments for campaigns.
Note: Pledges connect to pledge campaigns and people via
giving_pledges_relationships using relationship_type values 'PledgeCampaign' and 'Person'. There is no direct pledge_campaign_id or received_cents column.
giving_pledge_campaigns
Campaign definitions for pledge drives.giving_recurring_donations
Automated recurring giving setups.giving_batch_groups
Groups of donation batches for organizational purposes.giving_payment_methods
Payment method details for recurring donations.giving_payment_sources
Sources of payments (broader category than payment methods).giving_refunds
Refund transactions for donations.giving_campuses
Physical locations/campuses for the organization.giving_organizations
Organization-level settings and information for giving.giving_labels
Categorization tags for giving-related entities.giving_notes
Text notes attached to giving-related entities.giving_recurring_donation_designations
Fund allocations for recurring donations.giving_designation_refunds
Refunds for specific designations within donations.giving_in_kind_donations
Non-cash (in-kind) donation records such as property, goods, or services.
Note: Related entities (person, fund, campus) are linked via
giving_in_kind_donations_relationships using the appropriate relationship_type values.
Relationship Tables
giving_donations_relationships
Links donations to related entities beyond the direct ID columns.giving_designations_relationships
Links designations to donations and other entities.giving_pledges_relationships
Links pledges to people and campaigns.giving_people_relationships
Links people to other entities beyond the direct ID columns.giving_batches_relationships
Links batches to related entities.giving_refunds_relationships
Links refunds to related entities.giving_in_kind_donations_relationships
Links in-kind donations to related entities.System Fields
All tables include these system fields for data management:tenant_organization_id- Multi-tenant organization identifiersystem_status- Data lifecycle status:transferring- Being imported from Planning Centeractive- Current active datastale- Marked for removal
system_created_at- When record was created in Parablesystem_updated_at- When record was last updated in Parable
Common Query Patterns
Getting Donations with Donor Information
Donation Designations by Fund
Batch Summary Report
Recurring Donation Status
Data Integrity Rules
- Schema Qualification: Always use
planning_center.prefix for all table references - Row Level Security: RLS automatically handles multi-tenancy and status filtering - do not add manual filters
- Monetary Values: All amounts are stored in cents - divide by 100.0 for display
- Refunded Donations: Filter
refunded = truewhen needed for financial reports - Relationship Tables: All entity-to-entity links (donations→person, donations→batch, designations→fund, pledges→campaign, etc.) go through relationship tables — there are no direct FK columns on these tables
Common Mistakes to Avoid
-
Missing Schema Prefix
- ❌
FROM giving_donations - ✅
FROM planning_center.giving_donations
- ❌
-
Adding Redundant RLS Filters
- ❌
WHERE tenant_organization_id = 1 AND system_status = 'active' - ✅ Trust RLS to handle this automatically
- ❌
-
Joining Without Schema
- ❌
JOIN giving_people p ON ... - ✅
JOIN planning_center.giving_people p ON ...
- ❌
-
Forgetting Currency Conversion
- ❌
SELECT amount_cents as amount(displays cents) - ✅
SELECT amount_cents / 100.0 as amount(displays dollars)
- ❌
Performance Considerations
-
Indexes: All tables have optimized indexes on:
- Primary keys and entity IDs
- Join columns and foreign keys
- Date columns for time-based queries
-
Query Optimization:
- Always use the
planning_center.schema prefix - RLS handles tenant and status filtering automatically
- Filter refunded donations when needed
- Consider CTEs for complex aggregations
- Join through the
*_relationshipstables — entity tables carry no foreign-key columns
- Always use the
Data Types and Conventions
Monetary Values
- All amounts stored in cents (INTEGER)
- Divide by 100.0 for dollar amounts
- Currency codes follow ISO 4217 (USD, CAD, EUR, etc.)
Dates and Times
- TIMESTAMP fields represent UTC time
- DATE fields for date-only values (no time component)
- All times stored without timezone info (implicit UTC)
Payment Methods
payment_method- Type (cash, check, card, ach)payment_method_sub- Subtype detailspayment_status- Transaction status
Boolean Values
- TRUE/FALSE for PostgreSQL boolean type
- No NULL booleans - default to FALSE where appropriate
Next Steps
- Start with Basic Queries for simple examples
- Progress to Advanced Queries for complex analysis
- Use Reporting Examples for production reports
- Return to Overview for overview