{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"redocly_category":"Integrations","type":"markdown"},"seo":{"title":"Salesforce Marketing Cloud Import Integration CLI","description":"Treasure Data Product Documentation · Collect and Unify · Segment and Activate · Experiment and Analyze · Decisioning Automate with AI Scale and Trust.","siteUrl":"https://docs.treasuredata.com","lang":"en-US","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"salesforce-marketing-cloud-import-integration-cli","__idx":0},"children":["Salesforce Marketing Cloud Import Integration CLI"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"install-td-command-v0119-or-later","__idx":1},"children":["Install ‘td’ Command v0.11.9 or Later"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can install the newest ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://toolbelt.treasuredata.com/"},"children":["Treasure Data Toolbelt"]},"."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"$ td --version\n0.15.3\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"create-configuration-file","__idx":2},"children":["Create Configuration File"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Prepare configuration file (for eg: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["load.yml"]},") as shown in the following example, with your Salesforce Marketing Cloud account access information."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"in:\n  type: salesforce_marketing_cloud_v2\n  client_id: client_id\n  client_secret: client_secret\n  auth_type: v2\n  auth_uri: auth_uri\n  account_id: account_id\n  target: target_name\n  data_extension_names: data_extension_names\n  shared_data_extension: false\n  incremental: false\n  maximum_retries: 7\n  initial_retry_interval_millis: 1000\n  maximum_retry_interval_millis: 120000\n\nfilters:\n- type: add_time\n  to_column:\n    name: time\n    type: timestamp\n  from_value:\n    mode: upload_time\n- type: rename\n  rules:\n  - rule: upper_to_lower\n  - rule: character_types\n    pass_types: [ \"a-z\", \"0-9\" ]\n    pass_characters: \"_\"\n    replace: \"_\"\n\nout:\n  type: td\n  apikey: td_api_key\n  endpoint: td_endpoint\n  database: database\n  table: table\n  time_column: time\n  mode: replace\n  default_timestamp_format: '%d/%m/%Y'\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This example dumps Salesforce Marketing Cloud ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Campaign"]}," Data Source:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["client_id"]},": Salesforce Marketing Cloud client id."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["client_secret"]},": Salesforce Marketing Cloud client secret."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["target"]},": Salesforce Marketing Cloud entity object to be imported."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"optionally-preview-data-to-import","__idx":3},"children":["Optionally Preview Data to Import"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can preview data to be imported using the command ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td connector:preview"]},"."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"$ td connector:preview load.yml\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"execute-load-job","__idx":4},"children":["Execute Load Job"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Submit the load job. It may take a couple of hours depending on the data size. Users need to specify the database and table where their data are stored."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["It is recommended to specify ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--time-column"]}," option, since Treasure Data’s storage is partitioned by time (see also ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://docs.treasuredata.com/smart/project-product-documentation/data-partitioning-in-treasure-data"},"children":["data partitioning"]},"). If the option is not given, the data connector selects the first ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["long"]}," or ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["timestamp"]}," column as the partitioning time. The type of the column specified by ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--time-column"]}," must be either of ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["long"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["timestamp"]}," type."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If your data doesn’t have a time column you can add it using ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["add_time"]}," filter option. More details at ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://docs.treasuredata.com/smart/project-product-documentation/add_time-filter-function"},"children":["add_time filter plugin"]},"."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"$ td connector:issue load.yml --database td_sample_db --table td_sample_table --time-column modifieddate\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The preceding command assumes you have already created ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["database(td_sample_db)"]}," and ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["table(td_sample_table)"]},". If the database or the table does not exist in TD this command will not succeed. Therefore, ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://docs.treasuredata.com/smart/project-product-documentation/data-management"},"children":["create the database and table manually"]}," or use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--auto-create-table"]}," option with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td connector:issue"]}," command to auto create the database and table:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"$ td connector:issue load.yml --database td_sample_db --table td_sample_table --time-column modifieddate --auto-create-table\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can assign Time Format column to the \"Partitioning Key\" by \"--time-column\" option."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"scheduled-execution","__idx":5},"children":["Scheduled Execution"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["You can schedule periodic data connector execution for periodic Salesforce Marketing Cloud import. We configure our scheduler carefully to ensure high availability. By using this feature, you no longer need a ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cron"]}," daemon on your local data center."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"create-the-schedule","__idx":6},"children":["Create the Schedule"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["A new schedule can be created using the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["td connector:create"]}," command. The name of the schedule, cron-style schedule, the database and table where their data will be stored, and the Data Connector configuration file are required."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"$ td connector:create \\\n    daily_salesforce_marketing_cloud_import \\\n    \"10 0 * * *\" \\\n    td_sample_db \\\n    td_sample_table \\\n    load.yml\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cron"]}," parameter also accepts these three options: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["@hourly"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["@daily"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["@monthly"]},". | By default, the schedule is setup in the UTC timezone. You can set the schedule in a timezone using -t or --timezone option. The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--timezone"]}," option only supports extended timezone formats like 'Asia/Tokyo', 'America/Los_Angeles' etc. Timezone abbreviations like PST, CST are *not* supported and may lead to unexpected schedules."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"incremental-loading","__idx":7},"children":["Incremental Loading"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"for-data-extensions","__idx":8},"children":["For Data Extensions"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure Data supports incremental loading for ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Data Extensions"]}," that have a date field."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["incremental: true"]}," is set, the data connector loads records according to the range specified by the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["from_date"]}," and the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fetch_days"]}," for the specified date field."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For example:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"  incremental_column_name: mydatefield\n  from_date: \"2016-09-01T00:00:00.000Z\"\n  fetch_days: 2\n"},"children":[]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["1st iteration: The data connector fetches records from ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Sep 01 00:00:00 UTC 2016"]}," to ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Sep 03 00:00:00 UTC 2016"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["2nd iteration: The data connector fetches records for the next available 2 day period, from ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Sep 03 00:00:00 UTC 2016"]}," until ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Sep 05 00:00:00 UTC 2016"]},". This process repeats for each successive iteration."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["When the increment includes the present date, additional records are fetched as each complete time period becomes available."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["incremental: false"]}," is set, The data connector loads all records for the target specified. This is one-time activity."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"for-email-events","__idx":9},"children":["For Email Events"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Treasure Data supports incremental loading for ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Email Events"]}," based on their event date."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["incremental: true"]}," is set"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["1st iteration: the connector loads the data from specified Start Time (from all time if not set) to specified End Time (to the time the job was scheduled to run if not set)"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["2nd iteration: the connector loads the data from the previous End Time to the time job is scheduled"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["incremental: false"]}," is set, The data connector loads all records for the target specified. This is a one-time activity."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"sample-configuration-for-each-target","__idx":10},"children":["Sample Configuration for Each Target"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Campaign"]}," target"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"in:\n type: salesforce_marketing_cloud\n client_id: XXXXXX\n client_secret: XXXXXX\n target: campaign\nout:\n ...\n"},"children":[]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Parameters"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Description"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Default value"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["type"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["must be salesforce_marketing_cloud"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["client_id"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Salesforce Marketing Cloud ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Client ID"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["client_secret"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Salesforce Marketing Cloud ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Client Secret"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["target"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["must be campaign (in this case)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Contact"]}," target"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"in:\n type: salesforce_marketing_cloud\n client_id: XXXXXX\n client_secret: XXXXXX\n target: contact\n contact_page_size: 50\n contact_attributes_request_limit: 100\n contact_multiple_requests: true\n ignore_attribute_set_names:\n - attribute_1\n - attribute_2\nout:\n ...\n"},"children":[]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Parameters"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Description"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Default value"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["type"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["must be salesforce_marketing_cloud"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["client_id"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Salesforce Marketing Cloud ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Client ID"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["client_secret"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Salesforce Marketing Cloud ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Client Secret"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["target"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["must be contact (in this case)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["contact_page_size"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Number of records per page for target ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["contact"]},". This option is useful when you have a large of data"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1000"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["contact_attributes_request_limit"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Number of attributes to ingest for each contact in a single request. When number of attributes greater than this value, it is split into multiple requests"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["100"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["contact_multiple_requests"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Enable plugin to ingest contact detail with so many attributes in multiple requests (This only effects when number of attributes greater than 100 )"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["false"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ignore_attribute_set_names"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List of attributes are ignored. Useful when you want to eliminate some unnecessary attributes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["null"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Data Extension"]}," target"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"in:\n  type: salesforce_marketing_cloud_v2\n  client_id: client_id\n  client_secret: client_secret\n  auth_type: v2\n  auth_uri: auth_uri\n  account_id: account_id\n\n  target: data_extension\n  data_extension_names:\n  - data_extension_1\n  - data_extension_2\n  incremental: true\n  shared_data_extension: true\n  incremental_column_name: date\n  from_date: \"2016-09-01T00:00:00.000Z\"\n  fetch_days: 1\n\n\nout:\n  type: td\n  apikey: td_api_key\n  endpoint: td_endpoint\n  database: database\n  table: table\n  time_column: time\n  mode: replace\n  default_timestamp_format: '%d/%m/%Y'\n"},"children":[]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Parameters"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Description"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Default value"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["type"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["must be salesforce_marketing_cloud"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["client_id"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Salesforce Marketing Cloud ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Client ID"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["client_secret"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Salesforce Marketing Cloud ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Client Secret"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["target"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["must be data_extension (in this case)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["data_extension_names"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List of data extension names you want to ingest. Leave it to null to ingest all"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["null"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["shared_data_extension"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Set this flag to true when you want to ingest the data from shared data extensions"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["false"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["incremental"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Set this flag to true if you want to get newer data between each schedule only"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["false"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["incremental_column_name"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Column used for incremental loading. Must be set if you set incremental = true"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["null"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["from_date"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Set this to ingest data from this date"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["null"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["fetch_days"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Duration to ingest is from_date to from_date + fetch_days"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Email Event"]}," target"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"in:\n type: salesforce_marketing_cloud\n client_id: XXXXXX\n client_secret: XXXXXX\n target: email_event\n search_term: \"email name\"\n search_mode: \"exact\"\n email_event_types:\n - value : all\n start_time: \"2019-03-26T07:20:00.000Z\"\n end_time: \"2019-03-26T07:53:00.000Z\"\n incremental: true\nout:\n ...\n"},"children":[]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Parameters"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Description"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Default value"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["type"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["must be salesforce_marketing_cloud"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["client_id"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Salesforce Marketing Cloud ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Client ID"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["client_secret"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Salesforce Marketing Cloud ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Client Secret"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["target"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["must be email_event (in this case)"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["search_term"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Name of email you want to ingest"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["null"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["search_mode"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Mode for name matching pattern. Must be ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["exact"]}," or ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["partial"]}," only"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["exact"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["email_event_types"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["List of event types you want to import. Valid options are as follows:   - value : all - value : bounce - value : click - value : forward - value : forwardOptIn - value : open - value : sent - value : survey - value : unsub"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["null"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["start_time"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Set this to ingest data from this time"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["null"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["end_time"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Set this to ingest data to this time"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["null"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["incremental"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Set this flag to true if you want to get newer data between each schedule only"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["false"]}]}]}]}]}]},"headings":[{"value":"Salesforce Marketing Cloud Import Integration CLI","id":"salesforce-marketing-cloud-import-integration-cli","depth":1},{"value":"Install ‘td’ Command v0.11.9 or Later","id":"install-td-command-v0119-or-later","depth":2},{"value":"Create Configuration File","id":"create-configuration-file","depth":2},{"value":"Optionally Preview Data to Import","id":"optionally-preview-data-to-import","depth":2},{"value":"Execute Load Job","id":"execute-load-job","depth":2},{"value":"Scheduled Execution","id":"scheduled-execution","depth":2},{"value":"Create the Schedule","id":"create-the-schedule","depth":2},{"value":"Incremental Loading","id":"incremental-loading","depth":2},{"value":"For Data Extensions","id":"for-data-extensions","depth":3},{"value":"For Email Events","id":"for-email-events","depth":2},{"value":"Sample Configuration for Each Target","id":"sample-configuration-for-each-target","depth":2}],"frontmatter":{"seo":{"title":"Salesforce Marketing Cloud Import Integration CLI"}},"lastModified":"2025-10-30T09:45:51.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/int/salesforce-marketing-cloud-import-integration-cli","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}