# Salesforce Marketing Cloud (SFMC)

This guide will walk you through the process of integrating **MessageFlow** with **Salesforce Marketing Cloud**, allowing you to efficiently manage SMS sending directly from your marketing environment.

### Introduction

Integrating MessageFlow with Salesforce Marketing Cloud allows you to enrich your communication strategy with SMS messages, fully synchronized with your customer data and marketing automations. This enables you to send personalized and contextual SMS messages directly from Journey Builder or Automation Studio, as well as monitor message delivery statuses.

### Prerequisites

Before you begin the integration, ensure you have the following:

* **API Keys from your MessageFlow account.** These will be required to log in to the integration panel. If you don't have them yet, generate them in the main MessageFlow panel:
  * Go to the **Account -> Settings -> API** section.
  * Enter a name for the new key (e.g., SFMC\_Integration\_Key) and click **Generate API key**.
  * The system will generate two values: **Authorization** and **Application-Key**. Copy them and store them in a safe place.

{% hint style="info" %}
**Note:** For security reasons, the Authorization value is only visible once, immediately after it is generated. After refreshing the page, it will not be possible to copy it again. Do not share the keys with unauthorized persons.
{% endhint %}

* **An active Salesforce Marketing Cloud account** with administrator permissions or a role that allows creating and managing Installed Packages and access to Setup.
* **Access to the separate integration panel** for Salesforce Marketing Cloud, located at: <https://salesforce.messageflow.com/panel/login>.

## Configuration Process

{% stepper %}
{% step %}

### Step 1: Configuration in Salesforce Marketing Cloud

The first step is to create an **Installed Package** in Salesforce Marketing Cloud, which will contain the components necessary for communication with MessageFlow.

1. Log in to Salesforce Marketing Cloud.
2. In the top right corner of the screen, click your profile/user icon and select **Setup** from the dropdown menu.

<figure><img src="https://1762163817-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDIGjHYIXYoHyJoOeeUgD%2Fuploads%2FigdUgtBc3FZMzXYkpCyt%2FZrzut%20ekranu%202025-06-13%20100042.png?alt=media&#x26;token=5a117011-ff5e-4a37-9e11-db776861f0d3" alt=""><figcaption></figcaption></figure>

3. In the left navigation menu, go to: **Platform Tools -> Apps -> Installed Packages**.

<figure><img src="https://1762163817-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDIGjHYIXYoHyJoOeeUgD%2Fuploads%2FYGkNBSQph5TgpBU7VGe0%2FZrzut%20ekranu%202025-06-13%20100127.png?alt=media&#x26;token=46c139e7-fa9e-4556-b7b9-fc819ae7a202" alt=""><figcaption></figcaption></figure>

4. Click the **New** button.&#x20;
5. Enter a **Name** for the package (e.g., MessageFlow\_Integration) and an optional description. Click **Save**.

<figure><img src="https://1762163817-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDIGjHYIXYoHyJoOeeUgD%2Fuploads%2F1bgENWSEkz8BesuHktIb%2FZrzut%20ekranu%202025-06-13%20100530.png?alt=media&#x26;token=6a3fd419-0a25-475b-8c3b-28a5868fda72" alt=""><figcaption></figcaption></figure>

**Adding the API Integration Component (Authentication)**

6. On the details page of the newly created package, click the **Add Component** button.

<figure><img src="https://1762163817-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDIGjHYIXYoHyJoOeeUgD%2Fuploads%2FSKVddWgfJM1qKruTZUTq%2FZrzut%20ekranu%202025-06-13%201029342.jpg?alt=media&#x26;token=0403b4ab-7afc-4e8a-ad71-e3fab0f9ee5d" alt=""><figcaption></figcaption></figure>

7. Select the component type: **API Integration**, and the integration type: **Server-to-Server**. Click **Next**.
8. Grant the necessary permissions (Scope) for this package. The recommended minimum is:
   * In the **Channels -> SMS** section: Check Read and Send.
   * In the **Data -> Data Extensions** section: Check Read and Write.
   * In the **Contacts -> List and Subscribers** section: Check Read and Write.
   * In the **Webhooks** section: Check Read and Write.

<figure><img src="https://1762163817-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDIGjHYIXYoHyJoOeeUgD%2Fuploads%2FJsuWdYwDGWgWSI6lTXyI%2FZrzut%20ekranu%202025-06-13%20103154.png?alt=media&#x26;token=96f02092-0b18-4c20-890d-8f35d53beb6a" alt=""><figcaption></figcaption></figure>

9. Click **Save**. After saving the permissions, copy and save the following values – they will be needed in the next step:
   * Client ID
   * Client Secret
   * Authentication Base URI

<figure><img src="https://1762163817-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDIGjHYIXYoHyJoOeeUgD%2Fuploads%2FbC1VceXOyz7p566JRbX7%2FZrzut%20ekranu%202025-06-13%20113956.jpg?alt=media&#x26;token=8aa3a4b4-1617-4702-b2cd-8aaa73f6c748" alt=""><figcaption></figcaption></figure>

**Adding the Journey Builder Activity Component (SMS Activity)**

10. While on the details page of the same package, click **Add Component** again.
11. This time, select **Journey Builder Activity** as the component type.

<figure><img src="https://1762163817-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDIGjHYIXYoHyJoOeeUgD%2Fuploads%2FDngMgil00CYPhujwF4FI%2FZrzut%20ekranu%202025-06-13%20123000.png?alt=media&#x26;token=2b8aac3c-4eee-444f-8001-2ecf15d9de9f" alt=""><figcaption></figcaption></figure>

