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

# Cashback by unit

> Set up the network's units, each store's WhatsApp, and each one's cashback automation.

## How does it work?

Each store in the network becomes a **unit** in the brand's account. The unit
has its own WhatsApp number, its own team, and its own cashback automation.

When a unit records a sale, Bevits creates the cashback and sends the message
to the customer **through the WhatsApp of the unit where they bought**. The
head office tracks the sales of all units in one place. Each unit's team sees
only the customers and sales of its own unit.

A unit can record a sale in two ways:

* **From the Bevits sales screen:** go to **Sales** → **New sale**, on a
  computer or a phone.
* **From the unit's WhatsApp:** the team sends the sale details to the Bevits
  sales agent, without opening the dashboard.

```mermaid theme={null}
flowchart LR
    A[Counter sale] --> B{How does the unit record it?}
    B -->|New sale in the dashboard| C[Bevits records the sale]
    B -->|Message to the agent| C
    C --> D[Unit cashback automation]
    D --> E[Customer gets the coupon on the unit's WhatsApp]
```

## Before you start

Have these ready:

* **Owner** or **administrator** access to the brand's account (head office),
  with permission for integrations and store settings.
* The list of units, with name, address, and the person in charge of each.
* One phone per unit, with the **WhatsApp Business App** active on the unit's
  number.
