Skip to main content

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.

  1. Navigate to Setup:

    • Log in to Salesforce Marketing Cloud
    • Go to Setup > Platform Tools > Apps > Installed Packages
  2. Create New Package:

    • Click New
    • Enter a name (e.g., "Supaflow Integration")
    • Enter a description
  3. Add API Component:

    • Click Add Component
    • Select API Integration
    • Choose Server-to-Server integration type
  4. 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
  5. Save and Copy Credentials:

    • Click Save
    • Copy the Client ID and Client Secret -- you will need these in Supaflow
    • Note your Subdomain (e.g., mcxyz123abc from your SFMC URL)
Finding Your Subdomain

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

Client Secret*

The Client Secret from your SFMC Installed Package.
Stored encrypted

Subdomain*

Your SFMC subdomain (e.g., mcxyz123abc).
Example: mcxyz123abc

note

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 Date

How 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

Sync Data Views

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)

What are Data Views?

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 MID

Your 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 Shared Data Extensions

Include Data Extensions shared across Business Units.
Default: true

Include Salesforce Data Extensions

Include Data Extensions synced from Salesforce CRM via the Marketing Cloud Connect integration.
Default: true

Page Size

Number of records to fetch per API call.
Default: 2500
Range: 1 to 2500

Rate Limit Per Second

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

Max Retries

Maximum number of retry attempts for failed API calls. Supaflow uses exponential backoff between retries.
Default: 5
Range: 0 to 10

Connection Timeout Milliseconds

How long to wait when establishing a connection to SFMC.
Default: 30000
Range: 1000 to 120000

Read Timeout Milliseconds

How long to wait for SFMC to respond to a request.
Default: 60000
Range: 1000 to 300000

Schema Refresh Interval

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
Lookback Time Seconds

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 ObjectSupaflow Object NameIncrementalDescription
SubscriberssubscribersNoAll subscriber records with email addresses, status, and profile attributes
ListslistsYesEmail lists used to organize subscribers
List Subscriberslist_subscribersYesThe relationship between subscribers and lists (synced in 30-day windows)
SendssendsYesEmail send job records with delivery statistics
Triggered Send Definitionstriggered_send_definitionsYesDefinitions for triggered (transactional) email sends
EmailsemailsYesEmail content and template definitions
CampaignscampaignsNoMarketing campaign records
Campaign Assetscampaign_assetsNoChild object — only syncs when campaigns is selected
Send Summarysend_summaryYesAggregate send statistics per send job
List Sendlist_sendNoPer-list send statistics
Link Sendlink_sendNoPer-link click statistics
Foldersdata_foldersYesFolder structure in SFMC
Content Areascontent_areaYesReusable content blocks
Account Usersaccount_userYesSFMC user accounts in your organization
Attribute GroupsattributeGroupsNoContact Builder attribute group definitions
AssetsassetNoContent Builder assets (images, documents, HTML blocks)
Email Definitionsemail_definitionNoTransactional email definitions
JourneysjourneyNoJourney Builder journeys (activities, triggers, and goals are embedded JSON fields)
Event Definitionsevent_definitionNoJourney entry event definitions
CategoriescategoryNoContent categories and folders
SMS Definitionssms_definitionNoSMS message definitions
Push Definitionspush_definitionNoPush notification definitions
Audit Eventsaudit_eventYesAudit log of administrative actions
Security Eventssecurity_eventYesSecurity events (logins, logouts, password changes)
Push Applicationspush_applicationYesPush notification applications (requires MobilePush)
LocationslocationNoGeofence 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:

TypeSupaflow PrefixIncrementalDescription
Standardext_<name>NoData Extensions you created in your Business Unit
Sharedshared_ext_<name>NoData Extensions shared across Business Units
Salesforce-syncedsf_ext_<name>NoData Extensions synced from Salesforce CRM
Shared Salesforce-syncedshared_sf_ext_<name>NoSalesforce-synced Data Extensions shared across Business Units
Synchronizedsync_ext_<name>NoSynchronized Data Extensions

Event Tracking (Sync Data Views = OFF)

These tracking event objects appear only when Sync Data Views is disabled.

SFMC ObjectSupaflow Object NameIncrementalDescription
Sent Eventssent_eventsYesEmail sent tracking events (synced in 30-day windows)
Open Eventsopen_eventsYesEmail open tracking events (synced in 30-day windows)
Click Eventsclick_eventsYesLink click tracking events (synced in 30-day windows)
Bounce Eventsbounce_eventsYesBounce tracking events (synced in 30-day windows)
Unsubscribe Eventsunsub_eventsYesUnsubscribe tracking events (synced in 30-day windows)
Not Sent Eventsnot_sent_eventsYesEvents 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 ViewSupaflow Object NameIncrementalDescription
_Sent, _Open, _Click, _Bounce, _Unsubscribe, _Complaintevent (consolidated)YesAll 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 ViewSupaflow Object NameIncrementalDescription
_Jobdata_view_jobYesEmail send job data
_Journeydata_view_journeyYesJourney metadata
_JourneyActivitydata_view_journey_activityNoJourney activity data
_ListSubscribersdata_view_list_subscribersNoSubscriber-to-list membership
_Subscribersdata_view_subscribersYesEnterprise-level subscriber data (Enterprise accounts only)
_BusinessUnitUnsubscribesdata_view_bu_unsubscribesYesBusiness Unit-level unsubscribe data (Enterprise parent account only)
_FTAFdata_view_ftafYesForward To A Friend tracking data
_ReconcilableDispositionViewdata_view_reconcilable_dispositionYesEmail/SMS reconciliation data (7-day retention in SFMC)
_SMSMessageTrackingdata_view_sms_trackingYesSMS send and receive history (requires MobileConnect)
_SMSSubscriptionLogdata_view_sms_subscription_logYesSMS subscription opt-in/opt-out log (requires MobileConnect)
_UndeliverableSMSdata_view_undeliverable_smsYesFailed SMS deliveries (requires MobileConnect)
_MobileLineAddressContactSubscriptionViewdata_view_groupconnect_subscriptionsYesLINE follower subscription data (requires GroupConnect)
_MobileLineOrphanContactViewdata_view_line_orphanYesOrphaned LINE contacts (requires GroupConnect)
_SocialNetworkTrackingdata_view_social_trackingYesSocial share tracking data (requires Social Forward)
_SocialNetworkImpressionsdata_view_social_impressionsYesSocial share impression data (requires Social Forward)
tip

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.

