# How to configure SFMC integration

This how-to explains how to insert a block of **dynamic product recommendations** into an SFMC (Salesforce Marketing Cloud) email by calling the Reco & Merch API from AB Tasty. This enables showing personalized products in real time, at the moment the email is opened.

{% hint style="info" %}
The SFMC integration is done via **API**. There is currently no dedicated cartridge available.
{% endhint %}

### Prerequisites

* Access to **Content Builder** in SFMC.
* A **Reco & Merch template** already configured on AB Tasty.
* A valid **Bearer Token** provided by AB Tasty.
* Required variables available in your **Data Extension** (e.g. `EmailAddr`, `CodeEAN`).

{% stepper %}
{% step %}

### Connect SFMC to Reco & Merch

1. Go to **Settings > Integrations** in your AB Tasty Reco & Merch interface.
2. Click **Connect SFMC**.
3. A pop-up window will open to authenticate your SFMC account.
4. Once the connection is successful, your workspace will be linked to SFMC.

<figure><img src="/files/QJlAtmgScegkJZhy6FES" alt=""><figcaption></figcaption></figure>

<figure><img src="/files/WkZFuSKkXJgDgvBsQljx" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Deploy a recommendation in your email

Now you can deploy a recommendation in SFMC.&#x20;

{% embed url="<https://docs.abtasty.com/~/revisions/GC5NNyAZNIhN8XxZ5KK5/recommendations-and-merchandising-1/how-tos/deploy-a-strategy/how-to-deploy-a-recommendation-strategy-on-web/how-to-use-recommendations-in-emails-campaign/how-to-deploy-recommendation-with-sfmc>" %}
{% endstep %}
{% endstepper %}

### Notes on SFMC&#x20;

Below are some notes on SFMC

**Performance**

* Every email open triggers a live API call.
* High-volume sends (500k+ subscribers) = high API traffic.
* Ensure AB Tasty API quota is sufficient.

**Fallback**

* If the API fails, the block may be empty.
* Always define a static fallback (e.g. “Top Sellers” block).

**Security**

* The **Bearer Token** is sensitive.
* Rotate it regularly and avoid exposing it in shared snippets.
* For extra safety, use a proxy to hide the token.

**Data Extension alignment**

* Verify all fields (`CodeEAN`, `EmailAddr`) exist for every subscriber.
* If missing, the API call URL will be invalid → “400 Bad Request” errors.

**Rendering**

* Always test in **Preview & Test** with real subscriber profiles.
* Validate rendering across multiple email clients (Gmail, Outlook, Mobile).


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.abtasty.com/recommendations-and-merchandising/how-tos/how-to-configure-your-email-integration/how-to-configure-sfmc-integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
