> For the complete documentation index, see [llms.txt](https://docs.abtasty.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](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.md).

# How to deploy recommendation with SFMC

{% stepper %}
{% step %}

### Prepare the Recommendation

1. Click on  **Recommendations** <br>

   <figure><img src="https://2350286830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6Yw9IRJ6KbbucQPwZUCZ%2Fuploads%2Fx4uCyRJloGuIhpzpvTgU%2Fimage.png?alt=media&amp;token=ba5eb17e-cd62-4152-b25a-15c2c09e05a9" alt=""><figcaption></figcaption></figure>
2. Click on **paper plane icon** in actions of the line, or click on edit recommendation then **deployment settings** button at the bottom right of the page
   {% endstep %}

{% step %}

### Select or Create a Recommendation Template

1. You need to associate a **recommendation template**.
2. If no suitable template exists, you can create a new one in the **Templates** section.

<figure><img src="https://2350286830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6Yw9IRJ6KbbucQPwZUCZ%2Fuploads%2FWAuBJYCcpItCaMSE3r09%2Fimage.png?alt=media&amp;token=4dffeb94-c0fb-4bcf-8d83-c705b673e38b" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}
If the interface shows the message *“Template functionality is not enabled”*, please contact the AB Tasty team to enable template access.

![](https://2350286830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6Yw9IRJ6KbbucQPwZUCZ%2Fuploads%2FdHMA0kmVVw6Y7FK3wCNc%2Fimage.png?alt=media\&token=282080d9-2564-46ce-bdd5-221877413347)
{% endhint %}
{% endstep %}

{% step %}

### Add the Code Snippet in SFMC

1. Click on **Get integration snippet** button
2. Copy-paste the AMPscript snippet example below into your SFMC email:&#x20;

```
%%[
set @url = "https://uc-info.eu.abtasty.com/v1/reco/1010/template/3d815596-8f6e-4ed4-a373-89792a9a2e06/recos/366c16d0-4934-4f31-930e-a57a1e3f757c"

  Platform.Load("Core","1.1.1");
  var url = Variable.GetValue("@url");
  var headerNames   = ["Authorization"];
  var headerValues  = ["Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzaXRlX2lkIjoxMDEwLCJpYXQiOjE3NDI0NzYzNzIsImp0aSI6IlhDczN3WVdXM0dIVHlRNmx0VXY1TTkzR2hXdDlDZGkyR3lhQnJwUEdacE0ifQ.n3OUVQJyyHUXR2zene-OA7VVb4hUJOnVlGQqfmc6tuw"];
  var response      = HTTP.Get(url, headerNames, headerValues);
  Variable.SetValue("@response", response.Content);
%%=TreatAsContent(@response)=%%
]%%
```

* **@url**: corresponds to the endpoint generated for your recommendation template.
* **Authorization**: insert the **Bearer token** provided by AB Tasty.
* The **@response** variable will store the dynamic recommendation and inject it into your email.

<figure><img src="https://2350286830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6Yw9IRJ6KbbucQPwZUCZ%2Fuploads%2F1dv4vT1VqC1uVssnfgFZ%2Fimage.png?alt=media&amp;token=5807989c-bac8-46f9-b091-b6126b067552" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2350286830-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6Yw9IRJ6KbbucQPwZUCZ%2Fuploads%2FaOtrCcG2FMZNqLb5NrIR%2Fimage.png?alt=media&amp;token=8b8d3a46-7dc1-4921-980e-9772be056e5d" alt=""><figcaption></figcaption></figure>

{% endstep %}
{% endstepper %}


---

# 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.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.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.
