Skip to main content
Grain: CAMPAIGNS — one row per campaign. COMMUNICATIONS — one row per channel within a campaign. SEGMENTS — one row per recipient subgroup within a communication.
When a gift is recorded, it carries a SEGMENT_KEY that links it to the marketing chain that solicited it. Following that key up through SEGMENTSCOMMUNICATIONSCAMPAIGNS reveals which campaign drove the gift and how much each segment raised.
Key rule: The hierarchy flows top-down at setup but is queried bottom-up from the gift. Start at GIFTS.SEGMENT_KEY, then join upward to reach campaign totals.
Solid lines — required join (FK always populated). Dotted lines — optional join (FK is nullable; always use LEFT JOIN).

Table columns

Tables on this page: CAMPAIGNS · COMMUNICATIONS · SEGMENTS · GIFTS (boundary) · CONTACTS (boundary)

CAMPAIGNS

One row per top-level marketing initiative. For all campaign-related tables including emails and events, see Campaigns — extended reference.
ColumnTypeNotes
CAMPAIGN_KEYTEXTPrimary key
NAMETEXTCampaign name (e.g. “End of Year 2025”)
START_DATE_TIME_UTCTIMESTAMPCampaign start date
END_DATE_TIME_UTCTIMESTAMPCampaign end date
GIVING_GOALNUMBERDollar goal for the campaign
CAMPAIGN_IS_DELETEDBOOLEANSoft delete flag — always filter WHERE CAMPAIGN_IS_DELETED = FALSE
CAMPAIGN_IS_ARCHIVEDBOOLEANCampaign is archived

COMMUNICATIONS

One row per channel within a campaign (e.g. Direct Mail, Email Blast). Contains pre-aggregated performance totals.
ColumnTypeNotes
COMMUNICATION_KEYTEXTPrimary key
CAMPAIGN_KEYTEXTFK → CAMPAIGNS
NAMETEXTCommunication name
COMMUNICATION_TYPE_NAMETEXTChannel type (e.g. Email, Direct Mail)
TOTAL_GIFTSNUMBERTotal number of gifts received
TOTAL_GIFT_AMOUNTNUMBERTotal dollar amount of gifts received
AVERAGE_GIFT_AMOUNTNUMBERAverage gift amount
COMMUNICATION_IS_DELETEDBOOLEANSoft delete flag

SEGMENTS

One row per recipient subgroup within a communication. SEGMENT_KEY is the FK carried on GIFTS — it is the entry point for all campaign attribution queries.
ColumnTypeNotes
SEGMENT_KEYTEXTPrimary key — also FK on GIFTS.SEGMENT_KEY
COMMUNICATION_KEYTEXTFK → COMMUNICATIONS
NAMETEXTSegment name (e.g. “Board Members”, “Lapsed Donors”)
CODETEXTSegment code for mail/print processing
TOTAL_GIFTSNUMBERTotal gifts attributed to this segment
TOTAL_GIFT_AMOUNTNUMBERTotal gift revenue attributed to this segment
SEGMENT_IS_DELETEDBOOLEANSoft delete flag

GIFTS

GIFTS appears in this diagram as the attribution target — the transaction that carries SEGMENT_KEY back to the campaign hierarchy. The full gift structure is documented in Gifts — extended reference.
ColumnTypeNotes
GIFT_KEYTEXTPrimary key
CONTACT_KEYTEXTFK → CONTACTS — the giving unit
SEGMENT_KEYTEXTFK → SEGMENTS — campaign attribution entry point
GIFT_DATE_UTCTIMESTAMPDate the gift was made
AMOUNTNUMBERTotal gift amount
GIFT_IS_DELETEDBOOLEANSoft delete flag

CONTACTS

CONTACTS appears in this diagram as the giving unit linked to each gift. The full contacts structure is documented in Contacts — extended reference.
ColumnTypeNotes
CONTACT_KEYTEXTPrimary key
NAMETEXTContact display name
CONTACT_IS_DELETEDBOOLEANSoft delete flag
Data freshness: These tables sync continuously from Virtuous CRM. Typical lag is under 4 hours. To check when a record was last updated, inspect the SF__ROW_SYNCED_DATE_TIME_UTC column on any table.
Last modified on May 22, 2026