> For the complete documentation index, see [llms.txt](https://docs.mediarithmics.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mediarithmics.io/connectors/destinations/salesforce-marketing-cloud.md).

# SalesForce Marketing Cloud

Push profile data and segment membership into a Salesforce Marketing Cloud data extension.

The SalesForce Marketing Cloud connector writes your segment and the profile data behind it into a **data extension** in Marketing Cloud, where it can be queried, filtered and used to send communications.

<table data-search="false"><thead><tr><th width="220">Connection</th><th></th></tr></thead><tbody><tr><td><strong>Type</strong></td><td>Server-side</td></tr><tr><td><strong>Category</strong></td><td><a href="/connectors/partner-types/esp-and-marketing-automation.md">ESP &#x26; marketing automation</a></td></tr><tr><td><strong>Identifiers sent</strong></td><td>Profile data only - see <a href="#what-the-connector-can-send">What the connector can send</a></td></tr><tr><td><strong>Authentication</strong></td><td>OAuth 2.0 server-to-server, credentials shared with your account manager</td></tr></tbody></table>

## Description

### What is a Salesforce Marketing Cloud data extension?

A data extension is a table holding fields about your contacts. It can stand alone or be linked to other data extensions, and it is used to run queries, extract information and send communications to subsets of subscribers. Data extensions are available in both Contact Builder and Email Studio, and can be populated manually or through the Marketing Cloud API - which is what this connector uses.

Marketing Cloud has three kinds:

<table data-search="false"><thead><tr><th width="160">Kind</th><th></th></tr></thead><tbody><tr><td><strong>Standard</strong></td><td>A customised set of fields.</td></tr><tr><td><strong>Filtered</strong></td><td>A subset of an existing data extension.</td></tr><tr><td><strong>Random</strong></td><td>Subscribers picked at random from a source data extension.</td></tr></tbody></table>

### What you can do with this connector

* Maintain a Marketing Cloud data extension from a mediarithmics segment, with membership expressed as a field on each row.
* Send profile attributes alongside the membership flag, so Marketing Cloud can personalise on data held in the CDP.

### What the connector can send

This connector sends **only data held on the UserProfile object**. That data must be present in your data model and indexed.

{% hint style="warning" %}
UserAccount, UserEvent and UserChoice data **cannot** be sent through this connector.
{% endhint %}

Three fields are always sent and must exist in the data extension, with these exact names and casing:

<table data-search="false"><thead><tr><th width="200">Field</th><th width="120">Type</th><th></th></tr></thead><tbody><tr><td><code>status</code></td><td>Boolean</td><td>Whether the user belongs to the mediarithmics segment.</td></tr><tr><td><code>segment_id</code></td><td>Text</td><td>The mediarithmics segment ID.</td></tr><tr><td><code>segment_name</code></td><td>Text</td><td>The mediarithmics segment name. Mind the field length - see <a href="#good-to-know">Good to know</a>.</td></tr></tbody></table>

Any other UserProfile field can be added to the send. Name it in the data extension first, then give the exact name and casing to mediarithmics.

It is recommended to send at least one user identifier into the data extension and to reference that field as unique.

## Connector setup

### Prerequisites

* A Salesforce Marketing Cloud account with administrator access.
* A data extension created to receive the data, carrying the three mandatory fields above.
* An installed API integration package, and API access generated from it.

### Authentication

mediarithmics authenticates through **OAuth 2.0 with access token provisioning for server-to-server integrations** - the client credentials type. The API integration must include these authorisation scopes:

* `email_read` (Permission ID 5)
* `data_extensions_read` (Permission ID 97)
* `data_extensions_write` (Permission ID 98)

Salesforce documents the steps in [Install packages](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/install-packages.html), [API integration](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/api-integration.html), [Access token for server-to-server](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/access-token-s2s.html) and [REST permissions and scopes](https://developer.salesforce.com/docs/marketing/marketing-cloud/references/mc_rest_rest_permission_scopes/rest-permissions-and-scopes.html).

### Setup steps

{% stepper %}
{% step %}
**Create the data extension in Marketing Cloud.**

Decide its creation method, external key, whether it is sendable and testable, and any campaign association. Set its data retention. Then define its fields.

Field options are SQL-like: **Primary Key** marks uniqueness - if several are selected, the combination of values is treated as unique; **Nullable** allows the field to be empty; **Default Value** fills the field when a record omits it.

{% hint style="info" %}
A field defined as a primary key cannot be modified afterwards. Changing it means creating a new data extension.
{% endhint %}
{% endstep %}

{% step %}
**Install a package at administrator account level.**

This is what makes API integrations available. It also covers custom applications and Journey Builder components, which this connector does not use.
{% endstep %}

{% step %}
**Generate API access on the integration package.**

OAuth 2.0, server-to-server, with the three scopes listed above.
{% endstep %}

{% step %}
**Send the configuration to your mediarithmics account manager.**

* The **external key** of the data extension, generated when it was created.
* The **Client ID** and **Client Secret** from the API integration.
* Your **tenant subdomain** - see [Your subdomain and tenant-specific endpoints](https://developer.salesforce.com/docs/marketing/marketing-cloud/guide/your-subdomain-tenant-specific-endpoints.html).
  {% endstep %}

{% step %}
**Select the SalesForce Marketing Cloud connector and fill in its configuration.**

<table data-search="false"><thead><tr><th width="260">Field</th><th></th></tr></thead><tbody><tr><td><strong>Name</strong></td><td>The name of the feed as displayed in the platform.</td></tr><tr><td><strong>Credential Name</strong></td><td>Provided by your mediarithmics account manager.</td></tr><tr><td><strong>Identifying resources</strong></td><td>The data to send. One or several compartments can be added.</td></tr><tr><td><strong>Email validation</strong> <em>(optional)</em></td><td>One or several email validators.</td></tr></tbody></table>
{% endstep %}
{% endstepper %}

Creating and activating the feed on a segment is covered in the **Audience & Activation** section, under *Activate your audiences › Send your first-party data to a destination*.

## Good to know

{% hint style="warning" %}
**Segment names can be up to 255 characters in mediarithmics.** If the `segment_name` field in your data extension is shorter than the segment name being sent, Salesforce rejects the send. A 10-character field and a longer segment name means nothing arrives.
{% endhint %}

## FAQ

#### Why is my send rejected by Salesforce?

The most common cause is `segment_name`: the data extension field is shorter than the mediarithmics segment name. Check the field length against the 255-character maximum mediarithmics allows.

#### Can I send data that is not on the user profile?

No. The connector sends UserProfile data only, and that data must be in your data model and indexed. UserAccount, UserEvent and UserChoice are not compatible.

#### Can I add my own fields to the data extension?

Yes. Create the field in the data extension, then give its exact name and casing to mediarithmics so the mapping can be configured.

## Partner documentation

Salesforce Marketing Cloud documents its own platform at <https://developer.salesforce.com/docs/marketing/marketing-cloud/overview>. Use it for anything that happens on the partner side of this connector: account setup, the fields the partner expects, and its own limits.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.mediarithmics.io/connectors/destinations/salesforce-marketing-cloud.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
