How to deploy recommendation with SFMC

1

Prepare the Recommendation

  1. Click on Recommendations

  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

2

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.

3

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:

%%[
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.

Last updated

Was this helpful?