Salesforce Marketing Cloud target synchronization example
Configure Salesforce Marketing Cloud source properties on the Target page of the Synchronization Task wizard.
You can write to a single or multiple Salesforce Marketing Cloud objects. Data is written to the data extensions based on the following conditions:
•If the source file has non-existing contact key, a new contact is created and a new record is inserted into data extension.
•If source file has existing contact key, a new record is inserted into data extension and new contact is not created.
Write Records into a Single Target
Perform the following steps to write records into a single target:
1On the Source tab, select a .csv file as the target object, Source type as Single and select a Flat File connection for the Connection attribute.
The following image shows the source object configuration for the synchronization task:
2On the Target tab, select the Salesforce Marketing Cloud connection for the Connection attribute and Z.ContactImport for the Source Object attribute.
The following image shows the target object configuration for the synchronization task:
3On the Field Mapping tab, map the primary fields of the flat file source to the target object.
Note: The Contact ID field is auto generated field and it should not be mapped.
The following image shows the target object configuration for the synchronization task:
4Under the Schedule tab, you can set the following advanced target properties:
Property
Describtion
Batch Size
Number of rows that the Secure Agent writes in a batch to the target.
When you insert or update data and specify the contact key, the data associated with the specified contact ID is inserted or updated in a batch to Salesforce Marketing Cloud. When you upsert data to Saleforce Marketing Cloud, do not specify the contact key.
If you enter a batch size value greater than or equal to 0, the Secure Agent uses this value. If you enter a batch size value less than 0, the Secure Agent uses the batch size value that you entered in the Connection property.
Default is 0.
Success File Directory
Not applicable.
Error File Directory
Directory for the error rows file. Specify a directory path that is available on each Secure Agent machine in the runtime environment.
By default, Data Integration writes the error rows file to the following directory:
6Select the synchronization task from the Explore page and click Actions > Run.
In Monitor, you can monitor the status of the logs after you run the task.
Write Records into Multiple Targets
Perform the following steps to write records into multiple targets:
1On the Source tab, select a .csv file as the source object, Source type as Multiple and select a Flat File connection for the Connection attribute.
Note: In this example, the source object for synchronization task is a flat file that has data for multiple targets. For example, INFA Order and INFA OrderLines.
2On the Target tab, select the Salesforce Marketing Cloud connection for the Connection attribute and Z.ContactImport for the Target Object attribute.
The following image shows the target object configuration for the synchronization task:
3On the Field Mapping tab, map the primary fields of the flat file source to target object.
Note: The Contact ID field is auto generated field and it should not be mapped.
The following image shows the target object configuration for the synchronization task:
4Under the Schedule tab, you can set the following advanced target properties:
Property
Describtion
Batch Size
Number of rows that the Secure Agent writes in a batch to the target.
When you insert or update data and specify the contact key, the data associated with the specified contact ID is inserted or updated in a batch to Salesforce Marketing Cloud. When you upsert data to Saleforce Marketing Cloud, do not specify the contact key.
If you enter a batch size value greater than or equal to 0, the Secure Agent uses this value. If you enter a batch size value less than 0, the Secure Agent uses the batch size value that you entered in the Connection property.
Default is 0.
Success File Directory
Not applicable.
Error File Directory
Directory for the error rows file. Specify a directory path that is available on each Secure Agent machine in the runtime environment.
By default, Data Integration writes the error rows file to the following directory:
6Select the synchronization task from the Explore page and click Actions > Run.
In Monitor, you can monitor the status of the logs after you run the task.
Update Record
Data from source objects are updated in Salesforce Marketing cloud by using update operation.
Prerequisites
The following are the prerequisites to perform an update operation:
•Contact key is required in the source data to write to the Salesforce Marketing Cloud target.
•Data extension created as a child object of Contacts object should be linked to Contact ID of contacts.
•The Contact ID is an auto generated field in Salesforce Marketing Cloud. Do not map the Contact ID while mapping the fields. The flat file must contain all the required columns of data extensions, such as HTML Enabled in Email Addresses.