Planning Center Giving Data Model
This document provides complete documentation of the Planning Center Giving data model in Parable, including all tables, fields, and relationships.Overview
The Giving module contains 18 entity tables and 6 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_donation_relationships(relationship_type:person) - Campus association via
giving_donation_relationships(relationship_type:campus) - Payment details via
giving_donation_relationships(relationship_type:payment_method,payment_source)
PLEDGE_CAMPAIGNdefines fundraising campaignsPLEDGEs are commitments made during campaigns- Person relationship tracked via
giving_pledge_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 designations
Reference Tables
giving_campuses- Physical locations/campusesgiving_organizations- Organization settingsgiving_labels- Categorization tagsgiving_notes- Text notes
Relationship Tables
giving_donation_relationships- Links donations to related entitiesgiving_designation_relationships- Links designations to donationsgiving_pledge_relationships- Links pledges to peoplegiving_person_relationships- Links people to other entitiesgiving_batch_relationships- Links batches to related entitiesgiving_refund_relationships- Links refunds to donations
Table Definitions
giving_donations
Individual donation transactions from donors.
Note: This table uses direct ID columns for performance optimization rather than relationship tables.
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.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.Relationship Tables
giving_donation_relationships
Links donations to related entities beyond the direct ID columns.giving_designation_relationships
Links designations to donations and other entities.giving_pledge_relationships
Links pledges to people and campaigns.giving_person_relationships
Links people to other entities beyond the direct ID columns.giving_batch_relationships
Links batches to related entities.giving_refund_relationships
Links refunds 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 - Direct ID Columns: The
giving_donationstable uses direct ID columns for performance optimization
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
- Use direct ID columns when available instead of relationship tables
- 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