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 3rd-party API key
Generate a Talon.One API key of the type Customer Engagement
that you can use with MoEngage.
To generate a 3rd-party API key:
-
In your Talon.One Application, click Settings > Developer settings.
-
Click Create API Key.
-
For Do you want to use this API Key with a 3rd party service?, select Yes.
-
From Platform, select Customer Engagement.
-
Select an expiration date, and click Create API Key.
-
Copy the key for later use.
noteYou cannot display the API key after this step. If you lose the value, create a new 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