12. Fill in the configuration fields for the new activity:
    * **Name:** Enter a name that will be visible in Journey Builder (e.g., `MessageFlow SMS`).
    * **Category:** Choose the category where the activity should appear (e.g., `Messages`).
    * **Endpoint URL:** Paste the unique URL that was generated for you in the MessageFlow integration panel (you will find it in Step 2).
13. Click **Save**.
    {% endstep %}

{% step %}

### Step 2: Configuration in the MessageFlow Integration Panel

Now, you need to enter the data from SFMC into the MessageFlow integration panel and generate keys specific to this integration.

1. Log in to the MessageFlow integration panel for Salesforce Marketing Cloud at: <https://salesforce.messageflow.com/panel/login>.

<figure><img src="https://1762163817-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDIGjHYIXYoHyJoOeeUgD%2Fuploads%2FHFwQQ415070yO0T1J1pR%2FZrzut%20ekranu%202025-06-13%20112952.png?alt=media&#x26;token=bc096836-4908-424e-a7d3-aa888f1f5ab0" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Note: To log in here, use the API key data generated in your main MessageFlow panel - Authorization as the login and Application-Key as the password.
{% endhint %}

2. Go to the **Settings** section.
3. Fill in the fields for the connection to Salesforce Marketing Cloud (SFMC):
   * **ClientID:** Paste the Client ID value copied from SFMC.
   * **ClientSecret:** Paste the Client Secret value copied from SFMC.
   * **Base auth URL:** Paste the Authentication Base URI value copied from SFMC.
4. Generate the MessageFlow keys and URL:

   * **Webhook token:** Click the **Generate** button and copy the generated token.
   * **Key:** Click the "Generate" button and copy the generated key.

   *(Note down both of these keys and the generated "URL for SFMC," which you will need to paste into the "Endpoint URL" for Journey Builder).*

<figure><img src="https://1762163817-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDIGjHYIXYoHyJoOeeUgD%2Fuploads%2FLVMiI1o8J7DOMrpzezzu%2FZrzut%20ekranu%202025-06-13%20110206.png?alt=media&#x26;token=f6c9ff25-038f-4214-8ea6-b76a3e860329" alt=""><figcaption></figcaption></figure>

5. Select the default **Sender ID** from the dropdown list. This will be used as the default sender name for your SMS messages. More info: [sender-ids](https://docs.messageflow.com/sms/sms-common-settings/sender-ids "mention")
6. Click the **Save** button to save all settings.
   {% endstep %}

{% step %}

### Step 3: First Steps in Journey Builder

After successful configuration, a new custom activity, e.g., **"MessageFlow SMS"**, will appear in the Journey Builder activity palette in your Salesforce Marketing Cloud environment. Here’s how to use it:

1. Go to **Journey Builder** to create a new journey. You will typically choose the **Multi-Step Journey** option.

<figure><img src="https://1762163817-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDIGjHYIXYoHyJoOeeUgD%2Fuploads%2FbRMs4HhZTD4vC9G2gAhv%2FZrzut%20ekranu%202025-06-13%20123407.png?alt=media&#x26;token=04e6b8f5-aec8-4046-aee6-bcf76b92d40e" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1762163817-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDIGjHYIXYoHyJoOeeUgD%2Fuploads%2FBMqknOiX7ohrmbCDrJ9c%2FZrzut%20ekranu%202025-06-13%20123441.png?alt=media&#x26;token=c1d2705b-ec40-4fff-9a12-0293b00e7a6a" alt=""><figcaption></figcaption></figure>

2. **Define the Entry Source:** Every journey must have a defined data source, which is the list of contacts that will start it. In Salesforce Marketing Cloud, you use the **Contact Builder** tool to manage contact data, where you create and manage data tables called **Data Extensions**.

   * Drag the **Data Extension** tile from the **Entry Sources** panel on the left onto the journey canvas.
   * Click the added tile, then click the **Select Data Extension** button.

   <figure><img src="https://1762163817-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDIGjHYIXYoHyJoOeeUgD%2Fuploads%2F4tyGdVzFSqEEX6WJrApa%2FZrzut%20ekranu%202025-06-13%20123459.png?alt=media&#x26;token=725e324c-586e-4e44-9744-e1e52cb5c468" alt=""><figcaption></figcaption></figure>

   * From the list, select the Data Extension that contains the contacts who should enter your journey, and confirm your choice.
3. **Add and Configure the MessageFlow Activity:**
   * In the activities panel on the left, find the icon for your custom activity (e.g., "MessageFlow SMS") and drag it onto the canvas after the entry source.
   * Click the added activity to open its configuration window. Here you will find options to define the SMS message content, select the Sender ID, and map the recipient's phone number from the appropriate column in your Data Extension.

{% hint style="info" %}
The steps above show how to get started with our integration. For detailed information on creating, managing, and optimizing journeys in Journey Builder, please refer to the [**official Salesforce Marketing Cloud documentation**](https://help.salesforce.com/s/articleView?id=mktg.mc_jb_journey_builder.htm\&type=5).
{% endhint %}
{% endstep %}

{% step %}

### Step 4: Finalizing the Configuration and Support

After completing the steps above, the basic connection between MessageFlow and Salesforce Marketing Cloud is configured. Your SFMC environment is now authorized to communicate with the MessageFlow platform.

{% hint style="info" %}
**Important Notes:**

* **Key Accuracy:** Ensure that all keys and URLs are copied exactly, with no extra spaces.
* **Package Permissions:** Always check that your `Installed Package` in SFMC has sufficient permissions for the operations you plan to perform.
* **Testing:** Before launching production sends, we always recommend conducting tests with a small group of contacts.
  {% endhint %}
  {% endstep %}
  {% endstepper %}
