> ## Documentation Index
> Fetch the complete documentation index at: https://wegive.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Fund Mapping

> Detailed mapping between WeGive funds and Bloomerang fund objects

# Fund Mapping

This document details the mapping between WeGive fund objects and Bloomerang fund records, including fund categories, designations, and goal tracking.

## Overview

Bloomerang uses the **Fund** object to represent giving categories and designations that donors can support. WeGive maps these to the **Fund** object to maintain consistent designation structures across both platforms.

## Core Fund Mapping

### Primary Fields

| WeGive Field  | Bloomerang Field | Type    | Required | Transformation                   |
| ------------- | ---------------- | ------- | -------- | -------------------------------- |
| `id`          | Correlation ID   | String  | No       | Stored in WeGive `bloomerang_id` |
| `name`        | `Name`           | String  | Yes      | Direct mapping                   |
| `description` | `Description`    | String  | No       | Direct mapping                   |
| `is_active`   | `IsActive`       | Boolean | No       | Direct mapping                   |
| `goal_amount` | `Goal`           | Decimal | No       | Cents to dollars conversion      |

### Extended Fields

| WeGive Field | Bloomerang Field | Transformation        | Notes                     |
| ------------ | ---------------- | --------------------- | ------------------------- |
| `fund_type`  | `Category`       | Fund category mapping | General, Restricted, etc. |
| `created_at` | `DateCreated`    | ISO 8601 format       | Read-only in Bloomerang   |
| `updated_at` | `LastModified`   | ISO 8601 format       | Updated on sync           |
| `sort_order` | `SortKey`        | Numeric ordering      | Display order             |

## Fund Structure Mapping

### Basic Fund Information

When funds sync between WeGive and Bloomerang, the following information transfers:

* **Fund Name**: The display name of the fund
* **Description**: Detailed information about the fund's purpose
* **Active Status**: Whether the fund is currently accepting donations
* **Goal Amount**: Target fundraising goal (converted from cents to dollars)
* **Category**: Fund type classification
* **Sort Order**: Display order for fund lists

### Fund Categories

| WeGive Fund Type | Bloomerang Category | Description                          |
| ---------------- | ------------------- | ------------------------------------ |
| `general`        | `General`           | Unrestricted general operating funds |
| `restricted`     | `Restricted`        | Donor-restricted purpose funds       |
| `endowment`      | `Endowment`         | Permanent endowment funds            |
| `capital`        | `Capital`           | Capital campaign funds               |
| `program`        | `Program`           | Specific program funds               |
| `scholarship`    | `Scholarship`       | Scholarship and award funds          |
| `memorial`       | `Memorial`          | Memorial and tribute funds           |
| `other`          | `Other`             | Miscellaneous fund types             |

## Data Transformation

### Fund Creation Processing

**WeGive to Bloomerang Fund Sync:**
When creating or updating funds in Bloomerang from WeGive:

* Fund names and descriptions transfer directly
* Active status controls whether the fund accepts new donations
* Goal amounts convert from cents (WeGive) to dollars (Bloomerang)
* Fund categories map to appropriate Bloomerang classifications
* Sort order maintains the display sequence

**Bloomerang to WeGive Fund Import:**
When importing funds from Bloomerang into WeGive:

* All fund information including names and descriptions import
* Goal amounts convert from dollars (Bloomerang) to cents (WeGive)
* Active status and categories map appropriately
* Sort order is preserved for consistent fund listing
* System maintains connection IDs for future synchronization

### Category Mapping

**Fund Category Translation:**

Fund categories automatically map between WeGive and Bloomerang using the standardized types shown in the table above. This ensures consistent fund classification across both platforms while maintaining the specific organizational structure of your funds.

### Amount Conversion

**Goal Amount Processing:**

Fund goal amounts automatically convert between the different storage formats:

* **WeGive to Bloomerang**: Amounts convert from cents to dollars with proper decimal formatting
* **Bloomerang to WeGive**: Amounts convert from dollars to cents for precise calculations
* **Empty Goals**: Funds without goals sync appropriately as null values

## Sync Operations

### Push Operation (WeGive → Bloomerang)

**Creating New Funds:**

When creating a new fund in WeGive that syncs to Bloomerang:

* Fund name and active status are required fields
* Description, goal amount, category, and sort order are included when available
* Goal amounts are converted from cents to dollars
* Fund categories map to appropriate Bloomerang classifications
* System creates the connection between WeGive and Bloomerang funds

