Below is a step-by-step guide on how to attach personalized product recommendations in your email campaigns using SendInBlue.



1. Start by fetching your url for using product recommendations in emails, the link can be found on the engage platform which is reached using the following link: -> https://engage.zubi.ai/login 


The complete url looks like below,



https://s1.zl.ax/v1/img/[nano_id]/[email]/[id]



The following variables need to be changed when added to your email template,


[nano_id] 
Your engage nano_id
[email]
Use the notation used by your email service for dynamically set the receiver email address
[id]
Represents the product recommendation ID, values [0-7] are available to use where the lower ID the higher (better) recommendation score



Note:  [nano_id] above represents your "account ID", hence it will always be the same independently of the email service used




2. Set the ID (0-7) of the recommendation to be displayed, note that if the same ID is used for two or more recommendations the same products will be displayed. The lower the number the higher score from the recommendation engine. This means that if three recommendations are going to be displayed in the email three different urls will be used, for example,



https://s1.zl.ax/v1/img/[nano_id]/{{ contact.EMAIL }}/0
https://s1.zl.ax/v1/img/[nano_id]/{{ contact.EMAIL }}/1
https://s1.zl.ax/v1/img/[nano_id]/{{ contact.EMAIL }}/2



3. Add the the urls from step 3 into the image URL field in SendInBlue (mandatory)


4. Add the below url into the link field, if you would like the images to be linked to the product within your store (optional)


Note: The same  ID needs to be used on the image url and the link url otherwise the link and image will not match



https://s1.zl.ax/v1/url/[nano_id]/{{ contact.EMAIL }}/0



5. If using a button make sure to add a link to the button (same url as in step 4), 




https://s1.zl.ax/v1/url/[nano_id]/{{ contact.EMAIL }}/0








6. Test the recommendations either by sending a test email or view the email in preview. If everything is entered correct, product recommendations will be fetched.





Optional configuration


If you would like to change the design/settings of the recommendations displayed in the email the below variables can be set and added to the url


1. Start by configure the product recommendations to be displayed, the following setting are available,



Setting
Description

mage width (w

if no value is passed default value of 300 is used
Backfill (fill)
 0/1/2, 0 = recently_added, 1 = top_selling, 2 = top_grossing if no value is passed default value 0 is used If setting is being used, please make sure to use the same fill in image and link url.
Font-size (fs)
First font value represent product name, second represents price. If no value is passed 1.25rem+1rem is used
Font-weight (fw)
First font weight represents product name, second represents price. If no value is passed default value 300+300 is used
Font-family (ff)
First color represents product name and second represents price, if no value is passed default value 
Color (color)
First color represents product name and second represents price, if no value is passed default value 000+666 is used (Color should be set using HEX format without the leading hash tag)
Align (align)
left/center/right, if no value is passed center is used as default
Image (img)
1/0, where 1 represents images to be displayed and 0 no image will be displayed. If no value is passed image will be displayed as defaul
Title (title)
1/0, where 1 represents product name to be displayed and 0 no product name will be displayed. If no value is passed image will be displayed as default
Price (price)
1/0, where 1 represents price to be displayed and 0 no price will be displayed. If no value is passed price will be displayed as default
Currency (cur
Three letter ISO-code, if no currency is passed the default currency from store is used
Decimals (dec)
The number of decimals to be used for price, if no value is passed 2 decimals are being used.
Image padding (ip)
If not set, default value will be 0+0+5px+0
Price padding (pp)
If not set, default value will be 5px+0+10px+0


Note: If fill is being used it is important that the same fill is used in both image and link, otherwise there is a risk that product and link will missmatch.


Below is an example of what the configuration might look like:


w=300&fill=0&fs=1.5rem+1.25rem&fw=300+400&ff=roboto&color=FF00FF+0000FF&align=center&img=1&title=1&price=1

 


Note: Using settings is optional, if only default values are going to be used, no settings needs to be sent.





2. Combine the above configuration with your unique link for email product recommendations,



https://s1.zl.ax/v1/img/[nano_id]/{{ contact.EMAIL }}/0?w=300&fill=0&fs=1.5rem+1.25rem&fw=300+400&ff=roboto&color=FF00FF+0000FF&align=center&img=1&title=1&price=1