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

# Email Vouchers in BAU Emails

> Insert Mention Me voucher codes into your Bloomreach BAU emails to remind customers about unused vouchers.

This guide walks through adding Mention Me voucher codes into your Bloomreach BAU emails to remind customers about unused vouchers.

You can also use [pre-built initiatives](/knowledge/esp-crm/bloomreach/setup) to automate email reminders. Importing the initiative into Bloomreach generates:

* [Aggregates](https://documentation.bloomreach.com/engagement/docs/aggregates-and-running-aggregates)
* Example banners
* Segments used to display voucher content based on referral activity

## Aggregates

All aggregates are calculated using the last issued voucher (either to a referrer or referee) with a future expiry date.

| Aggregate Name                               | Description                                                       |
| -------------------------------------------- | ----------------------------------------------------------------- |
| last\_mention\_me\_referee\_voucher\_code    | Referee's latest voucher code. Example: `10USDOFF-RXAAURVZ`       |
| last\_mention\_me\_referee\_voucher\_expiry  | Referee voucher expiry date. Example: `2024-09-03T16:19:19.000Z`  |
| last\_mention\_me\_referee\_voucher\_value   | Referee's voucher value. Example: `20%` or `10 GBP`               |
| last\_mention\_me\_referrer\_voucher\_code   | Referrer's latest voucher code. Example: `10USDOFF-RXAAURVZ`      |
| last\_mention\_me\_referrer\_voucher\_expiry | Referrer voucher expiry date. Example: `2024-09-03T16:19:19.000Z` |
| last\_mention\_me\_referrer\_voucher\_value  | Referrer's voucher value. Example: `20%` or `10 GBP`              |

To format expiry dates for customer-facing display:

```jinja theme={null}
{{ aggregates['aggregate_id'] | to_timestamp | from_timestamp('%A, %d of %B %Y') }}
```

## Example Banners

Two example banners (referrer and referee) are provided with pre-inserted aggregates.

<Frame caption="An example referrer banner in Bloomreach with pre-inserted aggregates.">
  <img src="https://mintcdn.com/mentionme/CnDLFo2wevUDbm0K/images/knowledge/integrations/data-feeds/20782435481629.png?fit=max&auto=format&n=CnDLFo2wevUDbm0K&q=85&s=a16a401f432aaff910f757af4e1b352c" alt="Referrer banner example in Bloomreach" width="697" height="304" data-path="images/knowledge/integrations/data-feeds/20782435481629.png" />
</Frame>

The referee banner follows the same layout, tailored to the referee journey:

<Frame caption="An example referee banner in Bloomreach with pre-inserted aggregates.">
  <img src="https://mintcdn.com/mentionme/CnDLFo2wevUDbm0K/images/knowledge/integrations/data-feeds/20782466122653.png?fit=max&auto=format&n=CnDLFo2wevUDbm0K&q=85&s=35e30ddb85f950e31c1aa80f650d1bbf" alt="Referee banner example in Bloomreach" width="697" height="304" data-path="images/knowledge/integrations/data-feeds/20782466122653.png" />
</Frame>

## Pre-Built Segments

These segments control banner visibility and only display content to customers with voucher rewards.

## Prerequisites

1. An active Mention Me referral programme that rewards referees and referrers
2. Mention Me and Bloomreach integration enabled
3. Email Service Provider (ESP) integrated with your Bloomreach account
4. Understanding of [Bloomreach Jinja](https://documentation.bloomreach.com/engagement/docs/filters#date--time-processing)

## Step 1 - Download Banner Aggregates

Download the JSON file linked at the bottom of this guide.

## Step 2 - Import Into Bloomreach

<Steps>
  <Step title="Log in to Bloomreach">
    Log in to [Bloomreach](https://app.exponea.com/login).
  </Step>

  <Step title="Navigate to Initiatives">
    Navigate to **Initiatives**.

    <Frame caption="The Initiatives navigation in Bloomreach.">
      <img src="https://mintcdn.com/mentionme/CnDLFo2wevUDbm0K/images/knowledge/integrations/data-feeds/20757502464925.png?fit=max&auto=format&n=CnDLFo2wevUDbm0K&q=85&s=5adf189be613ca4f956d04b8ae0251c8" alt="Bloomreach Initiatives navigation" width="674" height="886" data-path="images/knowledge/integrations/data-feeds/20757502464925.png" />
    </Frame>
  </Step>

  <Step title="Click Import">
    Click **Import**.

    <Frame caption="The Import button in Bloomreach.">
      <img src="https://mintcdn.com/mentionme/CnDLFo2wevUDbm0K/images/knowledge/integrations/data-feeds/20757485863197.png?fit=max&auto=format&n=CnDLFo2wevUDbm0K&q=85&s=c57caf2a445b81760b193e11a63887b5" alt="Bloomreach Import button" width="572" height="230" data-path="images/knowledge/integrations/data-feeds/20757485863197.png" />
    </Frame>
  </Step>

  <Step title="Upload and import the file">
    Upload the downloaded file and click **Import**.

    <Frame caption="The file upload and import dialog in Bloomreach.">
      <img src="https://mintcdn.com/mentionme/CnDLFo2wevUDbm0K/images/knowledge/integrations/data-feeds/20757485863965.png?fit=max&auto=format&n=CnDLFo2wevUDbm0K&q=85&s=b88fed51e8e6210c8441379a6dde04a1" alt="Bloomreach file upload and import dialog" width="1014" height="638" data-path="images/knowledge/integrations/data-feeds/20757485863965.png" />
    </Frame>
  </Step>
</Steps>

## Step 3 - Add a Banner to Emails

You have two options:

### Using the Pre-Built Banner

<Steps>
  <Step title="Add a custom row">
    Add a new row in your email design and choose **Custom**.
  </Step>

  <Step title="Insert a banner">
    Insert either the referrer or referee banner.

    <Frame caption="Adding a custom banner row in Bloomreach email design.">
      <img src="https://mintcdn.com/mentionme/CnDLFo2wevUDbm0K/images/knowledge/integrations/data-feeds/20782828021021.png?fit=max&auto=format&n=CnDLFo2wevUDbm0K&q=85&s=227a3fd9bb034301e3c41c592b1d0a1c" alt="Adding a custom banner row in Bloomreach email design" width="531" height="634" data-path="images/knowledge/integrations/data-feeds/20782828021021.png" />
    </Frame>
  </Step>

  <Step title="Customise the banner">
    Update banner copy and imagery to match your brand.
  </Step>
</Steps>

### Using Your Own Banner with Aggregates

<Steps>
  <Step title="Add a personalisation tag">
    In your email, add a new personalisation tag using **Customer attribute**.
  </Step>

  <Step title="Select a Mention Me aggregate">
    Select an aggregate starting with `last_mention_me`.

    <Frame caption="Selecting a Mention Me aggregate as a personalisation tag.">
      <img src="https://mintcdn.com/mentionme/CnDLFo2wevUDbm0K/images/knowledge/integrations/data-feeds/20782780963357.png?fit=max&auto=format&n=CnDLFo2wevUDbm0K&q=85&s=c027408eecff85fcbdd1e0909b8e912e" alt="Selecting a Mention Me aggregate as a personalisation tag" width="794" height="598" data-path="images/knowledge/integrations/data-feeds/20782780963357.png" />
    </Frame>
  </Step>
</Steps>

For expiry dates, use Jinja formatting:

```jinja theme={null}
{{ aggregates['aggregate_id'] | to_timestamp | from_timestamp('%A, %d of %B %Y') }}
```

<Frame caption="A Jinja formatted expiry date shown in Bloomreach.">
  <img src="https://mintcdn.com/mentionme/CnDLFo2wevUDbm0K/images/knowledge/integrations/data-feeds/20782780966301.png?fit=max&auto=format&n=CnDLFo2wevUDbm0K&q=85&s=24f958cd356746127d3cab6d8c0c7256" alt="Jinja formatted expiry date in Bloomreach" width="763" height="202" data-path="images/knowledge/integrations/data-feeds/20782780966301.png" />
</Frame>
