> ## Documentation Index
> Fetch the complete documentation index at: https://moengage.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Optilyz

# Introduction

[Optilyz](https://optilyz.com/) is a direct mail automation platform that enables you to run more customer-centric, sustainable, and profitable direct mail campaigns.

# Use cases

Use the Optilyz and MoEngage connectors to send your customers direct mail such as letters, postcards, and self-mailers. Running direct mail like a digital channel means moving away from mass mailings and leveraging the channel as part of your (digital) customer journeys. The benefits of a modern approach to direct mail are:

* Increased conversion rates via increased relevance, additional use cases, easier A/B testing, and cross-channel effects
* Reduced effort via automation and an end-to-end solution
* Reduced cost via frame contracts and cost transparency

# Integration

<Info>
  **Prerequisites**

  1. Ensure you have access to your Optilyz dashboard.
  2. Ensure that you have your Optilyz API key. Your Optilyz customer success manager will provide you with your Optilyz API key.
  3. Ensure that you have your Optilyz Automation ID. The automation 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 to. The automation must be activated for your account first.
</Info>

To integrate with optilyz, use the [optilyz API](https://www.optilyz.com/doc/api/) to send recipient data to the MoEngage connectors.

## Step 1: Create connector campaign on MoEngage

To create a connector campaign on MoEngage,

1. Navigate to Create Campaign >> Connectors >> Custom

<img src="https://mintcdn.com/moengage/11KR3mwxT6FlowrU/images/partner_4455800640660.png?fit=max&auto=format&n=11KR3mwxT6FlowrU&q=85&s=9cfa93851efaa7d19dda1911be3814c2" alt="Screenshot_2022-02-21_at_10.48.46_PM.png" width="1104" height="1238" data-path="images/partner_4455800640660.png" />

2. On step 2 of the campaign, select -

#### a) URL details

<img src="https://mintcdn.com/moengage/11KR3mwxT6FlowrU/images/partner_4520579794964.png?fit=max&auto=format&n=11KR3mwxT6FlowrU&q=85&s=b54966e5981de6e2d39466918ce3d7f0" alt="Screenshot_2022-02-28_at_1.51.23_PM.png" width="2220" height="290" data-path="images/partner_4520579794964.png" />

| Key         | Value                                                                          |
| ----------- | ------------------------------------------------------------------------------ |
| Method      | POST                                                                           |
| Webhook URL | `https://www.optilyz.com/api/v2/automations/<OPTILYZ_AUTOMATION_ID>/recipient` |
| URL params  | --                                                                             |

#### b) Headers

<img src="https://mintcdn.com/moengage/11KR3mwxT6FlowrU/images/partner_4520560536724.png?fit=max&auto=format&n=11KR3mwxT6FlowrU&q=85&s=e96e18d3d5f3e46030b8c6e46da97042" alt="Screenshot_2022-02-28_at_1.53.18_PM.png" width="2170" height="288" data-path="images/partner_4520560536724.png" />

Add the following two headers

| Key           | Value                                         |
| ------------- | --------------------------------------------- |
| Authorization | `{{ '<OPTILYZ_API_KEY>:' \| base64_encode }}` |
| Content-Type  | application/json                              |

#### c) Request Body

In the following request body, you can use any personalization attributes and build a custom request template according to [Optilyz’ API documentation](https://www.optilyz.com/doc/api/) .

The `variation` field is optional and can define which design inside the automation should be used. If a variation is omitted, Optilyz will assign one of the defined variations randomly. <img src="https://mintcdn.com/moengage/11KR3mwxT6FlowrU/images/partner_4520577566484.png?fit=max&auto=format&n=11KR3mwxT6FlowrU&q=85&s=bfac133652f9b39a75855df8220d0c34" alt="Screenshot_2022-02-28_at_1.57.59_PM.png" width="1162" height="446" data-path="images/partner_4520577566484.png" />

## Step 3: Test your configuration

At this point, your campaign should be ready to test and send. You can also test your connector configuration using the Test functionality available on Step 2 of Create Connector Campaign

<img src="https://mintcdn.com/moengage/11KR3mwxT6FlowrU/images/partner_4460621328788.png?fit=max&auto=format&n=11KR3mwxT6FlowrU&q=85&s=b318e4423cbe1aaa69e5e67a873d5b36" alt="Screen_Shot_2022-02-22_at_11.12.42_AM.png" width="2464" height="270" data-path="images/partner_4460621328788.png" />

Check the Optilyz dashboard once you test the configuration or trigger the campaign.
