Introduction
Phrasee uses generative AI to generate billions of the best marketing messages across the digital customer journey.
MoEngage <> Phrasee
Phrasee analyzes audience personas, product lines, and brand guidelines, and uses AI to generate and optimize copy unique to your brand and audience. With the MoEngage and Phrasee integration, you can:
- Embed Phrasee's dynamically generated content in your MoEngage Campaigns
- Forward MoEngage Events to Phrasee to fine-tune your Phrasee campaign's performances
Integration
library_add_check |
Prerequisites
|
Embed Phrasee content in MoEngage Campaigns
Using MoEngage's Content APIs, you can dynamically add content created by Phrasee inside MoEngage campaigns for a more personalized experience. Below is an example of generating a personalized subject line by using Gen AI, for an email campaign:
Step 1: Set up a MoEngage Content API
- Navigate to Settings >> APIs >> Content API. Click Add.
- Add your Phrasee to the endpoint URL. Depending on your use case, the endpoint will change.
To display a personalized AI-generated subject line, use Phrasee's Single Variant Realtime API.
While setting up your content API, select and method as GET and insert the following URL:
https://realtime.phrasee.co/single_variant?campaign_id=<my_campaign_id>&delivery_id=<delivery_id>&recipient_id={{UserAttribute['Mobile Number (Standard)']}}
Your URL Paramaters will automatically be filled if you paste the above URL.
Under Headers, add the following:
-
Authorization
: Enter your API Token given to you by Phrasee.
-
- Click on "Save" and then "Done" once you see a successful response.
- Note - You can also test your APIs. To test your APIs, from the Content API's action menu, click on "Test". You can your API response and validate it.
Step 2: Display your content inside MoEngage campaigns
To use this API in your MoEngage campaigns,
- On step 2 on your campaign creation, enter @.
- In the pop up, you can select Phrasee Content API configured in Step 1.
- You can use MoEngage Templating Language to parse through the API response and use the content in your campaigns.
To display the subject line generated by Phrasee, you can use the following code:
{% set response = ContentApi.PhraseeIntegration({({"params":{"campaign_id":"12345","delivery_id":"12345","recipient_id":"{{UserAttribute['Mobile Number (Standard)']}}"},"static_params":{},"dynamic_params":{},"request_body":{}})}) %}{{ response.variant_text }}
- You can click on the Preview tab to view your campaign in real-time personalization:
- You can go ahead and Publish the campaign.
Forward MoEngage events to Phrasee
Using MoEngage Connector Campaigns, you can capture which campaigns performed better by forward events like Email Open to Phrasee.
To create a connector campaign on MoEngage,
1. Navigate to Create Campaign >> Connectors >> Custom and choose the delivery type most suitable to your needs. In this case, select "Event triggered".
Select the Trigger criteria (in our case, it will be Email Opened) and your target audience.
2. On step 2 of the campaign:
Call the Phrasee API
To forward MoEngage events to Phrasee, use the POST
method and configure the payload.
- Select the method as POST
- Add the endpoint as Webhook URL:
https://mail-tracking.phrasee.co/live/open?variant_id=%3Cvariant_id%3E&campaign_id=%3Ccampaign_id%3E&account_id=%3Caccount_id%3E&batch_id=%3Cbatch_id%3E&project_id=%3Cproject_id%3E&delivery_id=%3Cdelivary_id%3E&recipient_id=%7B%7BUserAttribute%5B'Mobile%20Number%20(Standard)'%5D%7D%7D&send_id=%7B%7BEventAttribute%5B'moe_event_id'%5D%7D%7D&return_pixel=false
- The URL Parameters will automatically be populated once you paste the above URL. All you need to do is replace
<variant_id>
,<campaign_id>
,<account_id>
,<batch_id>
,<project_id>
, and<delivary_id>
with actual values from your campaign and project settings. - Body:
# Leave the body empty.
- Refer to the Phrasee API Documentation for more information.
Preview your request
At this point, your campaign should be ready to test and send. You can also test your connector configuration using the Test functionality available in Step 2 of Create Connector Campaign.
You can go ahead and Publish the campaign.