---
url: https://docs.seen.io/api/guides/bloomreach.md
description: >-
  Send customer data from Bloomreach Engagement to Seen for video generation,
  then write the player link and thumbnail back via Omniconnect.
---

# Bloomreach

::: info
In the following example, we will be sending customer data to Seen for video generation, and receiving a unique video player link and personalised email thumbnail back to Bloomreach Engagement for distribution. This example uses a Webhook action node in a Bloomreach Scenario to send data to Seen, and an Omniconnect Transformation to receive the result back and write it to the customer record, ready to use across email, SMS, and in-app campaigns. No third-party middleware is required.

If you have multiple video campaigns with Seen, repeat the process to connect Bloomreach with each one. You can reach out to your Customer Success Manager at Seen for assistance.

A Project needs to be created and published in the Seen Platform prior to setting up the integration.
:::

## Send data to Seen

1. In Bloomreach Engagement, navigate to **Data & Assets → Integrations → + Add new integration**, select **HTTP Authentication**, and configure it as follows:

   * Endpoint prefix: `https://next.seen.io/`
   * Custom headers:
     * Header key: `Authorization`
     * Header value: `Bearer {your Seen API token}`
     * Type: `secret`

   You can create an API token in your Seen Platform Workspace under **Settings → API**.
2. Navigate to **Campaigns → Scenarios → + New scenario** and add a **Webhook** action node. Configure it as follows:
   * Webhook URL: `https://next.seen.io/v1/projects/{PROJECT_ID}/data` (find your Project endpoint in the **Run** tab of your Seen Platform Project)
   * HTTP Method: `POST`
   * Payload format: `JSON`
     ```json
     {
       "id": "{{ customer_ids.registered | default(customer_ids.cookie) }}",
       "first_name": "{{ customer.first_name | default('') }}",
       "last_name": "{{ customer.last_name | default('') }}"
     }
     ```
     Remember to modify the payload to match the variables used in your Seen Project. All fields must match property names defined in your Seen Project.
   * Authentication: toggle on and select the HTTP Authentication integration created above.
3. You can now test the Webhook using the **Test webhook** button at the top of the webhook modal. A successful request returns `201 Created` and triggers video generation in Seen.
4. If everything works as intended, proceed to the next step.

## Set up your webhook in Seen Platform

1. Navigate to your Project in the Seen Platform.
2. Open the **Run** tab and click **Add Webhook**.
3. Configure your webhook (see [Webhook](/api/webhook) for the full configuration).

## Receive data back from Seen

1. In Bloomreach, navigate to **Data & Assets → Integrations → + Add new integration**, search for **Omniconnect**, and add it with a recognisable name such as **Seen Callback**. Copy the generated **Omniconnect URL**: this is the callback target you will configure in Seen.
2. In the Seen Platform webhook editor, configure the webhook to POST back to Bloomreach:
   * URL: the Omniconnect URL copied above
   * Method: `POST`
   * Content-Type: `application/json`
3. Use the payload below as a starting point for the Seen webhook body. Replace the `{{ }}` placeholders with the dynamic output references available in the Seen webhook editor:
   ```json
   {
     "id": "{{ user_id }}",
     "player_link": "{{ Player link }}",
     "email_thumbnail_url": "{{ Email thumbnail link }}"
   }
   ```
4. Click **Create** to save the webhook.
5. Back in Bloomreach, open the **Seen Callback** Omniconnect integration and go to the **Transformation** tab. Trigger one outbound test from your Scenario to populate the inbound request list, then write a transformation function to map the Seen payload to the customer record. You can use the starter below:
   ```javascript
   function handler(payload) {
     const customerIDs = { "registered": payload.id };
     return [
       {
         name: "customers",
         data: {
           customer_ids: customerIDs,
           properties: {
             "seen_player_link": payload.player_link,
             "seen_email_thumbnail_url": payload.email_thumbnail_url
           },
           update_timestamp: currentTimestampInSeconds()
         }
       },
       {
         name: "customers/events",
         data: {
           event_type: "seen_video_ready",
           customer_ids: customerIDs,
           properties: {
             "player_link": payload.player_link,
             "email_thumbnail_url": payload.email_thumbnail_url
           },
           timestamp: currentTimestampInSeconds()
         }
       }
     ];
   }

   function currentTimestampInSeconds() {
     return Math.round(Date.now() / 1000);
   }
   ```
6. Click **Test transformation** and inspect the **Output** tab to confirm the customer identifier and properties are mapped correctly. Click **Save changes**, then **Start** to begin processing incoming Seen callbacks.
7. To verify end-to-end, search for your test customer in Bloomreach and confirm that `seen_player_link` and `seen_email_thumbnail_url` have been written to the customer record, and that a `seen_video_ready` event appears in their event history.

   Customer properties like `seen_player_link` only become available in Bloomreach template editors after they have been written at least once, so complete this verification step before building any templates that reference them.
8. Once confirmed, you can reference these properties in any Bloomreach campaign using Jinja:
   ```
   {{ customer.seen_player_link }}
   {{ customer.seen_email_thumbnail_url }}
   ```

Downstream sends should be triggered by the `seen_video_ready` event to ensure the video has finished rendering before the message goes out.
