Optilyz
Direct Mail
Overview
Optilyz is a direct Email automation platform that helps you create personalized, sustainable, and efficient direct email campaigns, including letters, postcards, and self-mailers.
Integrating CleverTap with Optilyz allows you to run hyper-targeted direct mail campaigns as part of your customer journeys. This integration bridges digital and physical channels, enhancing campaign ROI and customer experience.
With this integration, you can:
- Send personalized postcards or letters based on In-App or online user behavior.
- Automate A/B testing of print creatives using campaign variations.
- Include direct mail in omnichannel customer journeys for better conversion and engagement.
Prerequisites for Integration
Ensure the following before starting the integration:
- Ensure you have access to your CleverTap account.
- Ensure you have access to your Optilyz account.
- Ensure that you have your Optilyz API key. Your Optilyz customer success manager will provide you with your Optilyz API key.
- Ensure that you have your Optilyz Automation ID. The ID can be found in a box on the page header. Navigate to the automation (you want to send data into) on your Optilyz dashboard. The automation must be activated for your account first.

Automation ID
Integrate CleverTap with Optilyz
To integrate Optilyz with CleverTap, perform the following two major steps:
These steps allow you to automate the delivery of personalized direct mail, such as letters and postcards, triggered by user activity tracked in CleverTap.
Enable Webhooks
If Webhooks are not enabled for your account, contact CleverTap Support.
Set Up Webhook in CleverTap
Configure the webhook in your CleverTap dashboard to initiate direct mail triggers using the Optilyz endpoint. To do so, perform the following steps:
- Go to Settings > Channels > Webhooks from the CleverTap dashboard.
- Click + Add Webhook and provide a meaningful name for the webhook.
- Set the HTTP Method to
POST
and enter the following Endpoint URL. For more information, refer to Optilyz API.
https://www.optilyz.com/api/v2/automations/<OPTILYZ_AUTOMATION_ID>/recipient
- Add the following key-value pair under Headers:
Key | Value |
---|---|
Authorization | Bearer ApiKey |
Content-Type | application/json |
- Select Basic Authentication for Authentication and enter the following:
- Username: Your Optilyz Private API Key
- Password: Use a hyphen (
-
)

Create Webhook
- Click Save to create the webhook.
After saving the webhook, CleverTap will be ready to send user profile data directly to Optilyz.
Create Webhook Campaign in CleverTap
Launch a Webhook campaign to deliver personalized direct mail from CleverTap to Optilyz users. To do so, perform the following steps:
-
Go to Campaigns on the CleverTap dashboard, click + Campaign and select Webhook from the list of messaging channels.
-
Configure the following campaign settings: target audience, schedule, and other basic settings.
-
Perform the following steps under the What section:
- Select the webhook created in Set Up Webhook in CleverTap.
- Set Content Format to
JSON
. - Select Custom Body.

Webhook Content
- Enter the payload under the Custom Body section using Liquid Tags:
{
"address": {
"title": "{{ Profile.title | default: "-" }}",
"firstName": "{{ Profile.first_name | default: "-" }}",
"lastName": "{{ Profile.last_name | default: "-" }}",
"street": "{{ Profile.street | default: "-" }}",
"houseNumber": "{{ Profile.address | default: "-" }}",
"zipCode": "{{ Profile.zipcode | default: "-" }}",
"city": "{{ Profile.city | default: "-" }}",
"country": "{{ Profile.country | default: "-" }}"
},
"variation": 1
}
// Note: The `variation` field is optional and controls which design variation will be used in Optilyz. If omitted, a variation will be selected randomly.
Click the variable selector (@
, {
, or {{
) in the editor to personalize the campaign. You can dynamically reference user profile properties using Liquid Tags.
Personalization
You can use any available personalization attributes and structure your request body according to the Optilyz API documentation.
- Click Preview & Test to validate the webhook request.

Preview and Test Campaign
- Click Publish to launch the campaign. Verify in the Optilyz dashboard if everything works as intended.

Optilyz dashboard
Once published, your campaign will trigger real-world mailers based on live user behavior.
Updated about 9 hours ago