Skip to main content

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

The diagram below shows the core entities and their relationships in the Giving module. Use it as a visual reference while exploring the detailed table definitions below.

Core Entity Relationships

Giving module data model
Open diagram in new tab →

Key Relationships Explained

Donation Flow:
  1. A DONATION is created with amount and payment details
  2. DESIGNATION(s) split the donation across one or more FUNDs
  3. Donations are grouped into BATCHes for processing
  4. Batches can be organized into BATCH_GROUPs
Generic Relationship Pattern:
  • 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 System:
  • PLEDGE_CAMPAIGN defines fundraising campaigns
  • PLEDGEs are commitments made during campaigns
  • Person relationship tracked via giving_pledge_relationships
Recurring Donations:
  • RECURRING_DONATION defines the schedule and total amount
  • RECURRING_DONATION_DESIGNATIONs split recurring amounts across funds
  • Actual donations created by Planning Center on schedule
Refund Handling:
  • REFUND represents the refund transaction
  • DESIGNATION_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 the planning_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
DO NOT add these filters to your WHERE clause - they are applied automatically:
  • WHERE tenant_organization_id = 1 (unnecessary)
  • WHERE system_status = 'active' (unnecessary)
The RLS policies ensure you only access data you’re authorized to see, making these filters redundant and potentially causing performance issues.

Core Tables Overview

Primary Entity Tables

  • giving_donations - Individual donation transactions
  • giving_people - Donor profiles
  • giving_funds - Fund definitions for designated giving
  • giving_designations - Donation allocations to funds
  • giving_batches - Groups of donations processed together
  • giving_pledges - Pledge commitments
  • giving_pledge_campaigns - Campaign definitions
  • giving_recurring_donations - Automated recurring giving

Financial Processing Tables

  • giving_batch_groups - Groups of donation batches
  • giving_payment_methods - Payment method details
  • giving_payment_sources - Sources of payments
  • giving_recurring_donation_designations - Fund allocations for recurring
  • giving_refunds - Refund transactions
  • giving_designation_refunds - Refunds for specific designations

Reference Tables

  • giving_campuses - Physical locations/campuses
  • giving_organizations - Organization settings
  • giving_labels - Categorization tags
  • giving_notes - Text notes

Relationship Tables

  • giving_donation_relationships - Links donations to related entities
  • giving_designation_relationships - Links designations to donations
  • giving_pledge_relationships - Links pledges to people
  • giving_person_relationships - Links people to other entities
  • giving_batch_relationships - Links batches to related entities
  • giving_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 identifier
  • system_status - Data lifecycle status:
    • transferring - Being imported from Planning Center
    • active - Current active data
    • stale - Marked for removal
  • system_created_at - When record was created in Parable
  • system_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

  1. Schema Qualification: Always use planning_center. prefix for all table references
  2. Row Level Security: RLS automatically handles multi-tenancy and status filtering - do not add manual filters
  3. Monetary Values: All amounts are stored in cents - divide by 100.0 for display
  4. Refunded Donations: Filter refunded = true when needed for financial reports
  5. Direct ID Columns: The giving_donations table uses direct ID columns for performance optimization

Common Mistakes to Avoid

  1. Missing Schema Prefix
    • FROM giving_donations
    • FROM planning_center.giving_donations
  2. Adding Redundant RLS Filters
    • WHERE tenant_organization_id = 1 AND system_status = 'active'
    • ✅ Trust RLS to handle this automatically
  3. Joining Without Schema
    • JOIN giving_people p ON ...
    • JOIN planning_center.giving_people p ON ...
  4. Forgetting Currency Conversion
    • SELECT amount_cents as amount (displays cents)
    • SELECT amount_cents / 100.0 as amount (displays dollars)

Performance Considerations

  1. Indexes: All tables have optimized indexes on:
    • Primary keys and entity IDs
    • Join columns and foreign keys
    • Date columns for time-based queries
  2. 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

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 details
  • payment_status - Transaction status

Boolean Values

  • TRUE/FALSE for PostgreSQL boolean type
  • No NULL booleans - default to FALSE where appropriate

Next Steps