Salesforce Marketing Cloud API Configuration
For more information about authentication, accessing the Fivetran REST API, and request and response formats, see Getting Started with the Fivetran REST API.
Request
POST https://api.fivetran.com/v1/connections
{ "group_id": "group_id", "service": "salesforce_marketing_cloud", "trust_certificates": true, "trust_fingerprints": true, "run_setup_tests": true, "paused": false, "pause_after_trial": false, "sync_frequency": 1440, "data_delay_sensitivity": "LOW", "data_delay_threshold": 0, "daily_sync_time": "14:00", "schedule_type": "auto", "connect_card_config": { "redirect_uri": "https://your.site/path", "hide_setup_guide": true, "all_fields": true }, "proxy_agent_id": "proxy_agent_id", "private_link_id": "private_link_id", "networking_method": "Directly", "hybrid_deployment_agent_id": "hybrid_deployment_agent_id", "destination_configuration": { "virtual_warehouse": "virtual_warehouse" }, "destination_schema_names": "FIVETRAN_NAMING", "external_secrets_manager_id": "esm_id", "config": { "client_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "client_secret": "your_api_secret", "event_extract_mode": "TRACKING_EXTRACT | SOAP", "historical_sync_limit": "ALL_TIME | DATE_LIMIT", "historical_sync_limit_date": "2000-12-15", "instance": "string", "is_new_package": true, "is_sftp_creds_available": true, "selected_event_types": [ "string" ], "sftp_host": "string", "sftp_is_key_pair": true, "sftp_password": "string", "sftp_port": 0, "sftp_user": "string", "sub_domain": "http://your.sub.domain/", "sync_mode": "SelectedEvents | AllEvents", "schema": "schema_name" } }
Config parameters
| Name | Description |
|---|---|
client_id | The Salesforce Marketing Cloud client ID. |
client_secret | The Salesforce Marketing Cloud client secret. |
event_extract_mode | Event sync method. This is how Fivetran gets data for the event objects, can be selected only during the connector creation. TRACKING_EXTRACT - Salesforce exports a file, which we download and extract event data from. This is the faster for large volumes, and requires SFTP. SOAP - We sync data using the SOAP API event object endpoints. This syncs the latest events faster, but is slow for large volumes. |
historical_sync_limit | The time range for which historical data should be synced. Default value: All Time. |
historical_sync_limit_date | The start date (YYYY-MM-DD) from which to sync historical data. |
instance | The Salesforce Marketing Cloud instance ID |
is_new_package | Indicates that that your installed package uses OAuth 2.0. Default value: false |
is_sftp_creds_available | Provide SFTP credentials |
selected_event_types | Select the event types to be synced. |
sftp_host | Host |
sftp_is_key_pair | Set this field if you use a key pair for logging into your SFTP server. Don't set it if you use a username and password |
sftp_password | Password |
sftp_port | Port |
sftp_user | User |
sub_domain | Your Salesforce Marketing Cloud subdomain. |
sync_mode | Filter event types. |
schema (required) | Destination schema name. Schema name is permanent and cannot be changed after connection creation |
Authorization
There are two ways to authorize this connector type:
- By specifying the values for the
client_id,client_secretandinstanceparameters in the request.POST https://api.fivetran.com/v1/connections{ "service": "salesforce_marketing_cloud", "group_id": "group_id", "config": { "client_id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "client_secret": "your_api_secret", "instance": "string" } } By using the Connect Card or the Fivetran dashboard.