# Welcome back: today's offer for returning visitors

> In BIP, create an API Trigger campaign in Immediate mode, with Allow Lead Re-entry on and a 7-day Cooldown Period. In Easy Auth, create an On Connect webhook, limited to From the second connection, that calls /api/campaigns/trigger. Returning visitors get the offer, at most once every 7 days.

Fonte: https://wiki.bip.marketing/en-us/wifi-welcome-back · Atualizado: 2026-10-08

<UseCaseMeta effort="nocode" channel="whatsapp" plan="lite" />

When a customer comes back to your store, they get an offer on WhatsApp, while they're still inside, that's only valid today for returning visitors. No repeating the same message on every visit.

<Checklist items="Easy Auth connected to BIP (see the guide Connect Easy Auth to BIP)|An EasySpot that asks for the visitor's phone number|A paid BIP plan, with WhatsApp connected and an approved Marketing template|An API key with Campaigns Trigger and Leads Write (the welcome key works)|Access to Webhooks in the Easy Auth Dashboard" />

## What you'll get

- A WhatsApp offer for people who come back to your Wi-Fi, the moment they connect.
- Only for returning customers: first-time visitors don't get this message.
- At most one offer every 7 days per person, no matter how often they come back.
- The contact updated on every return, with name, phone and the `wifi` tag.
- Visit frequency in plain sight: returns held back by the 7-day window show up in the stats.

## How it works

<Steps items="Create the offer campaign in BIP, with 7-day re-entry|Create an On Connect webhook in Easy Auth, from the second connection|Returning visitors get today's offer on WhatsApp" />

Two rules, one on each end, decide who gets it:

- in Easy Auth, **Limit Calls per User** set to **From the second connection**: the webhook calls BIP when the visitor comes back, not on the first visit;
- in BIP, **Allow Lead Re-entry** on, with a **Cooldown Period (Days)** of `7`: the same person gets the offer again only once 7 days have passed since the last send.

Here's what happens with Tiago Pereira, a Loja Horizonte customer:

| Tiago's visit                      | Easy Auth                               | BIP                                                                  |
| ---------------------------------- | --------------------------------------- | -------------------------------------------------------------------- |
| 1st, Monday                        | Doesn't call: it's the first connection | —                                                                    |
| 2nd, Wednesday                     | Calls the campaign                      | Sends the offer                                                      |
| 3rd, Friday                        | Calls the campaign                      | Holds it back: 7 days haven't passed yet. Shows up as **Rejected**   |
| 4th, Thursday of the following week | Calls the campaign                     | Sends again: 8 days have passed since the last send                  |

A call that re-entry holds back sends no message and uses no send.

## Step by step

### 1. Get the API key for Easy Auth

If you've already set up the [Wi-Fi welcome](/en-us/wifi-welcome), use the same key, _Easy Auth — campaigns_. If not:

1. In BIP, go to **Settings**, open the **API Keys** tab and click **Add New API Key**.
2. In **Name**, type _Easy Auth — campaigns_. Leave **Active** on and, under **Automatic Expiration**, leave **Enabled** off.
3. Under **Scopes**, turn on **Campaigns Trigger** and **Leads Write**.
4. Click **Save** and copy the **API key**.

The integration key, **EasyAuth API Key**, won't work here: it only has **Leads Write**.

<Shot src="/img/wifi-bem-vindo-de-volta/1-en-us.png" alt="API key list with the active Easy Auth — campaigns key and the Campaigns Trigger and Leads Write scopes" url="dash.bip.marketing/easyauth-…/settings?tab=api-keys" />

### 2. Create the offer template