**Updating Existing Funds:**

When fund information is updated in WeGive:

* Changes sync to the corresponding Bloomerang fund using the established connection
* All fund properties update including name, description, goals, and category
* Active status changes control whether the fund accepts new donations

### Pull Operation (Bloomerang → WeGive)

**Importing Bloomerang Funds:**

When importing funds from Bloomerang into WeGive:

* Core fund information including names and active status imports
* Descriptions and goal amounts transfer when available
* Goal amounts convert from dollars to cents for WeGive storage
* Fund categories map to appropriate WeGive classifications
* Sort order preserves the display sequence from Bloomerang
* System establishes connections for future synchronization

## Fund Hierarchy and Organization

### Fund Grouping

**Department/Program Funds:**

When syncing hierarchical fund structures:

* Parent funds sync as main category funds
* Child funds include parent fund names for clarity in Bloomerang
* Fund categories preserve the program/department classifications
* Sort order maintains the organizational structure

### Fund Naming Conventions

**Hierarchical Fund Names:**

For funds with parent-child relationships:

* Child fund names include the parent fund name for clarity
* Hierarchical structure is maintained through naming conventions
* Fund organization helps donors understand giving categories
* Consistent naming ensures clarity across both platforms

## Fund Analytics and Reporting

### Goal Tracking

**Progress Calculation:**

Fund progress tracking works automatically across both systems:

* Total raised amounts calculate from successful transactions
* Progress percentages show completion toward fund goals
* Goal tracking maintains accuracy between WeGive and Bloomerang
* Real-time updates reflect current fundraising status

### Fund Performance Metrics

**Fund Statistics Synchronization:**

Performance metrics sync between systems to provide consistent reporting:

* Total donation amounts transfer with proper currency conversion
* Donor counts maintain accuracy across both platforms
* Last donation dates track recent fund activity
* Analytics data helps with fundraising decision-making

## Validation and Error Handling

### Fund Validation

**Required Field Validation:**

Funds must meet these requirements to sync successfully:

* **Fund Name**: Required and must be 255 characters or less
* **Goal Amount**: When specified, must be a positive amount
* **Active Status**: Determines whether the fund accepts donations

### Duplicate Fund Detection

**Fund Matching Strategy:**

The system prevents duplicate funds using intelligent matching:

* Primary matching uses system connection IDs between platforms
* Secondary matching compares fund names within your organization
* Matching ensures funds don't duplicate across sync operations

### Error Recovery

**Duplicate Name Handling:**

When fund name conflicts occur:

* System automatically appends numbers to duplicate names (e.g., "Fund Name (2)")
* Original fund names are preserved where possible
* Automatic resolution prevents sync failures due to naming conflicts

## Default Fund Management

### Default Fund Configuration

**Default Fund Setup:**

The integration automatically ensures a default fund exists:

* If no default fund is configured, the system creates a "General Operating Fund"
* Default fund receives donations that don't specify a particular fund
* Configuration can be updated through your integration settings
* Ensures all transactions have proper fund designations

### Default Fund Usage

**Transaction Fund Assignment:**

For donations without specific fund designations:

* System checks if a specific fund is assigned to the transaction
* Valid fund designations use the specified fund
* Transactions without fund assignments use your default fund
* Ensures all donations have proper fund categorization

## Sync Performance and Reliability

### Batch Fund Operations

**Efficient Fund Synchronization:**

Fund data syncs in optimized batches for better performance:

* Multiple funds process together to improve efficiency
* System determines whether to create new funds or update existing ones
* Automatic error handling logs issues for review
* Rate limiting ensures API constraints are respected

### Fund Data Caching

**Optimized Fund Mappings:**

Fund information is cached to improve sync performance:

* Fund mappings store temporarily to reduce API calls
* Cache includes fund names, IDs, and active status
* Regular refresh ensures data accuracy
* Improves overall integration performance

## Fund Lifecycle Management

### Fund Deactivation

**Managing Inactive Funds:**

When funds are deactivated:

* Status updates sync between both WeGive and Bloomerang
* Historical transactions maintain their fund references
* Inactive funds stop accepting new donations
* System preserves historical accuracy while preventing new assignments

This fund mapping ensures proper financial categorization and designation tracking between WeGive and Bloomerang while maintaining fund hierarchy and providing accurate analytics across both platforms.
