---
title: Enable triggered campaigns with generic ESP
slug: product-recommendations/docs/enable-triggered-campaigns-with-generic-esp
docTags: 
createdAt: 2026-07-30T20:41:31.757Z
---

[Optimizely Email Product Recommendations](docId\:JJJSJh55rGuqsV2tazMON) lets you send triggered emails through your email service providers (ESPs) using an ESP client integration framework, through a generic ESP API. This integration framework acts as a proxy server between [Triggered Messages](docId\:E6GbLPFhYHZ_ZJYliUF12) and your ESP, as it is impossible to integrate directly with ESPs on each and every instance.

## Prerequisites

- Implement the [generic ESP to receive the API response](docId\:kVYG-CR3n4kUr9ppJbJTb). The customer, partner, or the ESP need to ensure emails are sent to the users. 
- Ensure your site is being tracked by the Optimizely Email Product Recommendations team.
- The Product Recommendations team is receiving an updated product catalog feed. 

## Configure the ESP connection and action

1. Log in to the Optimizely Product Recommendations platform.
2. Go to **Configuration > ESP**. 
3. Open the **Connections&#xA0;**&#x74;ab.

   ![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/EbAVYipF0MAmwUkDpu9eC-20260720-150226.png)
4. Click **Create ESP connection&#xA0;**&#x61;nd enter the following information:
   - **Connection name** – Enter a name for your connection.
   - **Name of ESP** – Select **Optimizely generic** from the drop-down list. 
   - **ESP server** – Enter the URL of the server endpoint your team configured to handle requests from Optimizely Triggered Messages. 
   - **ESP API key** – (Optional) Enter the API key configured on your server to authenticate requests from Optimizely Triggered Messages.
5. Click **Save ESP connection&#xA0;**&#x74;o save the configuration.
6. Click **Test ESP connection&#x20;**&#x74;o send a sample triggered message and test the ESP connection.

   ![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/F1dBhf8RPSOPX0-ktCEDZ-20260720-150226.png)
7. Go to **Actions > Create ESP action&#xA0;**&#x61;nd enter the following information:
   - **ESP action name** – Enter a name for your ESP action.
   - **ESP action type** – Choose the [type of action you want to perform](docId\:NR7lvbQ34fUHMcXrmx1k3) (send message to the user, add a user to a group, or remove a user grom a group). Provide the parameters depending upon the action.   
   - **Connections&#xA0;**– Choose the ESP connection you previously created.
8. Click **Save ESP action** to save the ESP action and **Test ESP action&#xA0;**&#x74;o test its functionality. You will generate a **Message ID** or a **Group ID**.

   ![](https://api.archbee.com/api/optimize/BrbvVORKJ5iIeSMZye5kI/DLkWdNV6K4L5VvbbfexjV-20260720-150226.png)

## Configure a Triggered Messages campaign

1. Go to **Configuration > Campaigns > Triggered Messages**.
2. Click **Create campaign** to create an [Optimizely Triggered Messages campaign](docId\:UqO0jXgxuqhLxQta4NEC-).
3. Click **Save campaign&#x20;**&#x74;o save your campaign.

   :::hint{type="info"}
   **Note**

   Select the ESP action you created previously from the **ESP action** drop-down list. In **Strategies > Session > In-session triggers**, choose any trigger strategy (**Abandoned checkout**, **Abandoned basket**, or **Abandoned browsed products**). You can also choose as many **Additional trigger actions** as you want. 
   :::

## Integrate with your ESP

When a trigger fires, **Triggered Messages** uses the generic ESP API to send the user's email address, a **triggerFireID**, and a **Message ID** or a **Group ID&#x20;**&#x74;o the generic ESP. You need to configure the following in your ESP with the received information:

:::Paragraph{listStyleType="disc" indent="2"}
For **Send** message, replace the placeholders in the **Email Product Recommendations** template HTML code with the actual user's email address and the `Message ID` and `triggerFireID `sent through the API.
:::

:::Paragraph{listStyleType="disc" indent="2"}
For **Add user to group**, add the user's email address to the group with the `Group ID` sent through the API. 
:::

:::Paragraph{listStyleType="disc" indent="2"}
For **Remove user from group**, remove the user's email address from the group with the `Group ID` sent through the API.
:::
