Personalize Email Content with Content APIs

One of the key ingredients is the relevance of the campaign goal to the recipient for any successful marketing campaign. Content APIs allow you to create campaigns personalized dynamically using the data fetched at send time from your Recommendation or coupon 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.

As shown in the example below, if a user makes a flight booking, Dynamic Content APIs can be used to send emails to them with offers on hotel accommodation for the destination, keeping in mind the accommodation preferences of the user within a few hours of booking the flight.

75b355f5-691c-47f9-8708-a63e74f49656.png

Such personalized, relevant emails can be used to drive conversion and unlock up-sell and cross-sell opportunities in many scenarios.

Another example where a user has left a hotel booking incomplete in her shopping cart while looking for resorts in Bali. In this case, the website where she tried to make the transaction triggers an email to her reminding her to complete the transaction and make recommendations on similar hotels for her to choose from. Targeted, contextual, and personalized emails like this are an extremely useful tool for a marketer looking to grow their business.

0981bae3-d273-4f9a-bb3e-1befac626a15.png

Using Content APIs in MoEngage

Follow these three steps to use Content API in MoEngage.

  1. Add an API to MoEngage

  2. Create a personalized email campaign using the saved Content API

  3. Send the campaign

Add an API to MoEngage

To set up an API to be used during MoEngage campaigns, add the URL and parameters of the Content API to the MoEngage platform. Follow these steps:

  1. Navigate to MoEngage Dashboard > Settings > APIs and click the Content API tab.

  2. Click Add button.
    The following Add Content API screen is displayed.
    7824aed9-b3d1-4564-b0c0-f7148702de0b.png

     
  3. Fill in the following details:

 

Field

 

Description

 

API Name

Type the Content API name.

API Type

Select from the drop-down either single or bulk.

API URL

Type the complete URL of the Content API.

Headers

Click the plus sign type the key-value for the headers used in the Content API.

Key

Value

Parameters

Click the plus sign type the key-value for the paraments used in the Content API.

Key

Value

Use “@” in the value field to choose from the list of pre-defined user attributes. The parameters cannot be personalised using Event attributes in the value field.

4. Click Save.

The Content API is saved in the MoEngage app.

Create a personalized email campaign using the saved Content API

Create a campaign using the steps described in Create Email Campaign.

During the campaign creation, in the content creation step use the ContentApi variable to access all the configured Content API sources.

Use the ContentApi variable

Examples

Example 1

You may have a “cart” data source with the following JSON:

{
 "date": "March 10, 2016",
 "items": [
   {
     "name": "belt",
     "image": "http://mydomain.com/images/1001.jpg",
     "price": 11
   }, {
     "name": "shoes",
     "image": "http://mydomain.com/images/1002.jpg",
     "price": 12
   }, {
     "name": "hat",
     "image": "http://mydomain.com/images/1003.jpg",
     "price": 10
   }
 ]
}

In the content creation, use the following code:

{% for cart_item in ContentApi.cart().items %}
 <div>
   <h2>{{ cart_item.name }}: ${{ cart_item.price|round(2) }}</h2>
   <img src="{{ cart_item.image }}" />
 </div>
{% endfor %}

Example 2

The campaigns contain placeholders for different SKUs (in this case, hotels), along with the required formatting, segmentation, and triggering schedules.

fbcfe1ae-2894-4940-bca7-4fea903e9de2.png

Send the Email Campaign

At the time of sending the message, for the example above the system would:

  • Invoke the Content API to fetch hotels recommended for the user based on the search parameters like destination, check-in, and check-out dates, number of adults and children, and so on.

  • Populate the email with details of the recommended hotels like the name, rating, price, image, and ranking in an HTML-formatted, personalized email.

  • Do this for every user belonging to the specified segment dynamically without any manual input.

1a31ab28-97f7-49d9-b08d-65f0383a22c2.png

For more information on personalization language, refer to Templating Language Documentation.

Was this article helpful?
0 out of 0 found this helpful