1. Wiki
  2. Wi-Fi with Easy Auth

Welcome back: today's offer for returning visitors

Returning Wi-Fi visitors get today's offer on WhatsApp the moment they connect, at most once a week. Easy Auth and BIP, no code.

Quick answer

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.

EffortNo-codeChannelWhatsAppPlanLite (paid)

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.

What you need

  • 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

  1. 1Create the offer campaign in BIP, with 7-day re-entry
  2. 2Create an On Connect webhook in Easy Auth, from the second connection
  3. 3Returning 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 visitEasy AuthBIP
1st, MondayDoesn't call: it's the first connection—
2nd, WednesdayCalls the campaignSends the offer
3rd, FridayCalls the campaignHolds it back: 7 days haven't passed yet. Shows up as Rejected
4th, Thursday of the following weekCalls the campaignSends 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, 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.

dash.bip.marketing/easyauth-…/settings?tab=api-keys
API key list with the active Easy Auth — campaigns key and the Campaigns Trigger and Leads Write scopes

Screenshot coming soon

API key list with the active Easy Auth — campaigns key and the Campaigns Trigger and Leads Write scopes

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, with Tiago as the sample for the variable.
  4. Click Save Template and wait for the Approved status.
dash.bip.marketing/easyauth-…/whatsapp/templates/create
horizonte_welcome_back_offer template with the preview of the welcome-back offer

Screenshot coming soon

horizonte_welcome_back_offer template with the preview of the welcome-back offer

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.
dash.bip.marketing/easyauth-…/campaigns/…
Wi-Fi welcome-back offer campaign with API Trigger and Allow Lead Re-entry on with 7 days

Screenshot coming soon

Wi-Fi welcome-back offer campaign with API Trigger and Allow Lead Re-entry on with 7 days

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.
dash.bip.marketing/easyauth-…/campaigns/…
Test message for the welcome-back offer with the first name filled in

Screenshot coming soon

Test message for the welcome-back offer with the first name filled in

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. Replace CAMPAIGN_ID with the ID from step 3 and, inside lead, use the lines you copied.
app.easyauth.net
Welcome-back offer → BIP webhook with the On Connect topic and From the second connection

Screenshot coming soon

Welcome-back offer → BIP webhook with the On Connect topic and From the second connection

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.

app.easyauth.net
Webhook test with the body loaded with real data and the 200 response from BIP

Screenshot coming soon

Webhook test with the body loaded with real data and the 200 response from BIP

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.

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

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

FieldValue
NameWelcome-back offer → BIP
TopicOn Connect
LanguageEnglish
Limit Calls per UserFrom the second connection
MethodPOST
URLhttps://api.bip.marketing/api/campaigns/trigger
Trigger TagsAll off
HeadersContent-Type: application/json · x-bip-api-key: the key with both scopes

Campaign in BIP

OptionValue
Schedule TypeAPI Trigger
Trigger ModeImmediate
Lead Re-entry WindowAllow Lead Re-entry on, Cooldown Period (Days) 7
ChannelWhatsApp, template horizonte_welcome_back_offer
Variable mappingsBody · {{1}} → first name

WhatsApp template

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

Campaign variableLead fieldSample value
Body · {{1}}first nameTiago

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.

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.

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