1. In **WhatsApp**, open the **Templates** tab and click **Create template**.
2. In **Name (lowercase)**, type `horizonte_welcome_back_offer`. In **Category**, choose **Marketing**. In **Language**, choose **English (US)**.
3. Fill in the header, body, footer and button with the copy from [Ready to copy](#ready-to-copy), with `Tiago` as the sample for the variable.
4. Click **Save Template** and wait for the **Approved** status.

<Shot src="/img/wifi-bem-vindo-de-volta/2-en-us.png" alt="horizonte_welcome_back_offer template with the preview of the welcome-back offer" url="dash.bip.marketing/easyauth-…/whatsapp/templates/create" />

### 3. Create the campaign with 7-day re-entry

1. In **Campaigns**, click **New Campaign**. In **Campaign Name**, type _Wi-Fi welcome-back offer_.
2. Under **Schedule Type**, choose **API Trigger** and, under **Trigger Mode**, **Immediate**.
3. Under **Lead Re-entry Window**, turn on **Allow Lead Re-entry** and set **Cooldown Period (Days)** to `7`. Without this, each customer would get the offer only once, ever.
4. Under **Channel**, choose **WhatsApp**. Select the `horizonte_welcome_back_offer` **Template** and the **Phone Number**.
5. Under **Variable mappings**, click **Add variable mapping** and link **Body · {{1}}** to **first name**.
6. Open **API Integration** and copy the campaign ID.

<Shot src="/img/wifi-bem-vindo-de-volta/3-en-us.png" alt="Wi-Fi welcome-back offer campaign with API Trigger and Allow Lead Re-entry on with 7 days" url="dash.bip.marketing/easyauth-…/campaigns/…" />

### 4. Test and activate the campaign

1. Click **Save** → **Save Draft**.
2. Click **Test Campaign**, enter your phone number with `+` and the country code and click **Send Test**. Tests don't use up sends.
3. Check the message on your phone.
4. Click **Save** → **Save and Activate** and confirm in **Activate API Trigger**.

<Shot src="/img/wifi-bem-vindo-de-volta/4-en-us.png" alt="Test message for the welcome-back offer with the first name filled in" url="dash.bip.marketing/easyauth-…/campaigns/…" />

### 5. Create the webhook from the second connection

1. In the Easy Auth Dashboard, at app.easyauth.net, click **Webhooks**. On the webhook with the URL `https://api.bip.marketing/api/leads`, click **Edit Webhook**, copy the lines from the **Body** and click **Hide Edit Webhook**, without changing anything.
2. Click **Add Webhook** → **Custom**.
3. In **Name**, type _Welcome-back offer → BIP_. In **Topic**, choose **On Connect**. In **Language**, choose **English**.
4. In **Limit Calls per User**, choose **From the second connection**.
5. In **Method**, leave **POST**. In **URL**, paste `https://api.bip.marketing/api/campaigns/trigger`.
6. If **Trigger Tags** shows up, leave all tags off.
7. Under **Headers**, click **Add Header** twice: **Key** `Content-Type` with **Value** `application/json`, and **Key** `x-bip-api-key` with the key from step 1.
8. In **Body**, delete the default text and paste the body from [Ready to copy](#ready-to-copy). Replace `CAMPAIGN_ID` with the ID from step 3 and, inside `lead`, use the lines you copied.

<Shot src="/img/wifi-bem-vindo-de-volta/5-en-us.png" alt="Welcome-back offer → BIP webhook with the On Connect topic and From the second connection" url="app.easyauth.net" />

### 6. Test the webhook and save

1. Click **Test Webhook**.
2. In **Load sample data**, enter the phone number you already used to sign in to the Wi-Fi and click **Load**.
3. Click **Send Test**. Under **Response**, status `200` and a **Response Body** with `"mode": "immediate"` confirm the send.
4. Click **Close**. Make sure the webhook **Status** is on and click **Save** at the top of the page.

The **Send Test** is a real send: the offer reaches your phone and counts as one send. For the next 7 days, re-entry holds back new offers to your contact.

<Shot src="/img/wifi-bem-vindo-de-volta/6-en-us.png" alt="Webhook test with the body loaded with real data and the 200 response from BIP" url="app.easyauth.net" />

## Ready to copy

### Webhook body

Loja Horizonte example: the EasySpot asks for name and phone, which is the license key. Replace `CAMPAIGN_ID` with the offer campaign's ID.

<Copy label="Webhook body (Easy Auth)" code>
{
  "campaignId": "CAMPAIGN_ID",
  "lead": {
    "name": "{{ field('field-name.value') }}",
    "phone": "+{{ key('raw-full') }}",
    "tags": ["wifi"]
  }
}
</Copy>

Inside `lead`, use the lines from your integration body: they carry the right variables for your EasySpot. The phone number has to be there, because that's where the WhatsApp message goes.

### Webhook in Easy Auth

| Field                    | Value                                                                              |
| ------------------------ | ---------------------------------------------------------------------------------- |
| **Name**                 | Welcome-back offer → BIP                                                           |
| **Topic**                | **On Connect**                                                                     |
| **Language**             | **English**                                                                        |
| **Limit Calls per User** | **From the second connection**                                                     |
| **Method**               | **POST**                                                                           |
| **URL**                  | `https://api.bip.marketing/api/campaigns/trigger`                                  |
| **Trigger Tags**         | All off                                                                            |
| **Headers**              | `Content-Type`: `application/json` · `x-bip-api-key`: the key with both scopes     |

### Campaign in BIP

| Option                   | Value                                                                  |
| ------------------------ | ---------------------------------------------------------------------- |
| **Schedule Type**        | **API Trigger**                                                        |
| **Trigger Mode**         | **Immediate**                                                          |
| **Lead Re-entry Window** | **Allow Lead Re-entry** on, **Cooldown Period (Days)** `7`             |
| **Channel**              | **WhatsApp**, template `horizonte_welcome_back_offer`                  |
| **Variable mappings**    | **Body · {{1}}** → **first name**                                      |

### WhatsApp template

<WaTemplate name="horizonte_welcome_back_offer" category="MARKETING" header="Great to see you again" footer="Loja Horizonte · Offer valid today, in store" buttons="See what's new">
Hi, {{1}}! Great to have you back at Loja Horizonte. Today, returning customers get 10% off any item in the store. Just show this message at the register before the end of the day.
</WaTemplate>

**URL** button: `https://www.exemplo.com.br/novidades`

| Campaign variable | Lead field     | Sample value |
| ----------------- | -------------- | ------------ |
| **Body · {{1}}**  | **first name** | Tiago        |

## How to measure

- **In BIP**: open **Campaign Stats** for _Wi-Fi welcome-back offer_. Track **Sent**, **Delivered**, **Read Rate**, **Reply Rate** and **Errors**.
- **Who comes back within the week**: in **Recipient Interactions**, filter by **Rejected**. The reason **Lead is within the re-entry window** shows who came back to the Wi-Fi before 7 days had passed since the last send. These are your most frequent customers.
- **In Easy Auth**: in **Webhooks**, click **View Logs**. Each return shows up as a call to `https://api.bip.marketing/api/campaigns/trigger`, with **Status**, **Topic**, **URL** and **Hour**. In **View Request**, the **Response Body** has the `leadId` and the `mode`.
- **Returning visitors**: in **Statistics** → **General** tab, Easy Auth shows new and returning visitors for the period. Compare returning visitors with the campaign's sends.
- **At the register**: count how many people showed the message to use the discount.

If a log shows `403` with `API key does not have the required permissions`, turn on **Campaigns Trigger** and **Leads Write** on the key. With `400` and `Campaign is not active`, activate the campaign with **Save and Activate**.

## Variations

- **One offer a day, not a week**: use a **Cooldown Period (Days)** of `1`. The customer gets at most one offer every 24 hours.
- **Only from the third visit on**: in **Limit Calls per User**, choose **From the third connection** to reward people who've become regulars.
- **Change the offer without a new template**: in **Settings** → **General** → **Fields**, create a field called _Offer of the day_, of type **String**. Write the template with a second variable ("Today, returning customers get {{2}}.") and map **Body · {{2}}** to **"Offer of the day" field value**. In the webhook body, inside `lead`, add `"fields": [{ "key": "Offer of the day", "value": "10% off any item" }]`. To change the offer, edit just that value in the webhook and click **Save**. If the integration body already has a `fields` list, add the item to it.
- **Provider subscribers (Easy Auth PRO)**: change the topic to **On Connect ISP** to send the welcome-back offer only to subscribers, such as a plan upgrade. See [Lead and sales webhooks](https://wiki.easyauth.com.br/en/lead-and-sales-webhooks).

## Frequently asked questions

### Does the customer get the offer every time they come back?

No. They get it when they come back and, after that, only once 7 days have passed since the last send. The returns in between show up as **Rejected** in the stats, with no message and no send used.

### Do first-time visitors get the offer?

No. With **From the second connection**, Easy Auth doesn't call BIP on the first visit. To reach newcomers, use the [Wi-Fi welcome](/en-us/wifi-welcome).

### How do I change the offer?

An approved template's text can't be changed. Create a new template and, in the campaign, click **Pause Campaign to Edit**, switch the **Template**, redo the **Variable mappings** and activate it again with **Save and Activate**. While the campaign is paused, calls from Easy Auth return an error and nobody gets the offer. To change the offer every day, use the variation with the _Offer of the day_ field.

### Can I use it together with the welcome?

Yes. They're two campaigns and two webhooks in Easy Auth: **Once per user** calls the welcome and **From the second connection** calls the welcome-back offer. The same API key works for both.

## See also

- [Welcome Wi-Fi visitors on their first connection](/en-us/wifi-welcome)
- [We haven't seen you in 30 days: lapsed Wi-Fi visitors](/en-us/wifi-missing-30-days)
- [Connect Easy Auth to BIP and receive your Wi-Fi visitors](/en-us/wifi-connect-easy-auth)
- [Campaigns: one-time, recurring and API-triggered](/en-us/campaigns)
- [BIP API: keys, contacts, events and triggers](/en-us/api)
- [WhatsApp templates: create, sync and use](/en-us/whatsapp-templates)
- [Webhooks on the Easy Auth Wiki](https://wiki.easyauth.com.br/en/webhooks)
