Creating Content APIs in MoEngage
To integrate Talon.One with MoEngage, you can create a Content API in MoEngage for each of the following supported generic CEP integration endpoints:
Creating an API key in Talon.One
Generate a Talon.One API key of the type Customer Engagement
that you can use with MoEngage.
To generate a third-party API key:
-
In your Application, click Settings > Integration API Keys.
-
Click Create API Key.
-
In the Create API Key drawer, select Production as the key type.
-
In Key name, type a name to identify the key.
-
In Key expiration date, select a date.
-
In Third-party integration, select Yes.
-
From Platform, select Customer Engagement.
-
Click Create API Key.
-
Click to copy the key for use.
noteYou cannot view or copy the API key after closing the drawer. If you lose it, create another API key.
Use the key in the Authorization
header of each of the endpoints. For example:
Authorization: ApiKey-v1 dbc644d33aa74d582bd9479c59e16f970fe13bf3
Creating Content APIs in MoEngage
In MoEngage, based on the Talon.One content you want to use in your campaign, create a Content API for each of the supported endpoints.
To create a Content API in MoEngage:
- On the MoEngage dashboard, click Settings > APIs > Content API.
- Click Add.
- In the Add Content API window, enter the required endpoint parameters and headers.
- Click Save.
The endpoint is saved under Content API.
Using Content APIs in MoEngage campaigns
You can now use the Content API that you created for a supported Talon.One endpoint in your MoEngage campaigns.
Usage example
You can use the Content API, for example, to display a generated coupon code in an email template of your email campaign. A sample syntax to do this is:
{% set couponAPI = ContentApi.Create_coupon({({“params”:{},“static_params”:{},“dynamic_params”:{},“request_body”:{}})}) %}
{% for coupon in couponAPI.Value %} {{coupon}} {% endfor %}
To learn how to use Content APIs in MoEngage, see the MoEngage documentation:
Supported endpoints
Based on the content needs of your MoEngage campaign, you can use the following supported generic CEP integration endpoints:
Create coupon
https://integration.talon.one/customer_engagement/coupon
See API Docs
You can modify the format of Talon.One-generated coupon codes for any campaign:
- Open your campaign.
- Click Settings > Coupon codes.
Create referral
https://integration.talon.one/customer_engagement/referral
See API Docs
Fetch loyalty ledger
https://integration.talon.one/customer_engagement/loyalty
See API Docs