Sync Redshift data to Salesforce via S3

Recipe ToolsMarketingDatabaseData ParserUtilitiesDeveloper ToolCRM

What it does

When a scheduled interval triggers, this automation runs custom SQL in Amazon Redshift to select rows. The results convert to CSV, upload to Amazon S3, and Salesforce upserts the marketing subscription records in bulk from that file.

Who it's for

Data and analytics teams who need to sync Redshift data into Salesforce on a schedule without manual exports.

How teams use this

Sync subscription status daily

Run the custom SQL query each morning to pull updated subscription statuses from Redshift and upsert them into Salesforce so the sales team always has current data.

Bulk update campaign metrics

Modify the SQL query to fetch campaign performance metrics from Redshift and sync them to Salesforce marketing records in bulk, keeping campaign data fresh without manual work.

Filter records by date range

Add a date range condition to the SQL query so only records modified in the last 24 hours are selected and synced, reducing the volume of data processed each run.

Route to different S3 buckets

Set up multiple S3 bucket paths based on record type or region so different teams can access their relevant data, and Salesforce pulls from the correct bucket for each upsert.

How it works

  1. Start on a specified interval. This automation runs on a schedule you set, such as daily or weekly, to keep Salesforce in sync with your Redshift data.
  2. Select rows using custom SQL. Run your custom SQL query in Amazon Redshift to fetch the rows you need, such as updated marketing subscription records.
  3. Compose CSV from results. Convert the Redshift query results into a CSV file format so Amazon S3 and Salesforce can read and process the data.
  4. Upload file to S3 bucket. Write the CSV file to your Amazon S3 bucket so Salesforce can access it for the bulk upsert operation.
  5. Upsert marketing subscription records. Bulk upsert the marketing subscription records in Salesforce from the CSV file, updating existing records or creating new ones.