Haystack 2.x component that ingests Salesforce Nonprofit Success Pack (NPSP) donor data as Documents for RAG.
Project description
Haystack — Salesforce NPSP
A Haystack 2.x component that ingests Salesforce
Nonprofit Success Pack (NPSP) donor data as Documents for RAG pipelines —
no Airbyte, no CDK.
Unlike a raw Salesforce connector, this is NPSP-aware: it understands
npo02__ and npsp__ field prefixes and emits human-readable donor summaries
(giving totals, gift history, engagement) instead of raw JSON.
Installation
pip install haystack-salesforce-npsp
Credentials
export SF_USERNAME="you@yourorg.org"
export SF_PASSWORD="your_password"
export SF_TOKEN="your_security_token"
Usage
from haystack import Pipeline
from haystack.components.embedders import SentenceTransformersDocumentEmbedder
from haystack.document_stores.in_memory import InMemoryDocumentStore
from haystack.components.writers import DocumentWriter
from haystack_salesforce_npsp import SalesforceNPSPFetcher
store = InMemoryDocumentStore()
indexing = Pipeline()
indexing.add_component("fetch", SalesforceNPSPFetcher(
soql_filter="npo02__TotalOppAmount__c > 5000",
limit=500,
))
indexing.add_component("embed", SentenceTransformersDocumentEmbedder())
indexing.add_component("write", DocumentWriter(document_store=store))
indexing.connect("fetch.documents", "embed.documents")
indexing.connect("embed.documents", "write.documents")
indexing.run({})
Each Document has:
.content— narrative donor profile (name, giving summary, recent gifts).meta— structured donor fields (donor_id,total_gift_amount,gift_count,affiliation,source="salesforce_npsp", …)
Affinity scores
Pass a callable (meta: dict) -> float as affinity_score_fn to inject an
ML-derived donor propensity score into every document's metadata at fetch time.
SalesforceNPSPFetcher(affinity_score_fn=lambda m: min(50 + m["total_gift_amount"] / 5000, 100))
Note: because
affinity_score_fnis an arbitrary callable, a fetcher configured with one is not YAML-serializable. Instantiate it in Python.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file haystack_salesforce_npsp-0.1.0.tar.gz.
File metadata
- Download URL: haystack_salesforce_npsp-0.1.0.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4ba7f4b54627ec41979bdfb966ba22d012bab8b970fdf1aef695e601ceefb61
|
|
| MD5 |
729029bf202971e715f6bae51d72906b
|
|
| BLAKE2b-256 |
515f57bbb545d82fbaf1547ce32895bb73fbd7d0796587e081f3f088c1f088be
|
Provenance
The following attestation bundles were made for haystack_salesforce_npsp-0.1.0.tar.gz:
Publisher:
publish.yml on PhilanthroPy-Project/salesforce-npsp-integrations
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
haystack_salesforce_npsp-0.1.0.tar.gz -
Subject digest:
a4ba7f4b54627ec41979bdfb966ba22d012bab8b970fdf1aef695e601ceefb61 - Sigstore transparency entry: 2202596126
- Sigstore integration time:
-
Permalink:
PhilanthroPy-Project/salesforce-npsp-integrations@b67d0dac63a5f9f709b770aec2cfce00678a5df1 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/PhilanthroPy-Project
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b67d0dac63a5f9f709b770aec2cfce00678a5df1 -
Trigger Event:
release
-
Statement type:
File details
Details for the file haystack_salesforce_npsp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: haystack_salesforce_npsp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7ce055b7d89178b2472bfbb17bf2354c2396dc5cd219c1fd1da8d6e2c861069
|
|
| MD5 |
f2236eee3babf248849e0619aa475ec7
|
|
| BLAKE2b-256 |
cb5f15a20c2bf7886bb4cf055b83fb63965fcbcd6e4bd6a1c846365c7987688f
|
Provenance
The following attestation bundles were made for haystack_salesforce_npsp-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on PhilanthroPy-Project/salesforce-npsp-integrations
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
haystack_salesforce_npsp-0.1.0-py3-none-any.whl -
Subject digest:
d7ce055b7d89178b2472bfbb17bf2354c2396dc5cd219c1fd1da8d6e2c861069 - Sigstore transparency entry: 2202596136
- Sigstore integration time:
-
Permalink:
PhilanthroPy-Project/salesforce-npsp-integrations@b67d0dac63a5f9f709b770aec2cfce00678a5df1 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/PhilanthroPy-Project
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b67d0dac63a5f9f709b770aec2cfce00678a5df1 -
Trigger Event:
release
-
Statement type: