# Brevo

Brevo can be used to distribute Apple Wallet and Google Wallet passes by email. This setup enriches Brevo contacts with a secure Wallet link, then reuses it in Brevo templates.

<details>

<summary><strong>Real-world examples</strong></summary>

* A retail brand sends a loyalty “Add to Wallet” link after newsletter signup.
* A gift card program sends a “Save your gift card” link after purchase.
* A membership program sends a renewal email that includes the updated pass link.

</details>

## Prerequisites

Brevo contacts must be exportable and importable. Brevo attributes must also be manageable.

The Wallet Crew must be configured to generate an `authToken` per email. This token is used to build a secure “Add to Wallet” URL.

If passes are normally generated from a CRM connector (Cegid, Openbravo, etc.), emails imported from Brevo must exist in that system. If that is not the case, use [Via Email](https://docs.thewalletcrew.io/enroll/via-email) to generate and send secure “Add to Wallet” links.

Brevo contact update rules and CSV import constraints are documented by Brevo: <https://help.brevo.com/hc/en-us/articles/10227982847762-Update-the-information-of-your-contacts>

{% hint style="warning" %}
The `authToken` is a credential. It should be treated as sensitive data. It should not be published publicly or stored in uncontrolled systems.
{% endhint %}

{% hint style="info" %}
Needs confirmation: the base “pass landing page” URL can vary by environment and project setup. The correct base URL should be taken from The Wallet Crew project configuration.
{% endhint %}

## Setup

{% stepper %}
{% step %}

#### 1) Export contacts from Brevo

Export a CSV from the Brevo contact list with the email field.

Open: <https://app.brevo.com/contact/list>

In the Brevo UI, select **Contacts → More actions → Export**.

<div data-with-frame="true"><figure><img src="https://3566051324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWLc8AHXW4tdrAXUBfrYF%2Fuploads%2Fybq5E8q5Jsq6u69SdmCd%2Fimage.png?alt=media&#x26;token=a7feeb20-130e-49ac-9803-b55ecd265443" alt="Brevo contact list export menu: Contacts → More actions → Export"><figcaption><p>Start a contact export from the Brevo contact list.</p></figcaption></figure></div>

Use the following options:

* Attributes to export: `EMAIL`
* CSV field separator: `,` (comma)

<div data-with-frame="true"><figure><img src="https://3566051324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWLc8AHXW4tdrAXUBfrYF%2Fuploads%2FHSXjaL7zHtcmgte8wTTe%2Fimage.png?alt=media&#x26;token=e52083f4-256b-4e89-b82a-c18a0c413e7f" alt="Brevo export contacts options showing EMAIL attribute and comma separator"><figcaption><p>Export only what is needed. Keep the file minimal.</p></figcaption></figure></div>

The file becomes available in the Brevo notification center.
{% endstep %}

{% step %}

#### 2) Create a `WALLET_LINK` attribute in Brevo

Create a text attribute to store the Wallet link per contact.

In Brevo, go to the attributes screen and select **Add a new attribute**.

<div data-with-frame="true"><figure><img src="https://3566051324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWLc8AHXW4tdrAXUBfrYF%2Fuploads%2FvEsSvWjpnD3jfnMhuHG3%2Fimage.png?alt=media&#x26;token=8d7aa129-bde2-4165-ae9a-9b15b81ea254" alt="Brevo attributes screen with the &#x27;add a new attribute&#x27; action"><figcaption><p>Create a new custom attribute for Wallet links.</p></figcaption></figure></div>

Create the attribute with:

* Attribute Name: `WALLET_LINK`
* Attribute Type: `Text`

<div data-with-frame="true"><figure><img src="https://3566051324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWLc8AHXW4tdrAXUBfrYF%2Fuploads%2FV6v3u4nCysDRlZ8XeTu4%2Fimage.png?alt=media&#x26;token=ae514aad-dc7a-4af5-9e4f-649a8ee4c7a2" alt="Brevo new attribute form filled with WALLET_LINK and type Text"><figcaption><p>`WALLET_LINK` stores the per-contact “Add to Wallet” URL.</p></figcaption></figure></div>
{% endstep %}

{% step %}

#### 3) Generate `authToken` values in The Wallet Crew

In The Wallet Crew admin console, open **Token Generator**. Generate an `authToken` based on email.

<div data-with-frame="true"><figure><img src="https://3566051324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWLc8AHXW4tdrAXUBfrYF%2Fuploads%2F1730gVob8JWeemJSdF32%2Fimage.png?alt=media&#x26;token=4b08fac7-a0c4-428e-ab10-370bbd3b16b8" alt="The Wallet Crew Token Generator with a list of emails pasted for token generation"><figcaption><p>Generate one token per email.</p></figcaption></figure></div>

This step typically outputs a list of `{EMAIL, authToken}` values. Store them in a working sheet for the next step.
{% endstep %}

{% step %}

#### 4) Build the Wallet links (`WALLET_LINK`)

For each contact, concatenate:

* the project “pass landing page” base URL
* the query parameter `neo.authToken`

Example output:

* `https://<host>/<tenant>/pass?neo.authToken=<authToken>`

In Excel or Google Sheets, a typical formula looks like:

* `=BASE_URL & "?neo.authToken=" & AUTH_TOKEN_CELL`

The resulting CSV should contain at least:

* `EMAIL`
* `WALLET_LINK`
  {% endstep %}

{% step %}

#### 5) Import `WALLET_LINK` values into Brevo

Import the updated CSV so Brevo writes `WALLET_LINK` on each contact.

<div data-with-frame="true"><figure><img src="https://3566051324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWLc8AHXW4tdrAXUBfrYF%2Fuploads%2Fa7L0hl6duHAf46Mbd6hs%2Fimage.png?alt=media&#x26;token=1e6d1c2a-0e45-45b1-a46e-c4750f78f010" alt="Brevo import contacts entry point screen"><figcaption><p>Start a contact import to update attributes.</p></figcaption></figure></div>

Upload the CSV file:

<div data-with-frame="true"><figure><img src="https://3566051324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWLc8AHXW4tdrAXUBfrYF%2Fuploads%2F1RCwLyOENZjA4THuMPR1%2Fimage.png?alt=media&#x26;token=556aacc6-a655-4b56-8118-4b80a1057eee" alt="Brevo import flow step to upload a CSV file"><figcaption><p>Select the enriched file that contains `WALLET_LINK`.</p></figcaption></figure></div>

Map fields and confirm the import:

<div data-with-frame="true"><figure><img src="https://3566051324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWLc8AHXW4tdrAXUBfrYF%2Fuploads%2FEOoRFwetr8uPdtC4oLop%2Fimage.png?alt=media&#x26;token=a1f7ae8a-cdce-432c-8d3a-a0b97235bb09" alt="Brevo import field mapping screen for WALLET_LINK"><figcaption><p>Map `WALLET_LINK` to the custom attribute.</p></figcaption></figure></div>

Once completed, validate the import report:

<div data-with-frame="true"><figure><img src="https://3566051324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWLc8AHXW4tdrAXUBfrYF%2Fuploads%2Fg0AoA7TbfHtOetD9BS2Y%2Fimage.png?alt=media&#x26;token=2decf32d-4a88-4bfd-83ee-3ae3d5072fbc" alt="Brevo import completed confirmation"><figcaption><p>Brevo confirms the import job status.</p></figcaption></figure></div>

<div data-with-frame="true"><figure><img src="https://3566051324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWLc8AHXW4tdrAXUBfrYF%2Fuploads%2FUsNEZy32nWBCoR4Wctre%2Fimage.png?alt=media&#x26;token=870c928d-6881-4262-ae1d-23547651d4b8" alt="Brevo import report screen showing the summary and potential errors"><figcaption><p>Use the report to catch missing emails or rejected rows.</p></figcaption></figure></div>
{% endstep %}

{% step %}

#### 6) Add an “Add to Wallet” button in the Brevo email template

Add a link or button in the email template that points to the `WALLET_LINK` attribute.

<div data-with-frame="true"><figure><img src="https://3566051324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWLc8AHXW4tdrAXUBfrYF%2Fuploads%2FrZGgTIKkzBkAk4ijmvG9%2Fimage.png?alt=media&#x26;token=99cbb46f-d4f8-46fa-b8e9-26caec227fae" alt="Brevo email template editor where a button link uses the WALLET_LINK attribute"><figcaption><p>Use the contact attribute as the button URL.</p></figcaption></figure></div>

Add a display condition so the block only shows when `WALLET_LINK` is present.

<div data-with-frame="true"><figure><img src="https://3566051324-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWLc8AHXW4tdrAXUBfrYF%2Fuploads%2FhWmEG2gAYF5RYF3H3OBZ%2Fimage.png?alt=media&#x26;token=8ca59db4-9944-418f-850a-0ddff86f5710" alt="Brevo email template conditional display settings using WALLET_LINK availability"><figcaption><p>Hide the Wallet block when the contact has no Wallet link.</p></figcaption></figure></div>
{% endstep %}
{% endstepper %}

## FAQ

<details>

<summary><strong>What happens if a contact email does not exist in the connected CRM?</strong></summary>

The Wallet Crew may be unable to resolve an existing customer record for pass creation or updates. In that case, prefer [Via Email](https://docs.thewalletcrew.io/enroll/via-email), which distributes project-generated secure links through The Wallet Crew email flow.

</details>

<details>

<summary><strong>How to validate that `WALLET_LINK` works before sending a campaign?</strong></summary>

Run a test import with a small segment. Open a few links from the Brevo contact preview and confirm that the expected pass is displayed and addable to Apple Wallet or Google Wallet.

</details>

<details>

<summary><strong>Should `authToken` be stored long-term in Brevo?</strong></summary>

This depends on the security policy and token lifetime defined for the project. If tokens expire or must be rotated, regenerate and re-import `WALLET_LINK` values before each campaign.

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.thewalletcrew.io/connect/marketing-automation/brevo.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
