Salesforce Marketing Cloud Source
Connect Salesforce Marketing Cloud (SFMC) as a source to sync your marketing data -- including subscribers, email sends, tracking events, journeys, and Data Extensions -- into your data warehouse.
What is Salesforce Marketing Cloud?
Salesforce Marketing Cloud (SFMC) is a digital marketing platform used to manage email campaigns, customer journeys, and subscriber data. It stores data across several areas:
- Email Studio -- email campaigns, sends, and tracking (opens, clicks, bounces)
- Contact Builder -- subscriber profiles and attribute groups
- Journey Builder -- automated marketing journeys
- Data Extensions -- custom data tables you create in SFMC
Supaflow connects to SFMC and syncs all of this data into your warehouse automatically.
Prerequisites
Before you begin, ensure you have:
- An active Salesforce Marketing Cloud account
- Admin access to create Installed Packages in SFMC Setup
- API Integration enabled for your SFMC account
- Automations: Read/Write/Execute (required for Data Views sync)
- Data Extensions: Read (Write required for Data Views sync)
Configuration
Step 1: Create an Installed Package in SFMC
An Installed Package is how SFMC grants API access to external tools like Supaflow. You need to create one so Supaflow can read your data.
-
Navigate to Setup:
- Log in to Salesforce Marketing Cloud
- Go to Setup > Platform Tools > Apps > Installed Packages
-
Create New Package:
- Click New
- Enter a name (e.g., "Supaflow Integration")
- Enter a description
-
Add API Component:
- Click Add Component
- Select API Integration
- Choose Server-to-Server integration type
-
Set Permissions:
- Data Extensions: Read (Write required for Data Views sync)
- Contacts: Read
- Journeys: Read
- Email: Read
- Automations: Read/Write/Execute (required for Data Views sync)
- Tracking Events: Read
-
Save and Copy Credentials:
- Click Save
- Copy the Client ID and Client Secret -- you will need these in Supaflow
- Note your Subdomain (e.g.,
mcxyz123abcfrom your SFMC URL)
Your subdomain appears in your SFMC login URL. For example, if your URL is https://mcxyz123abc.auth.marketingcloudapis.com, your subdomain is mcxyz123abc.
Step 2: Authentication
Enter the credentials from your Installed Package into Supaflow:
Client ID*The Client ID from your SFMC Installed Package.
Copy from Installed Package setup
The Client Secret from your SFMC Installed Package.
Stored encrypted
Your SFMC subdomain (e.g., mcxyz123abc).
Example: mcxyz123abc
Supaflow uses OAuth 2.0 to authenticate with SFMC. Access tokens are automatically managed and refreshed -- you do not need to worry about token expiration.
Step 3: Sync Configuration (Optional)
Historical Sync Start DateHow far back to sync data on the first run. High-volume tables (tracking events, list subscribers) will be synced in 30-day windows starting from this date. If left blank, defaults to 180 days ago.
Format: YYYY-MM-DD
Example: 2024-01-01
Default: First day of month 180 days ago
When enabled, Supaflow syncs SFMC Data Views (system tables like _Sent, _Open, _Click, _Bounce) which provide richer tracking data than standard objects. Supaflow creates temporary Data Extensions, Query Activities, and Automations on each sync and cleans them up automatically. Requires Automations: Read/Write/Execute and Data Extensions: Read/Write in your Installed Package.
Default: true (enabled)
Data Views are built-in SFMC system tables that contain detailed tracking and operational data. They include fields not available through standard objects, such as IsUnique (whether an open/click was the first from that subscriber). When Data Views sync is enabled, Supaflow consolidates the six email tracking Data Views into a single event table for easier analysis.
Step 4: Advanced Settings (Optional)
Account ID MIDYour Marketing Cloud Account ID (Member ID). Only needed if you want to sync shared Data Extensions or distinguish them from local ones. Found in Setup > Company Settings > Company Information.
Optional
Include Data Extensions shared across Business Units.
Default: true
Include Data Extensions synced from Salesforce CRM via the Marketing Cloud Connect integration.
Default: true
Number of records to fetch per API call.
Default: 2500
Range: 1 to 2500
Maximum API requests per second. Lower this if you share your SFMC API quota with other integrations.
Default: 10
Range: 1 to 50
Recommended: 10
Maximum number of retry attempts for failed API calls. Supaflow uses exponential backoff between retries.
Default: 5
Range: 0 to 10
How long to wait when establishing a connection to SFMC.
Default: 30000
Range: 1000 to 120000
How long to wait for SFMC to respond to a request.
Default: 60000
Range: 1000 to 300000
How often (in minutes) Supaflow checks for new or changed Data Extensions in SFMC.
Default: 60
Range: -1 to 10080
Options:
- 0 = Check before every pipeline run (most accurate, slower)
- 60 = Check every hour (recommended)
- -1 = Never refresh automatically
When running incremental syncs, look back this many seconds from the last sync position to catch late-arriving data. Useful for tracking events that may be recorded with a slight delay in SFMC.
Default: 0
Range: 0 to 86400 (24 hours)
Recommended: 300-600 for production
Step 5: Test & Save
Click Test & Save to verify your connection and save the source. Supaflow will attempt to authenticate with SFMC and discover your available objects.
Available Objects
The objects below are what you will see in the Supaflow UI by default. Some objects appear only when Sync Data Views is enabled (default) or disabled, and some require specific SFMC features.
Core Objects (always visible)
| SFMC Object | Supaflow Object Name | Incremental | Description |
|---|---|---|---|
| Subscribers | subscribers | No | All subscriber records with email addresses, status, and profile attributes |
| Lists | lists | Yes | Email lists used to organize subscribers |
| List Subscribers | list_subscribers | Yes | The relationship between subscribers and lists (synced in 30-day windows) |
| Sends | sends | Yes | Email send job records with delivery statistics |
| Triggered Send Definitions | triggered_send_definitions | Yes | Definitions for triggered (transactional) email sends |
| Emails | emails | Yes | Email content and template definitions |
| Campaigns | campaigns | No | Marketing campaign records |
| Campaign Assets | campaign_assets | No | Child object — only syncs when campaigns is selected |
| Send Summary | send_summary | Yes | Aggregate send statistics per send job |
| List Send | list_send | No | Per-list send statistics |
| Link Send | link_send | No | Per-link click statistics |
| Folders | data_folders | Yes | Folder structure in SFMC |
| Content Areas | content_area | Yes | Reusable content blocks |
| Account Users | account_user | Yes | SFMC user accounts in your organization |
| Attribute Groups | attributeGroups | No | Contact Builder attribute group definitions |
| Assets | asset | No | Content Builder assets (images, documents, HTML blocks) |
| Email Definitions | email_definition | No | Transactional email definitions |
| Journeys | journey | No | Journey Builder journeys (activities, triggers, and goals are embedded JSON fields) |
| Event Definitions | event_definition | No | Journey entry event definitions |
| Categories | category | No | Content categories and folders |
| SMS Definitions | sms_definition | No | SMS message definitions |
| Push Definitions | push_definition | No | Push notification definitions |
| Audit Events | audit_event | Yes | Audit log of administrative actions |
| Security Events | security_event | Yes | Security events (logins, logouts, password changes) |
| Push Applications | push_application | Yes | Push notification applications (requires MobilePush) |
| Locations | location | No | Geofence locations (requires MobilePush) |
Data Extensions
Data Extensions are custom data tables you create in SFMC. Supaflow discovers them automatically and syncs them using a naming prefix to indicate their type:
| Type | Supaflow Prefix | Incremental | Description |
|---|---|---|---|
| Standard | ext_<name> | No | Data Extensions you created in your Business Unit |
| Shared | shared_ext_<name> | No | Data Extensions shared across Business Units |
| Salesforce-synced | sf_ext_<name> | No | Data Extensions synced from Salesforce CRM |
| Shared Salesforce-synced | shared_sf_ext_<name> | No | Salesforce-synced Data Extensions shared across Business Units |
| Synchronized | sync_ext_<name> | No | Synchronized Data Extensions |
Event Tracking (Sync Data Views = OFF)
These tracking event objects appear only when Sync Data Views is disabled.
| SFMC Object | Supaflow Object Name | Incremental | Description |
|---|---|---|---|
| Sent Events | sent_events | Yes | Email sent tracking events (synced in 30-day windows) |
| Open Events | open_events | Yes | Email open tracking events (synced in 30-day windows) |
| Click Events | click_events | Yes | Link click tracking events (synced in 30-day windows) |
| Bounce Events | bounce_events | Yes | Bounce tracking events (synced in 30-day windows) |
| Unsubscribe Events | unsub_events | Yes | Unsubscribe tracking events (synced in 30-day windows) |
| Not Sent Events | not_sent_events | Yes | Events for emails that were skipped or not sent (synced in 30-day windows) |
Data Views
Data Views are built-in SFMC system tables that contain operational and tracking data. They are synced when Sync Data Views is enabled (default). When enabled, the consolidated event object replaces the tracking event tables above.
Email Tracking Data Views -- these six Data Views are consolidated into a single event object in Supaflow:
| SFMC Data View | Supaflow Object Name | Incremental | Description |
|---|---|---|---|
_Sent, _Open, _Click, _Bounce, _Unsubscribe, _Complaint | event (consolidated) | Yes | All email tracking events in a single table with an event type column |
Individual Data Views -- each of these is synced as a separate object:
| SFMC Data View | Supaflow Object Name | Incremental | Description |
|---|---|---|---|
_Job | data_view_job | Yes | Email send job data |
_Journey | data_view_journey | Yes | Journey metadata |
_JourneyActivity | data_view_journey_activity | No | Journey activity data |
_ListSubscribers | data_view_list_subscribers | No | Subscriber-to-list membership |
_Subscribers | data_view_subscribers | Yes | Enterprise-level subscriber data (Enterprise accounts only) |
_BusinessUnitUnsubscribes | data_view_bu_unsubscribes | Yes | Business Unit-level unsubscribe data (Enterprise parent account only) |
_FTAF | data_view_ftaf | Yes | Forward To A Friend tracking data |
_ReconcilableDispositionView | data_view_reconcilable_disposition | Yes | Email/SMS reconciliation data (7-day retention in SFMC) |
_SMSMessageTracking | data_view_sms_tracking | Yes | SMS send and receive history (requires MobileConnect) |
_SMSSubscriptionLog | data_view_sms_subscription_log | Yes | SMS subscription opt-in/opt-out log (requires MobileConnect) |
_UndeliverableSMS | data_view_undeliverable_sms | Yes | Failed SMS deliveries (requires MobileConnect) |
_MobileLineAddressContactSubscriptionView | data_view_groupconnect_subscriptions | Yes | LINE follower subscription data (requires GroupConnect) |
_MobileLineOrphanContactView | data_view_line_orphan | Yes | Orphaned LINE contacts (requires GroupConnect) |
_SocialNetworkTracking | data_view_social_tracking | Yes | Social share tracking data (requires Social Forward) |
_SocialNetworkImpressions | data_view_social_impressions | Yes | Social share impression data (requires Social Forward) |
When Data Views sync is enabled, Supaflow creates temporary Data Extensions, Query Activities, and Automations on every sync and cleans them up automatically. Your Installed Package must have Automations: Read/Write/Execute and Data Extensions: Read/Write permission for this to work.
If you prefer manual control, you can disable Sync Data Views and create your own Query Activities:
- In SFMC, go to Automation Studio > Activities > SQL Query
- Create a query selecting from the Data View (e.g.,
SELECT * FROM _Sent WHERE EventDate > DATEADD(day, -7, GETDATE())) - Set the target to a new Data Extension
- Schedule the automation to run on your desired frequency
- Supaflow will discover and sync the resulting Data Extension
Journey Data
Journeys are synced as complete documents. Activities, triggers, goals, and other journey components are stored as JSON fields within the journey object:
| Field | What it Contains |
|---|---|
activities | All activity steps in the journey (emails, waits, decision splits, etc.) |
triggers | Entry triggers and event configurations |
goals | Journey goal definitions |
exits | Exit criteria |
stats | Journey performance statistics |
metaData | Additional journey metadata |
Extracting Journey Activities in Snowflake
If you need to analyze individual journey activities as separate rows, you can use Snowflake's FLATTEN function to parse the embedded JSON:
-- Create a view with one row per journey activity
CREATE OR REPLACE VIEW journey_activities AS
SELECT
j.id AS journey_id,
j.name AS journey_name,
j.status AS journey_status,
a.value:id::STRING AS activity_id,
a.value:key::STRING AS activity_key,
a.value:name::STRING AS activity_name,
a.value:type::STRING AS activity_type,
a.value:outcomes AS activity_outcomes,
a.value:configurationArguments AS config_args
FROM your_schema.journey j,
LATERAL FLATTEN(input => TRY_PARSE_JSON(j.activities)) a;
-- Extract only email send activities
SELECT
j.id AS journey_id,
j.name AS journey_name,
a.value:id::STRING AS activity_id,
a.value:name::STRING AS activity_name,
a.value:configurationArguments:triggeredSend:emailId::STRING AS email_id
FROM your_schema.journey j,
LATERAL FLATTEN(input => TRY_PARSE_JSON(j.activities)) a
WHERE a.value:type::STRING = 'EMAILV2';
-- Extract decision split branches
SELECT
j.id AS journey_id,
a.value:id::STRING AS activity_id,
a.value:name::STRING AS activity_name,
o.value:key::STRING AS outcome_key,
o.value:name::STRING AS outcome_name
FROM your_schema.journey j,
LATERAL FLATTEN(input => TRY_PARSE_JSON(j.activities)) a,
LATERAL FLATTEN(input => a.value:outcomes) o
WHERE a.value:type::STRING = 'MULTICRITERIADECISION';
Incremental Sync
Incremental sync is enabled when an object has a cursor field and the SFMC API supports filtering on that field. Objects that support incremental sync are marked in the Available Objects table above.
- Tracking event tables and list_subscribers are synced in 30-day windows for reliability.
- Data Views (including event) use a single query over the requested time range (no client-side windowing).
Objects that do not support incremental sync are fully refreshed on each run.
Troubleshooting
Authentication failed
Problem: "Invalid credentials", "401 Unauthorized", or connection test fails.
Solutions:
- Verify credentials -- Go to SFMC Setup > Installed Packages and confirm your Client ID and Client Secret are correct. Make sure the package status is Enabled.
- Check subdomain -- Your subdomain should match your SFMC login URL (e.g.,
mcxyz123abc). Do not includehttps://or.auth.marketingcloudapis.com. - Verify permissions -- Your Installed Package must have the required API permissions listed in the Prerequisites section.
- Regenerate credentials -- If credentials may have been rotated, edit your Installed Package, regenerate the Client Secret, and update it in Supaflow.
No Data Extensions appearing
Problem: Connection succeeds but no Data Extensions show up.
Solutions:
- Check permissions -- Your Installed Package must have Data Extensions: Read permission.
- Verify Data Extensions exist -- Log in to SFMC and go to Email Studio > Data Extensions to confirm they exist.
- Check Business Unit access -- Your Installed Package must have access to the Business Unit where the Data Extensions live.
- Set Account ID MID -- For shared Data Extensions, enter your Account ID in Advanced Settings (found in SFMC Setup > Company Settings > Company Information).
Missing tracking events or incomplete data
Problem: Opens, clicks, or sends data is missing or stops after a certain date.
Solutions:
- Verify permissions -- Your Installed Package needs Tracking Events: Read and Email: Read permissions.
- Check Historical Sync Start Date -- SFMC retains event data for approximately 6 months. Make sure your start date is within this retention window.
- Use lookback time -- Set Lookback Time Seconds to 300-600 (5-10 minutes) to catch late-arriving tracking events.
- Verify sends occurred -- Check Email Studio > Tracking > Send Log to confirm emails were sent during the sync period.
Data Views sync failed
Problem: Sync fails with errors like “Failed to create QueryDefinition/Automation” or “Permission/Unauthorized”.
Solutions:
- Verify permissions -- Your Installed Package must include Automations: Read/Write/Execute and Data Extensions: Read/Write (in addition to Tracking Events: Read).
- Check Automation Studio access -- Ensure your SFMC org allows creating Query Activities and Automations.
- Retry after clearing temp objects -- If a previous run left objects behind, delete any temporary items prefixed with
supa_evt_,supa_qry_, orsupa_auto_in SFMC and retry.
Event table is empty (Sync Data Views enabled)
Problem: The consolidated event table exists but has no rows.
Solutions:
- Check Historical Sync Start Date -- Data Views are pulled from that start date forward. Keep it within SFMC retention windows (often ~6 months for email tracking).
- Verify tracking data exists -- Confirm sends/opens/clicks exist in Email Studio > Tracking.
- Temporarily disable Sync Data Views -- To verify data flow, switch to tracking event tables (
sent_events,open_events, etc.) and test a sync.
Some Data View tables are missing
Problem: You don’t see certain data_view_* objects in the UI.
Solutions:
- Enterprise-only views --
_Subscribersand_BusinessUnitUnsubscribesrequire Enterprise 2.0 and parent account access. - Feature-specific views -- SMS, LINE, and Social views require MobileConnect, GroupConnect, or Social Forward to be enabled in SFMC.
- Permissions -- Ensure Automations + Data Extensions permissions are granted (see Data Views sync requirements).
Campaign assets are empty
Problem: campaign_assets returns no rows.
Solutions:
- Sync parent first --
campaign_assetsis a child object and only syncs when campaigns is selected. - Verify campaigns exist -- Ensure campaigns are present in SFMC (Campaigns in Marketing Cloud).
Rate limit exceeded
Problem: "429 Too Many Requests" errors or sync stops mid-process.
Solutions:
- Reduce rate limit -- Lower Rate Limit Per Second from 10 to 5 or less. Supaflow automatically retries rate-limited requests with exponential backoff.
- Check for other integrations -- If other tools also access your SFMC API, they share the same quota. Coordinate sync schedules to avoid conflicts.
- Contact SFMC support -- Enterprise accounts may be eligible for higher rate limits.
Connection timeout
Problem: Connection times out during setup or sync.
Solutions:
- Check SFMC status -- Visit the Salesforce Status Page and filter by Marketing Cloud.
- Increase timeouts -- Set Connection Timeout to 60000 (60s) and Read Timeout to 120000 (120s).
- Check network -- Verify your network allows connections to
*.marketingcloudapis.com.
Schema refresh not working
Problem: New Data Extensions or recently added fields are not appearing.
Solutions:
- Force a refresh -- Set Schema Refresh Interval to 0, save, and run a test connection.
- Check DE status -- In SFMC, verify the Data Extension is Active (not archived or inactive).
- Verify permissions -- Confirm your Installed Package has Data Extensions: Read.
Shared Data Extensions not appearing
Problem: Data Extensions shared across Business Units are not visible.
Solutions:
- Enable shared DEs -- Set Include Shared Data Extensions to true.
- Provide Account ID MID -- This is required to distinguish shared from local Data Extensions.
- Check Business Unit access -- Your Installed Package must have access to both parent and child Business Units.
- Shared DEs appear with the
shared_ext_prefix in Supaflow.
Salesforce-synced Data Extensions missing
Problem: Data Extensions synced from Salesforce CRM are not appearing.
Solutions:
- Enable Salesforce DEs -- Set Include Salesforce Data Extensions to true.
- Verify Marketing Cloud Connect -- In SFMC, go to Contact Builder > Data Sources and check that the Salesforce Connector is Active.
- Provide Account ID MID -- Required to classify Salesforce-synced DEs.
- Salesforce-synced DEs appear with the
sf_ext_prefix in Supaflow.
Support
Need help? Contact us at support@supa-flow.io