Sync Salesforce opportunities to Snowflake staging

CRMMarketingDatabase

What it does

When a new or updated opportunity reaches Closed Won status in Salesforce, this automation inserts customer and transaction rows into Snowflake. Related records sync to staging tables so the data warehouse stays current with closed deals.

Who it's for

Data and analytics teams who need Salesforce opportunities in Snowflake without manual exports.

How teams use this

Populate the data warehouse from Salesforce

Closed opportunities flow into Snowflake staging tables automatically so analysts can query customer and transaction data without waiting for manual syncs or exports.

Feed billing and revenue reports

Finance teams query the staging tables to build billing and revenue reports that reflect the latest closed deals from Salesforce in near real time.

Add custom fields to staging records

Include additional Salesforce fields in the customer or transaction rows by mapping them to new columns in the staging tables so reports capture more context.

How it works

  1. Monitor for closed opportunities. Detect when an opportunity is created or updated in Salesforce and reaches Closed Won status in real time.
  2. Insert customer record. Add a row to the customer staging table in Snowflake with the customer details from the closed opportunity in Salesforce.
  3. Insert billing address. Add a row to the billing address staging table in Snowflake with the billing location tied to that customer record.
  4. Fetch related transaction records. Query Salesforce to retrieve all transaction records linked to the closed opportunity for batch processing and insertion.
  5. Insert each transaction row. Loop through the fetched records and insert each one into the transaction staging table in Snowflake for analytics.