# Salesforce Marketing Cloud

## Overview

This integration allows you to sync data between your sources and Marketing Cloud, as well as manage contacts entering and exiting journeys.

## Initial Setup

To connect Hightouch to Marketing Cloud, a "package" must be created in Marketing Cloud on behalf of Hightouch.

Navigate to Setup > Apps > Installed Packages and hit "New". Name your package and after creating it, add an API Integration component to the package with the integration type as "Server-to-server".

![](https://1454996985-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHsth_4gateO06TTdt4%2F-MYa6ShKtMQATK9dnME7%2F-MYaHBFjIdvaEg9n6wKM%2Fimage.png?alt=media\&token=23ed71d2-e372-4032-ac0d-fa591bbd836d)

![](https://1454996985-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHsth_4gateO06TTdt4%2F-MYa6ShKtMQATK9dnME7%2F-MYaHGIhsRutuou9tyzr%2Fimage.png?alt=media\&token=cbeba8f1-1aad-42a8-8fc4-db55b7bcfc1e)

Grant Hightouch the scopes for journey and list and subscribers as below:

![](https://1454996985-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHsth_4gateO06TTdt4%2F-MYa6ShKtMQATK9dnME7%2F-MYaHbXNdA9WjCctSJYy%2Fimage.png?alt=media\&token=d96057d7-4422-4e79-a36c-547fceb3bbb3)

With the API Integration created, copy the client ID, client secret, and subdomain into Hightouch. The subdomain is the part of the authentication base URI highlighted in the red box.

![](https://1454996985-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHsth_4gateO06TTdt4%2F-MYa6ShKtMQATK9dnME7%2F-MYaILepYRxAc5y81UPr%2FPasted_Image_4_19_21__2_43_AM.png?alt=media\&token=522963dd-ea89-45aa-b7c9-612d2fb1e1a5)

## Syncing Marketing Cloud Contacts

### Sync Modes

This integration only supports upserting contacts into Marketing Cloud. In this mode, new users will be inserted into Marketing Cloud and all user attributes will be kept up-to-date when mapped.

### Record Matching

Records can be matched from your source to your Marketing Cloud workspace by your contact key. Note: this is not the ID or email address, but the contact key on the top left of the contact page.

![](https://1454996985-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHsth_4gateO06TTdt4%2F-MYa6ShKtMQATK9dnME7%2F-MYaO2Qaqhc5e800XdXE%2Fimage.png?alt=media\&token=2d84dda5-dfdc-4cc9-9e85-b30a69a8c348)

### Field Mapping

You can sync columns from your source to Marketing Cloud's attribute sets.

![](https://1454996985-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHsth_4gateO06TTdt4%2F-MYa6ShKtMQATK9dnME7%2F-MYaVbQEWe1vg8mb_n3P%2Fimage.png?alt=media\&token=52fe9578-db82-42a0-a72a-5d9ff1c7be4b)

Ensure all the required fields in each attribute set is completed. For example, to add an email address, both Email Address and HTML Enabled must be mapped. Refer to the Usage section of the [Creating Contacts](https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-apis.meta/mc-apis/createContacts.htm) documentation.

## Managing User Journeys

Hightouch can manage the entry and exit of contacts in Marketing Cloud journeys based your results.

* When a record enters your results set, a contact will be added to the journey via a contact key (this is done by triggering the entry event)
* When a record leaves your results set, a contact will be exited from the journey

### Journey Selection

Here is an example journey that the Hightouch would work for, note that it is:

* A multi-step journey
* Triggered by an entry API event with an associated event definition key and data extension\\

![](https://1454996985-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHsth_4gateO06TTdt4%2F-MYa6ShKtMQATK9dnME7%2F-MYaXGhlipl1jcq3H3XF%2Fimage.png?alt=media\&token=63333d8b-7355-4a2d-82da-3635c70d1f64)

Hightouch will automatically look for the event definition key, simply select a journey that fits the above requirements.

![](https://1454996985-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHsth_4gateO06TTdt4%2F-MYa6ShKtMQATK9dnME7%2F-MYaXji0zuBQB-JtEfmB%2Fimage.png?alt=media\&token=06c38fa6-03f6-4152-9523-2907febc5ac0)

### Record Matching

Hightouch will enter and exit contacts in the journey based on a column containing the contact key.

![](https://1454996985-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHsth_4gateO06TTdt4%2F-MYa6ShKtMQATK9dnME7%2F-MYaY1JxnoasEww4TAEr%2Fimage.png?alt=media\&token=c1b780fa-7f8a-4c4f-9ca7-287008184354)

### Field Mapping

Field mapping is needed to map other columns in your results to the data extension containing data for your journey.

![](https://1454996985-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHsth_4gateO06TTdt4%2F-MYa6ShKtMQATK9dnME7%2F-MYaZab0672FwBL8qRMW%2Fimage.png?alt=media\&token=8dbc8a91-347a-4a10-b375-bd75c455e33c)

In the data extension, there is a required attribute `email_address` which means that you will have to map a result column to that attribute. You can do this in Hightouch by typing the attribute name in the mapings section.

![](https://1454996985-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MHsth_4gateO06TTdt4%2F-MYa6ShKtMQATK9dnME7%2F-MYa_5WahU3VcSkhgdTl%2Fimage.png?alt=media\&token=3627e641-a1b3-449c-95fa-043499d1ea65)