* Access to the Meta account that manages the brand's **business portfolio**.
* The cashback rules: percentage, safety cap, expiry, and minimum next-purchase
  amount. See how each rule works in [Giftback](https://docs.bevits.com/en/features/giftback.md).

> [!TIP]
>
> With more than two units, verify the business in Meta Business Suite before
> you connect the third number. A verified portfolio accepts up to 20 numbers.
> Details in
> [WhatsApp coexistence](https://docs.bevits.com/en/send-methods/official-whatsapp-coexistence.md#connect-more-numbers).

## Setup overview

The head office repeats the steps below for each unit.

| Step | What to do | Where |
| - | - | - |
| 1 | Connect the unit's WhatsApp | Settings → WhatsApp → Official API |
| 2 | Create the unit | Settings → Store → Units |
| 3 | Create the unit's cashback automation | Automations |
| 4 | Enable sales through WhatsApp (optional) | Settings → Store → Units |
| 5 | Give the unit's team access | Settings → Team |

## Step by step

**1. Connect the unit's WhatsApp**

Connect the unit's number in coexistence, following the
[WhatsApp coexistence](https://docs.bevits.com/en/send-methods/official-whatsapp-coexistence.md) guide.
The number keeps working in the WhatsApp Business App on the unit's phone,
and it also starts sending messages through the official API.

Connect all numbers to the **same business portfolio** of the brand.

**2. Create the unit**

Click your email in the bottom-left corner and go to **Settings** →
**Store** → **Units** tab → **New unit**.

Fill in:

* **Unit name:** use the name your team recognizes, for example
  `Downtown Store`.
* **Address (optional):** street, number, neighborhood, city, and state.
* **Team members (optional):** the people at the unit who already have
  Bevits access. Anyone without access yet joins through the invitation in
  step 5, with the unit already selected.
* **Official WhatsApp numbers:** select the number connected in step 1.

Click **Save unit**.

![New unit window with name, address, team members and official WhatsApp numbers](https://bucket.bevits.com/docs/cashback-por-unidade/nova-unidade.png)

The unit shows up in the list with its number of members and linked
numbers.

![Units tab with the new unit](https://bucket.bevits.com/docs/cashback-por-unidade/unidades.png)

**3. Create the unit's cashback automation**

Go to **Automations** and create an automation for the unit. Give it a name
that identifies the unit, for example `Cashback · Downtown Store`.

Build the automation with these blocks:

1. **Trigger:** the **Physical store** origin and the **Manual sale** event.
2. **Coupon:** set the cashback percentage, the safety cap, and the expiry.
3. **WhatsApp:** click **Add the template** and write the cashback message.
   Under **Official WhatsApp account**, choose the **unit's number**. This
   is the number the customer receives the message from.
4. **Timer**, **Conditional** and a second **WhatsApp** (optional): a
   reminder a few days before the coupon expires. In the **Conditional**,
   check that the coupon hasn't been used yet, so only customers who haven't
   come back get the reminder.

![Automation trigger with the Physical store origin and the Manual sale event](https://bucket.bevits.com/docs/cashback-por-unidade/gatilho-loja-fisica.png)

Use the sale and coupon variables in the template:

| Variable | Example |
| - | - |
| Customer name | Maria |
| Coupon code | `MARIA20` |
| Cashback amount | R\$ 20.00 |
| Coupon expiry date | 30/12/2026 |
| Minimum next-purchase amount | R\$ 80.00 |
| Purchase amount | R\$ 200.00 |

Example text:

> Hi, \[customer name]! Thanks for shopping at Downtown Store. You earned
> \[cashback amount] in cashback to use until \[expiry date]. Just show coupon
> \[coupon code] on your next purchase.

Submit the template for Meta approval. When it shows as **Approved**, turn on
the automation. It will then appear in the **Cashback automation** field on
the sales screen.

> [!TIP]
>
> Repeat this step for each unit, always choosing the unit's own number in
> the templates. Bevits shows each unit only the automations with templates
> from its number, and one unit's cashback never goes out from another
> unit's number.

> [!NOTE]
>
> Each sale generates a coupon. Use a single **Coupon** block per automation.

**4. Enable sales through WhatsApp (optional)**

Do this step if the unit will record sales by messaging the Bevits sales
agent. If it only uses the sales screen, skip to the next step.

Under **Settings** → **Store** → **Units** tab, scroll to **Sales through
WhatsApp**. Under **Authorized stores**, for each unit:

1. Check the **Number that sends the sales**. If the unit has a single
   number, it is already selected.
2. Under **This store's cashback automation**, choose the automation
   created in the previous step. If the unit has only one, it is already
   selected.
3. Click **Authorize**. The unit now shows as **Authorized**.

![Sales through WhatsApp with the unit's number and automation](https://bucket.bevits.com/docs/cashback-por-unidade/vendas-whatsapp.png)

The agent recognizes the unit by the number that sent the message, runs
that unit's automation, and the customer gets the cashback through the
unit's WhatsApp. To pause WhatsApp sales for a unit, click **Remove
authorization**.

Save the Bevits sales agent number in the phone contacts of each unit:
**+55 11 95213-1664**.

**5. Give the unit's team access**

Under **Settings** → **Team**, click **Add** and fill in:

1. The person's **Email** and **Role**.
2. Under **Access scope**, choose **Assigned units only**.
3. Select the person's units and click **Invite**.

Once they accept the invitation, the person can access only **Sales** and
**Customers**, and sees only the records from the selected units. The head
office team keeps **Entire organization** and tracks the whole network.

To change the scope of someone who already joined, open the person's menu
under **Settings** → **Team** and click **Custom permissions**.

![Custom permissions with the Access scope field](https://bucket.bevits.com/docs/cashback-por-unidade/permissoes-escopo.png)

> [!NOTE]
>
> A person can belong to more than one unit. This is useful for someone who
> runs several stores or for a regional supervisor.

## Unit routine

### Record a sale from the sales screen

1. Under **Sales**, click **New sale**.
2. Type the **phone number with area code**. If the customer is already
   registered at your unit, Bevits fills in the name.
3. Enter the **purchase amount**.
4. Under **Sales unit**, check the unit. For someone with access to a single
   unit, it is already selected.
5. If the customer used a cashback coupon, enter the code under **Coupon used**.
6. Check **Trigger cashback automation**. The screen only shows the
   automations of the selected unit; if there is one, it is already chosen.
   Click **Save**.

![New sale window with phone, name, amount, coupon, unit and cashback automation](https://bucket.bevits.com/docs/cashback-por-unidade/nova-venda.png)

The customer gets the cashback right away, always through the WhatsApp of the
unit selected in **Sales unit**.

### Record a sale through WhatsApp

In the unit's WhatsApp Business App, send a message to the Bevits sales agent.
Start with **nova venda** (new sale) and send, **in a single message**, the
customer's name, phone number with area code, and purchase amount:

```text theme={null}
Nova venda, Maria Souza, (47) 99999-1234, R$ 200,00
```

If the customer used a cashback coupon on this purchase, add the code to the
same message (**cupom** means coupon). Bevits marks the coupon as used:

```text theme={null}
Nova venda, Maria Souza, (47) 99999-1234, R$ 200,00, cupom MARIA20
```

If any detail is missing, the agent asks for it. When the sale is complete, the
agent confirms it, the sale shows up under **Sales**, and the customer receives
the cashback through the unit's WhatsApp.

> [!NOTE]
>
> If the unit sends a sale with the same phone number and amount as another
> sale from the last 24 hours, the agent asks for confirmation before it runs the
> automation. Reply **confirmo a venda** (confirm the sale) to record a new
> purchase, or **é outra compra** (it's another purchase) if it is a different
> record.

### Where the cashback coupon is valid

A unit's cashback coupon can only be used **at the unit where it was
issued**, until its expiry date and on purchases from the minimum amount. When
it gets the code, on **New sale** or through the agent, Bevits checks these
rules before recording the sale:

| Bevits refuses when | What to tell the customer |
| - | - |
| The coupon was issued at another unit | The coupon is valid only at the store where they earned the cashback. |
| The coupon is from the online store's cashback | The coupon is valid only on the online store. |
| The coupon expired | The coupon is past its expiry date. |
| The purchase is below the minimum amount | The coupon is valid on purchases from the minimum amount shown in the message. |

A refused sale is not recorded. Record it again without the coupon or with
another code.

### Customer who buys at another unit in the network

The customer record belongs to the brand. If the customer buys at another
unit, Bevits recognizes the phone number and adds the new unit to the record,
without duplicating the customer.

Each unit only sees what happened there: the customer's purchases, coupons,
and totals at that unit. The full history across the network is visible only
to the head office.

## Track the sends

The head office tracks everything in two places:

* **Sales:** all sales across the network, with the unit for each one.
* **Settings** → **Store** → **Units** → **Latest cashback triggers:** the
  latest cashback sends and the status of each one.

| Status | What it means |
| - | - |
| Waiting to start | The sale was recorded and the cashback is queued. |
| Automation started | The automation is sending the message. |
| Execution completed | The cashback was created and sent. |
| Needs review | Check the automation and the unit's number, then click **Try again**. |

## Checklist for each new unit

* [ ] Unit's number connected in coexistence on the brand's portfolio.
* [ ] Unit created with name, address, and WhatsApp number.
* [ ] `Cashback · unit name` automation active, with the template approved on
  the unit's number.
* [ ] If the unit records sales through WhatsApp: unit **Authorized** under
  **Sales through WhatsApp** and agent number saved on the unit's phone.
* [ ] Manager and salespeople invited with the **Assigned units only** scope
  and the unit selected.
* [ ] Test sale recorded and cashback received on WhatsApp.

## Common issues

| Symptom | What to do |
| - | - |
| The unit's number doesn't appear when you create the unit | Connect the number under **Settings** → **WhatsApp** → **Official API**, then open the unit again. |
| The automation doesn't appear in **New sale** | Check that the automation is active, uses the **Manual sale** event, and has approved templates from the number of the unit selected in **Sales unit**. |
| The automation shows as disabled in the agent settings | Read the message below the field. It points to the block or template that needs a fix. |
| The agent doesn't reply to the unit's message | Check that the unit shows as **Authorized** and that the message was sent from the unit's number. |
| The sale isn't registered and Bevits says the unit has no WhatsApp number | Link the unit's number under **Settings** → **Store** → **Units**. If the unit has more than one number, choose the **Number that sends the sales** under **Sales through WhatsApp**. |
| The agent says the coupon wasn't found or was already used | Check the code with the customer and send the sale again. Each coupon is valid for one purchase only. |
| Bevits refuses the coupon because it is from another unit, from the online store, expired, or below the minimum | See [Where the cashback coupon is valid](#where-the-cashback-coupon-is-valid). Record the sale without the coupon or with another code. |
| The unit's team sees customers from other units | Check under **Custom permissions** that the scope is set to **Assigned units only**. |
| The person doesn't see any customers | Add the person under **Team members** of the unit. |
| A number's connection dropped | Open WhatsApp Business on the unit's phone. The app needs to be used at least once every 13 days. |

For questions about the network setup, email us at **[hey@bevits.com](mailto:hey@bevits.com)** or use
the support chat in the platform.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.