> ## Documentation Index
> Fetch the complete documentation index at: https://moengage.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Personalize Email Content

> Personalize MoEngage email campaigns using user attributes, event data, business events, and campaign variables for higher open rates and conversions.

## Overview

Personalized emails have higher open rates and conversions because they leverage the email context and are relevant. You can personalize your email campaigns based on:

* **User attributes**: Name, Location\*,\* or other attributes (for both general and event-triggered emails).
* **Event attributes**: Product Image, Product Price, Product Name, and so on of an event- *Added to Cart*(only for event-triggered emails).
* **Business Event attributes**: Product ID, Item Code, Product Image, Price, Series Name, Genre of the Series, Case, and so on.
* **Campaign attributes**: Campaign Name, Campaign id, and Campaign Tags.

Before starting with personalization, ensure you have [configured Email Settings](/docs/user-guide/campaigns-and-channels/email/getting-started-with-email/configure-email-channel) and read about [how to create email campaigns](/docs/user-guide/campaigns-and-channels/email/create/create-an-email-campaign).

Personalization is supported in:

* Email Subject
* Email Content
* Sender Name
* From email address
* Reply-to email address

Along with Email content personalization, MoEngage also supports the following:

* [Personalized Images](https://moengage-user-guide.mintlify.app/user-guide/campaigns-and-channels/email/create/personalize-email-content#personalize-images) for Cart Abandonment, Search Drop-offs, and so on
* [Personalized URLs](https://moengage-user-guide.mintlify.app/user-guide/campaigns-and-channels/email/create/personalize-email-content#personalize-urls) to increase conversions by redirecting the user to the right link

<Info>
  When you create a personalization condition or logic for *Email* campaigns using the *Custom HTML Editor,* it appears as a chip. To know more about Chip Actions, refer [here](/docs/user-guide/campaigns-and-channels/getting-started/message-personalization/dynamic-content-personalization#chip-actions).
</Info>

## Insert Personalization

To insert personalization in the Email Subject/Content Text, enter "@" and select the user/event attribute.

<img src="https://mintcdn.com/moengage/ME-DtlELD2N8TrcF/images/moengage_c017fb.png?fit=max&auto=format&n=ME-DtlELD2N8TrcF&q=85&s=18414a994fa623701353135a5803af48" alt="Personlization.png" width="1170" height="209" data-path="images/moengage_c017fb.png" />

On selecting the attribute, you will be prompted to select the Fallback mechanism for this user attribute.

<Warning>
  When Fallback Mechanism is unavailable through the MoEngage UI, you can define  the fallback using [Jinja](/docs/user-guide/campaigns-and-channels/getting-started/message-personalization/jinja-templating-language).

  Example:

  Dear `{{UserAttribute['u\_fn']|default('MOE\_NOT\_SEND')}}` OR Dear `{{UserAttribute['u\_fn']|default('Guest')}}`

  * default('MOE\_NOT\_SEND') will suppress the message from going out.
  * default('Guest') will use 'Guest' when the value for the personalization attribute is unavailable.
</Warning>

## Fallback Mechanism

The fallback mechanism is useful when personalization fails due to the attribute not being present for the user or the non-resolution of the specific user attribute.

<img alt="Screenshot 2024-09-18 at 2.47.17 PM.png" src="https://mintcdn.com/moengage/wIFGWsQFEjsz2j4v/images/moengage_df9134.png?fit=max&auto=format&n=wIFGWsQFEjsz2j4v&q=85&s=d5efabaf794d3b91f7066f86c48d7159" style={{ width:"55%" }} width="1310" height="1042" data-path="images/moengage_df9134.png" />

You can select one of the following fallback options:

* **No Fallback text**: The user attribute will be removed if not present/resolved for that user.\
  **Note**: The No fallback option is not available for the **Sender Name** field.
* **Enter the Fallback text**: The user attribute will be replaced with the text you have entered.
* **Do not send this email if personalization fails**: The email will not be sent to the user if the personalized user attribute is not present/resolved for that user.

<Info>
  - Campaign attributes cannot be edited in personalized previews.
  - During campaign creation, if the campaign ID is added for personalization, a dummy value is used in its place in the personalized preview, as the campaign ID gets generated only after the campaign is created.
  - Ensure that custom attributes do not have the same names as standard attributes of MoEngage. If a custom attribute and a standard attribute having the same name are used for personalization, it can result in incorrect personalization.
</Info>

Email content can also be personalized using [Content Blocks](/docs/user-guide/campaigns-and-channels/getting-started/message-personalization/personalize-content-using-content-blocks), [Auxiliary Data](/docs/user-guide/campaigns-and-channels/getting-started/message-personalization/personalize-content-using-auxiliary-data), [Content APIs](/docs/user-guide/campaigns-and-channels/getting-started/message-personalization/personalize-content-using-content-apis), and [Recommendations](/docs/user-guide/campaigns-and-channels/getting-started/message-personalization/personalize-content-using-recommendations).

## Personalize Business Event-Triggered Campaigns

In business event-triggered Email campaigns, you can use the attribute of the business event that is mapped to the campaign to personalize the campaign. For more information, refer to [Personalize Business Event Triggered Campaigns](https://moengage-user-guide.mintlify.app/user-guide/campaigns-and-channels/getting-started/message-personalization/overview#event-attributes).

## Personalize Content Using Content Blocks

Content Blocks are reusable content that can be used across various campaigns. These are particularly useful for headers, footers, signature blocks, terms and conditions, and so on for email campaigns. For more information, refer to [Personalize Content Using Content Blocks](/docs/user-guide/campaigns-and-channels/getting-started/message-personalization/personalize-content-using-content-blocks).

<Info>
  Both HTML and Text type content blocks can be added when personalizing content for email campaigns.
</Info>

After adding the content block, you can preview the content as shown below:

<img alt="Email_CB_Preview.png" src="https://mintcdn.com/moengage/fQ0QnP2abFkVAzJ2/images/moengage_4e8f51.png?fit=max&auto=format&n=fQ0QnP2abFkVAzJ2&q=85&s=5572d2117aa30b738a0c7261979c6086" style={{ width:"53%" }} width="751" height="1268" data-path="images/moengage_4e8f51.png" />

## Personalize Content Using Auxiliary Data

You can personalize your Email content using auxiliary data by selecting the auxiliary data attributes in the personalization editor. For more information, refer to [Personalize Content Using Auxiliary Data](/docs/user-guide/campaigns-and-channels/getting-started/message-personalization/personalize-content-using-auxiliary-data).

## Personalize Content Using Content APIs

[Content APIs](/docs/user-guide/campaigns-and-channels/getting-started/campaign-content/content-apis) allow you to create personalized campaigns by fetching data dynamically at the time of sending the campaign based on Recommendations, Coupons or other Personalization APIs. Such targeted, relevant, and timely communication has been proven to have much better engagement and conversion rates than generic email campaigns. For more information, refer to [Personalize Content Using Content APIs](/docs/user-guide/campaigns-and-channels/getting-started/message-personalization/personalize-content-using-content-apis).

## Personalize Content Using Recommendations

Recommendations are a group of related products often sold or marketed together. They are common in e-commerce, retail, and digital platforms. Personalized recommendations tailor the selection of products based on user preferences or purchase history. For more information, refer to [Personalize Content Using Recommendations](/docs/user-guide/campaigns-and-channels/getting-started/message-personalization/personalize-content-using-recommendations).

## Personalize Images

Image personalization helps you insert contextual images in emails, which are mainly useful for cart abandonment emails.

### Personalize Images Using the Drag and Drop Editor

* Select the "Cart Abandonment" template in the "Content" section or use your own email template.
  <img alt="ComposeEmail.png" src="https://mintcdn.com/moengage/H6NVBgn3z5fYOOBq/images/moengage_7ccc40.png?fit=max&auto=format&n=H6NVBgn3z5fYOOBq&q=85&s=d0bbd3814ba14970a56afc7c21936e85" style={{ width:"45%" }} width="1245" height="740" data-path="images/moengage_7ccc40.png" />
* Drag and drop the 'Dynamic Content' icon from the content tab into the template.
* Click the Dynamic Content inside the template. The **Add** button in the content tab that lets you personalize the image.
  <img alt="DragDropEditor_DynamicContent.png" src="https://mintcdn.com/moengage/t_8awpRKFC9RNHlT/images/moengage_ac44f4.png?fit=max&auto=format&n=t_8awpRKFC9RNHlT&q=85&s=cf62f08a6160f27868467ed1a32ecddb" style={{ width:"45%" }} width="690" height="1097" data-path="images/moengage_ac44f4.png" />
* Click **Add** and the following screen is displayed.
  <img alt="Email_PersonalizeImages.png" src="https://mintcdn.com/moengage/37Js42lPMANg-cwG/images/moengage_fffd0a.png?fit=max&auto=format&n=37Js42lPMANg-cwG&q=85&s=51ba358d8efabbbb82be7d1d29258b63" style={{ width:"45%" }} width="1434" height="1310" data-path="images/moengage_fffd0a.png" />
* Enter the image URL and personalize using "@". If you are tracking the entire image URL as an attribute, you can directly refer to that attribute using "@".
* Select the fallback mechanism. This is applicable if the attribute is not correctly resolved or there is no image present at the URL after resolving the attribute. You can either enter a fallback image (this will be shown if personalization fails) or decide not to send the email if the image is not personalized.
* Click **Add** to get the personalized image added to the template.

### Personalization Images Using the Custom HTML Editor

1. Click the **Custom HTML Editor** in Step 2 of the campaign creation and choose the **Edit/Paste HTML Template** option. The following screen is displayed.
   <img alt="Screenshot 2024-09-11 at 5.17.02 PM.png" src="https://mintcdn.com/moengage/-6I69HDJzlzOqYai/images/moengage_9bb2c9.png?fit=max&auto=format&n=-6I69HDJzlzOqYai&q=85&s=ba7ebe888409f49cea07014d5fc55df4" style={{ width:"90%" }} width="2646" height="1390" data-path="images/moengage_9bb2c9.png" />
2. Click **Image personalization** on the top pane. The following screen is displayed.
   <img alt="Email_ImagePersonalization.png" src="https://mintcdn.com/moengage/M3SzEdkQVgGAjJCt/images/moengage_75dc09.png?fit=max&auto=format&n=M3SzEdkQVgGAjJCt&q=85&s=ca3850ca5e097fadfa2e553ef1669866" style={{ width:"45%" }} width="1426" height="743" data-path="images/moengage_75dc09.png" />
3. Enter the image URL and personalize using "@". If you are tracking the entire image URL as an attribute, you can directly refer to that attribute using "@".
4. You can select a fallback mechanism. This is applicable if the attribute is not correctly resolved or there is no image present at the URL after resolving the attribute. You can enter a fallback image (this will be shown if personalization fails) or decide not to send the email if the image is not personalized.
   <img alt="FallbackDetails_ImagePersonalization.png" src="https://mintcdn.com/moengage/TTNPRzWn21XF5uj0/images/moengage_fb1ba6.png?fit=max&auto=format&n=TTNPRzWn21XF5uj0&q=85&s=445072419c8f0414543fd59d9f7336de" style={{ width:"45%" }} width="1431" height="740" data-path="images/moengage_fb1ba6.png" />
5. Click **Copy And Close** to copy and insert this image URL. This will copy the image URL to the clipboard and close the Personalization window. A **URL Copied** pops up at the bottom right corner near the custom HTML editor.
6. Click  the  <Icon icon="upload" iconType="solid" /> icon in the custom HTML editor to insert the personalized image. <img src="https://mintcdn.com/moengage/_fazdN5K6hQMBuV9/images/moengage_3a6aa0.png?fit=max&auto=format&n=_fazdN5K6hQMBuV9&q=85&s=a9e7822edb4e4a47b069674f0532ab39" alt="Screenshot 2024-09-11 at 5.37.14 PM.png" width="2650" height="828" data-path="images/moengage_3a6aa0.png" /> You can replace the existing image or insert a new image in the template.

#### Replace an Existing Image in the Template

1. Select the image and click **Replace**.
   <img src="https://help.moengage.com/hc/en-us/article_attachments/207982123/Screen_Shot_2016-09-28_at_3.53.35_PM.png" style={{ width:"45%" }} />
2. Enter the personalized URL under the **Image personalization** tab and click **Replace**.
   <img src="https://help.moengage.com/hc/en-us/article_attachments/207981066/Screen_Shot_2016-09-28_at_3.41.47_PM.png" style={{ width:"45%" }} />

#### Insert a New Image in the Template

1. Click **Insert Image** in the top bar of the editor.
   <img alt="Screenshot 2024-09-18 at 2.29.01 PM.png" src="https://mintcdn.com/moengage/OQ0V9ibjQLpsyCSD/images/moengage_110d47.png?fit=max&auto=format&n=OQ0V9ibjQLpsyCSD&q=85&s=70341a9087b9cebbf792bf952523ac73" style={{ width:"45%" }} width="648" height="394" data-path="images/moengage_110d47.png" />
2. Enter the personalized URL under the **Image personalization** tab and click **Insert**.

After this personalized image is inserted/replaced, you can change the image size by extending/reducing the borders or by specifying a size in the **Resize** option on selecting the image. Make sure the image size matches the actual and fallback images. Otherwise, the resolution might result in image distortion.

## Personalize URLs

You can also personalize the URLs or deep links where you redirect the user upon a click by the user.

1. Click **Link personalization** as shown below: <img src="https://mintcdn.com/moengage/0iWkm50wROjmHH3Z/images/moengage_d1d786.png?fit=max&auto=format&n=0iWkm50wROjmHH3Z&q=85&s=4c73ca06496f807139007e71f85a8939" alt="Screenshot 2024-09-11 at 5.40.42 PM.png" width="2650" height="664" data-path="images/moengage_d1d786.png" /> <img src="https://help.moengage.com/hc/en-us/article_attachments/207981506/Screen_Shot_2016-09-28_at_4.14.20_PM.png" style={{ width:"45%" }} />
2. Create a personalised URL in the text box that appears. Enter @ in the text box provided.
3. In the following **Email Personalization** dialog box that appears, choose the attribute and click **Done**. <img src="https://mintcdn.com/moengage/cFTwc93vQdTanvKi/images/moengage_bd0b9d.png?s=4644cc1f4e126d522c4b70340d89f00a" alt="2024-09-11_17-54-36.gif" width="1328" height="618" data-path="images/moengage_bd0b9d.png" />
4. You can then copy this link and paste it wherever required, into the HTML code. <img src="https://mintcdn.com/moengage/0iWkm50wROjmHH3Z/images/moengage_d351e2.png?fit=max&auto=format&n=0iWkm50wROjmHH3Z&q=85&s=023377203d9b03ef8e7494785a68f070" alt="Screenshot 2024-09-11 at 5.44.17 PM.png" style={{ width:"45%" }} width="1912" height="444" data-path="images/moengage_d351e2.png" />

<Info>
  If the personalized URL fails to find/resolve the user attribute, the email will not be sent to the user. There is no fallback mechanism for personalized URLs. If you have any issues creating personalized email campaigns, please contact your MoEngage Customer Success Manager (CSM) or the Support team.
</Info>
