Prompt
I'm building a data pipeline from Salesforce and Stripe into one warehouse
Latest observation
Oct 7, 2026
OpenAI APIWeb search: off
Great use case. A Salesforce + Stripe warehouse is a very common setup for combining revenue, customer, and billing data.
A practical way to approach it:
1) Define the core entities
You’ll usually want to model these as the main shared objects:
- Customer / Account
- Salesforce:
Account,Contact - Stripe:
Customer
- Salesforce:
- Opportunity / Deal
- Salesforce:
Opportunity
- Salesforce:
- Subscription / Contract
- Stripe:
Subscription, sometimesInvoice
- Stripe:
- Payment / Invoice
- Stripe:
Invoice,Charge,PaymentIntent
- Stripe:
- Product / Price
- Stripe:
Product,Price
- Stripe:
- Activity / Lifecycle events
- Salesforce tasks/calls/emails
- Stripe subscription/invoice events
2) Decide on the warehouse modeling approach
A good default is:
- Raw/Staging layer
- Land each source table/event mostly as-is
- Keep source-specific IDs and timestamps
- Normalized/core layer
- Standardize naming, types, and keys
- Build shared dimensions like
dim_customer,dim_product,dim_date
- Analytics/mart layer
- Revenue, ARR, churn, pipeline, conversion, LTV, etc.
3) Key integration challenge: identity matching
You’ll need a clear way to connect Salesforce records to Stripe records.
Typical strategies:
- Email match between Salesforce Contact and Stripe Customer
- Explicit mapping field
- e.g. store
stripe_customer_idin Salesforce orsalesforce_account_idin Stripe metadata
- e.g. store
- Account-level mapping
- one Salesforce Account ↔ one or more Stripe Customers
- Fallback fuzzy matching
- use carefully, ideally only for exception handling
Best practice: create an identity resolution table like:
entity_typesource_systemsource_idcanonical_customer_idmatch_methodconfidence
4) Handle time and state correctly
Stripe especially is event-driven:
- subscription changes
- invoice finalization
- charge succeeds/fails
- refunds
- disputes
Salesforce is more state-oriented:
- current account/opportunity/contact state
- changes over time via history objects or CDC if available
Use:
- incremental syncs
- updated_at / created_at watermarks
- event timestamps vs ingestion timestamps
- slowly changing dimensions if you need history
5) Common warehouse outputs
Useful business tables/metrics:
- Pipeline
- open pipeline by stage
- stage conversion rates
- sales cycle length
- Revenue
- MRR / ARR
- booked vs collected revenue
- recurring vs one-time
- Billing health
- failed payments
- overdue invoices
- churn / downgrade
- Customer health
- account age
- support activity
- expansion/contraction
- Sales ↔ billing linkage
- opportunity won date vs first invoice date
- rep attribution for billing events
6) Tooling pattern
Common stack:
- Ingestion: Fivetran / Airbyte / Stitch / custom API jobs
- Transform: dbt
- Warehouse: Snowflake / BigQuery / Redshift / Databricks SQL
- Orchestration: Airflow / Dagster / Prefect
7) A good minimal schema
If you want to keep it simple initially:
Staging
stg_salesforce_accountsstg_salesforce_contactsstg_salesforce_opportunitiesstg_stripe_customersstg_stripe_subscriptionsstg_stripe_invoicesstg_stripe_charges
Core
dim_customerdim_accountdim_productfact_opportunityfact_subscriptionfact_invoicefact_payment
Mart
fct_arrfct_mrrfct_pipelinefct_customer_lifetime_value
8) Questions to answer before building
- What warehouse are you using?
- Do you need real-time or daily batch is fine?
- Is Salesforce your source of truth for accounts/customers, or Stripe?
- Do you need historical state tracking or just current snapshots?
- How do you want to match Salesforce people/accounts to Stripe customers?
If you want, I can help you design:
- a data model
- an ELT pipeline architecture
- a dbt schema
- or a field mapping between Salesforce and Stripe