Project Mapping
Project Mapping
WeGive Funds map to Virtuous Projects. This mapping is intentionally minimal: push is create-only, and pull carries a handful of fields plus archival logic.
Record Model
| WeGive record | Virtuous record | Correlation column |
|---|---|---|
| Fund | Project | virtuous_id |
Push (WeGive → Virtuous)
Funds are pushed with POST Project only when they don’t yet have a virtuous_id. Once a Fund is linked to a Virtuous Project, the integration does not update it — push is create-only.
POST Project{ "name": <fund.name>, "revenueAccountingCode": "<organization_id>:<fund_id>", "createDateTimeUtc": <fund.created_at, ISO 8601>, "InventoryStatus": "Unspecified", "Type": "Unspecified", "Location": "Unspecified"}| Virtuous field | Source |
|---|---|
name | fund.name |
revenueAccountingCode | <organization_id>:<fund_id> (used to correlate back to WeGive) |
createDateTimeUtc | fund.created_at |
InventoryStatus / Type / Location | constant "Unspecified" |
The returned id is stored as the Fund’s virtuous_id. No goal, description, or project-type fields are sent.
Pull (Virtuous → WeGive)
Projects are pulled via POST Project/Query (1000 per page, filtered by the configured pull_by date) and imported as Funds, matched on virtuous_id:
| WeGive field | Source |
|---|---|
virtuous_id | project id |
name | onlineDisplayName, falling back to name |
code | projectCode |
created_at | existing value, else createDateTimeUtc |
Archival
A pulled Project is soft-deleted (archived) in WeGive when an archival rule is enabled and the matching Virtuous flag is false:
| Integration setting | Archives when |
|---|---|
archive_funds_when_inactive | isActive is false |
archive_funds_when_not_public | isPublic is false |
archive_funds_when_not_available_online | isAvailableOnline is false |
If none of the enabled rules match, the Fund is restored (its deleted_at is cleared).
This reflects the integration as implemented in app/Integrations/Virtuous.php.