Schedule a Salesforce Marketing Cloud transfer
The BigQuery Data Transfer Service for Salesforce Marketing Cloud connector lets you automatically schedule and manage recurring load jobs from Salesforce Marketing Cloud into BigQuery.
Before you begin
The following sections describe the steps that you need to take before you create a Salesforce Marketing Cloud data transfer.
Salesforce Marketing Cloud prerequisites
You must have the following information when creating a Salesforce Marketing Cloud data transfer:
Parameter Name | Description |
---|---|
subdomain |
The API subdomain |
instance |
The API server instance |
clientId |
The app integration client ID |
clientSecret |
The app integration client secret |
The following steps show you how you can obtain the information needed to create a Salesforce Marketing Cloud data transfer:
- Install a server-to-server type API integration package.
Note the client ID, the client secret, and the subdomain in the Components
section of the package details page.
- The subdomain is a part of the base URI. For example, in the authentication
base URI
https://SUBDOMAIN.auth.marketingcloudapis.com/
, SUBDOMAIN is your subdomain value. - For more information, Server-to-Server Integrations with Client Credentials Grant Type.
- The subdomain is a part of the base URI. For example, in the authentication
base URI
- Find your API server instance in the URL after you sign into the
Salesforce Marketing Cloud application. The instance value includes
s
followed by a numeric value. For example, in the URLhttps://mc.s4.exacttarget.com/
, the instance value iss4
. For more information, see Find the stack location for a Marketing Cloud account.
You must also configure your scope permissions settings to allow for a Salesforce Marketing Cloud data transfer:
Sign in to the Salesforce Marketing Cloud application.
Expand your profile drop-down menu, then click Setup.
In the navigation bar under Platform Tools, click Apps > Installed packages.
Select an installed package to modify its settings.
In the Components section, click Edit.
Select the Read option for the following scopes:
- Saved Content
- Journeys
- Callbacks
- Campaign
- Subscriptions
Click Save.
BigQuery prerequisites
- Verify that you have completed all actions required to enable the BigQuery Data Transfer Service.
- Create a BigQuery dataset to store your data.
- If you intend to set up transfer run notifications for Pub/Sub,
ensure that you have the
pubsub.topics.setIamPolicy
Identity and Access Management (IAM) permission. Pub/Sub permissions are not required if you only set up email notifications. For more information, see BigQuery Data Transfer Service run notifications.
Required BigQuery roles
To get the permissions that you need to create a transfer,
ask your administrator to grant you the
BigQuery Admin (roles/bigquery.admin
) IAM role.
For more information about granting roles, see Manage access to projects, folders, and organizations.
This predefined role contains the permissions required to create a transfer. To see the exact permissions that are required, expand the Required permissions section:
Required permissions
The following permissions are required to create a transfer:
-
bigquery.transfers.update
on the user -
bigquery.datasets.get
on the target dataset -
bigquery.datasets.update
on the target dataset
You might also be able to get these permissions with custom roles or other predefined roles.
Set up a Salesforce Marketing Cloud data transfer
To create a Salesforce Marketing Cloud data transfer:
Console
Go to the Data transfers page in the Google Cloud console.
Click
Create transfer.In the Source type section, for Source, select Salesforce Marketing Cloud.
In the Data source details section, do the following:
- For API Subdomain, enter the API subdomain.
- For API instance, enter the API instance value.
- For Client ID, enter the app integration client ID.
- For Client Secret, enter the app integration client secret.
In the Destination settings section, for Dataset, select the dataset you created to store your data.
In the Transfer config name section, for Display name, enter a name for the data transfer.
In the Schedule options section, do the following:
In the Repeat frequency list, select an option to specify how often this data transfer runs. To specify a custom repeat frequency, select Custom. If you select On-demand, then this transfer runs when you manually trigger the transfer.
If applicable, select either Start now or Start at set time and provide a start date and run time.
In the Service Account menu, select a service account associated with your Google Cloud project. The selected service account must have the required roles to run this data transfer.
If you signed in with a federated identity, then a service account is required to create a data transfer. If you signed in with a Google Account, then a service account for the transfer is optional.
For more information about using service accounts with data transfers, see Use service accounts.
Optional: In the Notification options section, do the following:
- To enable email notifications, click the Email notification toggle. When you enable this option, the transfer administrator receives an email notification when a transfer run fails.
- To enable Pub/Sub transfer run notifications for this transfer, click the Pub/Sub notifications toggle. You can select your topic name, or you can click Create a topic to create one.
Click Save.
When this data transfer runs, the BigQuery Data Transfer Service automatically populates the following tables based on the REST interface.
Campaigns
Categories
EventDefinitions
Journeys
JourneyActivities
SendDefinitions
Subscriptions
bq
Enter the bq mk
command
and supply the transfer creation flag — --transfer_config
.
bq mk \ --transfer_config \ --project_id=PROJECT_ID \ --data_source=DATA_SOURCE \ --display_name=DISPLAY_NAME \ --target_dataset=DATASET \ --params='PARAMETERS'
Replace the following:
- PROJECT_ID (optional): your Google Cloud project ID.
If
--project_id
isn't supplied to specify a particular project, the default project is used. - DATA_SOURCE: the data source (for example,
saphana
). - DISPLAY_NAME: the display name for the transfer configuration. The data transfer name can be any value that lets you identify the transfer if you need to modify it later.
- DATASET: the target dataset for the transfer configuration.
- PARAMETERS: the parameters for the created transfer
configuration in JSON format. For example:
--params='{"param":"param_value"}'
. The following are the parameters for a Salesforce Marketing Cloud transfer:connector.subdomain
: The API subdomain.connector.instance
: The API instance value.connector.authentication.oauth.clientId
: The app ID name for the OAuth client.connector.authentication.oauth.clientSecret
: The app secret for the OAuth client.
For example, the following command creates a Salesforce Marketing Cloud data transfer in the default project with all the required parameters:
bq mk \ --transfer_config \ --target_dataset=mydataset \ --data_source=salesforce_marketing \ --display_name='My Transfer' \ --params='{"connector.subdomain": "abcd", "connector.instance": "x", "connector.authentication.oauth.clientId": "1234567890", "connector.authentication.oauth.clientSecret":"ABC12345"}'
API
Use the projects.locations.transferConfigs.create
method
and supply an instance of the TransferConfig
resource.
Troubleshoot transfer setup
If you are having issues setting up a Salesforce Marketing Cloud data transfer, try the following troubleshooting steps:
- Ensure that the configured authentication for the API integration package is configured to Server-to-server.
- Ensure that the authentication app is configured with the required permissions under Scope.
Error messages
- Error:
invalid_grant. The client's IP address is unauthorized for this account. Allowlist the client's IP address in Marketing Cloud Administration.
Resolution: Try one of the following steps:
- Enable all available IP addresses for Google Cloud resources.
- Disable the IP allow list. You can do this by logging in to the Salesforce Marketing Cloud application, then navigating to the Setup > Security Settings page. Click Edit, then configure the Restrict Logins by IP Address (IP Allowlisting) setting to IP Allowlisting Disabled.
- Error:
INVALID_ARGUMENT. Table tableName does not exist in asset TableName
Resolution: Ensure that you have the correct scope permissions configured in the Salesforce Marketing Cloud application. For more information, see Salesforce Marketing Cloud prerequisites.
Pricing
There is no cost to transfer Salesforce Marketing Cloud data into BigQuery while this feature is in Preview.
What's next
- For an overview of the BigQuery Data Transfer Service, see Introduction to BigQuery Data Transfer Service.
- For information on using data transfers, including getting information about a transfer configuration, listing transfer configurations, and viewing a transfer's run history, see Manage transfers.
- Learn how to load data with cross-cloud operations.