Manual Data View Extraction

If you prefer manual control, you can disable Sync Data Views and create your own Query Activities:

  1. In SFMC, go to Automation Studio > Activities > SQL Query
  2. Create a query selecting from the Data View (e.g., SELECT * FROM _Sent WHERE EventDate > DATEADD(day, -7, GETDATE()))
  3. Set the target to a new Data Extension
  4. Schedule the automation to run on your desired frequency
  5. 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:

FieldWhat it Contains
activitiesAll activity steps in the journey (emails, waits, decision splits, etc.)
triggersEntry triggers and event configurations
goalsJourney goal definitions
exitsExit criteria
statsJourney performance statistics
metaDataAdditional 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:

  1. 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.
  2. Check subdomain -- Your subdomain should match your SFMC login URL (e.g., mcxyz123abc). Do not include https:// or .auth.marketingcloudapis.com.
  3. Verify permissions -- Your Installed Package must have the required API permissions listed in the Prerequisites section.
  4. 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:

  1. Check permissions -- Your Installed Package must have Data Extensions: Read permission.
  2. Verify Data Extensions exist -- Log in to SFMC and go to Email Studio > Data Extensions to confirm they exist.
  3. Check Business Unit access -- Your Installed Package must have access to the Business Unit where the Data Extensions live.
  4. 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:

  1. Verify permissions -- Your Installed Package needs Tracking Events: Read and Email: Read permissions.
  2. Check Historical Sync Start Date -- SFMC retains event data for approximately 6 months. Make sure your start date is within this retention window.
  3. Use lookback time -- Set Lookback Time Seconds to 300-600 (5-10 minutes) to catch late-arriving tracking events.
  4. 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:

  1. Verify permissions -- Your Installed Package must include Automations: Read/Write/Execute and Data Extensions: Read/Write (in addition to Tracking Events: Read).
  2. Check Automation Studio access -- Ensure your SFMC org allows creating Query Activities and Automations.
  3. Retry after clearing temp objects -- If a previous run left objects behind, delete any temporary items prefixed with supa_evt_, supa_qry_, or supa_auto_ in SFMC and retry.

Event table is empty (Sync Data Views enabled)

Problem: The consolidated event table exists but has no rows.

Solutions:

  1. 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).
  2. Verify tracking data exists -- Confirm sends/opens/clicks exist in Email Studio > Tracking.
  3. 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:

  1. Enterprise-only views -- _Subscribers and _BusinessUnitUnsubscribes require Enterprise 2.0 and parent account access.
  2. Feature-specific views -- SMS, LINE, and Social views require MobileConnect, GroupConnect, or Social Forward to be enabled in SFMC.
  3. Permissions -- Ensure Automations + Data Extensions permissions are granted (see Data Views sync requirements).

Campaign assets are empty

Problem: campaign_assets returns no rows.

Solutions:

  1. Sync parent first -- campaign_assets is a child object and only syncs when campaigns is selected.
  2. 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:

  1. Reduce rate limit -- Lower Rate Limit Per Second from 10 to 5 or less. Supaflow automatically retries rate-limited requests with exponential backoff.
  2. Check for other integrations -- If other tools also access your SFMC API, they share the same quota. Coordinate sync schedules to avoid conflicts.
  3. Contact SFMC support -- Enterprise accounts may be eligible for higher rate limits.

Connection timeout

Problem: Connection times out during setup or sync.

Solutions:

  1. Check SFMC status -- Visit the Salesforce Status Page and filter by Marketing Cloud.
  2. Increase timeouts -- Set Connection Timeout to 60000 (60s) and Read Timeout to 120000 (120s).
  3. 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:

  1. Force a refresh -- Set Schema Refresh Interval to 0, save, and run a test connection.
  2. Check DE status -- In SFMC, verify the Data Extension is Active (not archived or inactive).
  3. 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:

  1. Enable shared DEs -- Set Include Shared Data Extensions to true.
  2. Provide Account ID MID -- This is required to distinguish shared from local Data Extensions.
  3. Check Business Unit access -- Your Installed Package must have access to both parent and child Business Units.
  4. 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:

  1. Enable Salesforce DEs -- Set Include Salesforce Data Extensions to true.
  2. Verify Marketing Cloud Connect -- In SFMC, go to Contact Builder > Data Sources and check that the Salesforce Connector is Active.
  3. Provide Account ID MID -- Required to classify Salesforce-synced DEs.
  4. Salesforce-synced DEs appear with the sf_ext_ prefix in Supaflow.

Support

Need help? Contact us at support@supa-flow.io