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

# Resellers

> How resellers work from the operator's side: turning an account into one, giving it money and a price list, and how its customers send with units charged to it.

A **reseller** is one of your customers that sells OMNI on to customers of its own. Its
customers are ordinary OMNI accounts that sit **under** the reseller. With a
[domain of its own](https://cpaas.fireflo.au/operators/domains-and-email.md#domains), it can present the panel under
its own brand.

This page is the operator's view. For what a reseller sees, see
[Resellers](https://cpaas.fireflo.au/using/resellers.md); for how units work, see [Units](https://cpaas.fireflo.au/using/units.md).

## How a reseller is billed

* **You give the reseller money and a price list.** Its wallet and pockets, topped up
  from its page like any customer's, and the [price list](https://cpaas.fireflo.au/operators/pricing.md) it pays.
  Those are the only prices in its world.
* **The reseller gives its customers units.** One unit is one message of one channel and
  product type. Staff never give units.
* **Each message is charged to the reseller.** A customer's message uses one of its units
  and is charged to the reseller's money at the reseller's price for that country.
* **Resellers set no prices and no markup.** Its customers have no prices, no pockets
  and no money at all: below a reseller only units move.
* **The reseller pays its customers' plans and add-ons.** They are charged to the
  top-level reseller's wallet, on lines that name the customer. A reseller below a
  reseller holds no money either, so everything it sets up is unit-based and it can pass
  on only the units it holds.

## Make an account a reseller

**1. Open the account**

Find it under [Platform → Customers](https://cpaas.fireflo.au/operators/customers.md) and open its page.

**2. Turn reselling on**

On **Overview**, select **Edit**, tick **They resell to their own customers** and
select **Save**.

**3. Give it money and prices**

Top up its wallet, or the pocket of each channel it resells, from **Billing**. Choose
the list it pays on its **Reseller** tab. For SMS on your gateway, use the gateway's
currency.

The account now shows a **Reseller** badge. Its people with the **Owner** or
**Reseller** role get a **Customers** page in their menu.

You can't turn reselling off while the account still has customers of its own.

### Sub-resellers

A reseller can make one of its own customers a **sub-reseller**, with customers of its
own. A tree can go up to ten levels below you. A sub-reseller holds the units it received
and passes on only those. Every message anywhere in the tree is charged to the top
reseller, the one you gave money to.

## The Reseller tab

A top-level reseller's page has a **Reseller** tab:

* **Price list the reseller pays**. A change waits to apply on the SMS gateway like any
  other price change.
* **Pockets that pay for its customers**, with its wallet. Money held at the SMS gateway
  is marked so.
* **On the SMS gateway**: its customers' SMS logins sit under its own gateway account, so
  the gateway charges the reseller's balance at the reseller's price.
* **Its customers · units and what they cost the reseller**: every account in its tree,
  with units left and used, what their messages have cost the reseller, their SMS logins,
  and a status such as **No units given**, **SMS units low**, **No units** or **No units ·
  login off**. **Export** downloads the table.

A warning shows when the reseller's money has run out on a channel, which pauses sends for
its whole tree, or when its money no longer covers the units outstanding below it at its
current prices. Units are read-only here.

## When something runs out

* **A customer has no units** of a kind: its sends of that kind are refused with
  `no_units`, and a broadcast pauses until units arrive, on SMS, WhatsApp and RCS alike.
* **A kind has no price** for the reseller: it needs no units and is free below the
  reseller.
* **The reseller's money runs out** on a channel: sends on that channel pause for every
  account below it, whatever units they hold, and carry on when money arrives.
* **A price changes**: units never change. Only what each later message costs the
  reseller does.
* **The reseller's own WhatsApp number** is billed to the reseller by Meta. OMNI takes
  no money for it, so an empty wallet never pauses those sends.

**Moving a customer to another reseller** (staff) returns its unused units to the
reseller that gave them, and drops the old reseller's shared WhatsApp number and the RCS
bots it passed on.

## SMS below a reseller

What happens depends on the gateway's version.

**Gateway 0.16.0 or newer (OMNI 1.6.0).** Every account below a reseller gets a **units
account** on the gateway for each SMS type it holds, under the top-level reseller's gateway
account. A units account holds units and no money. The gateway counts one unit per message
part, for sends from OMNI, the API and the account's own SMPP logins alike, and charges
each part to the reseller at the reseller's price. Giving, taking back and passing on units
in OMNI moves them at the gateway; the figures OMNI shows are the gateway's. With no units
left a send is refused and nothing is charged; over SMPP the login is answered status
`0x403`. A sub-reseller's customers also sit directly under the top-level reseller's
gateway account: the gateway has two levels, whatever the depth of the tree in OMNI.

The upgrade to OMNI 1.6.0 creates the units accounts, gives them the SMS units each account
holds in OMNI, and makes a **new SMPP login for each existing one**. Pass the new logins
on. The old logins keep working but are not counted against the account's units; when
every customer has moved, switch them off with
`fireflo-omni manage sms_units_accounts --switch-off-old`.

**An older gateway.** Accounts below a reseller send under the reseller's own gateway
account and have **no account of their own on the gateway**; OMNI counts the messages
against each sender's units. When such an account sends over its own SMPP login, OMNI
switches that login off once the units of the kind it sends run out. The gateway has no
way to switch a login back on, so when new units arrive OMNI makes a new login, with a new
system ID. Reset its password under the customer's **Modules** tab and pass it on.

## See a reseller's customers

* On the reseller's page, the **Customers** tab lists the accounts under it.
* On Platform → Customers, the **Under** column names each account's reseller, and
  **Any reseller** narrows the list to one reseller's customers.
* The **Resellers** chip lists every reseller.

A reseller's customer is a full account on its own page. Its **Billing** tab shows its
units and its plan; it has no prices and holds no money. You can change its product or
suspend it like any other; what it costs is charged to its top-level reseller.

## What a reseller does for its customers

From its **Customers** page, a reseller can:

* **Set up a customer**, with its product and trial. The owner is invited by email.
* **Put a customer on a product.** Resellers can choose any of your active products,
  including hidden ones, at your price. When a reseller moves a customer to a dearer
  product, time already paid for is worth less of it, so the paid-until date moves in to
  match.
* **Give units** and **take back** unused ones.
* **Pay for the customer's plan and add-ons.** These are charged to the reseller's
  wallet, on lines that name the customer; the reseller adds or stops an add-on. If its
  wallet can't cover a charge, that customer is paused until it can, and a top-up tries
  again at once.
* **Narrow where it sends**, choosing allowed countries from the reseller's own.
* **Decide how they send** on each channel (see below), and **pass on RCS bots** you gave
  the reseller to its customers.
* **Suspend** a customer, and let them back in.

The customer runs its own team. The reseller can see who can sign in, but can't change
them.

### How they send

On each customer's page, **How they send** has a row for SMS, WhatsApp and RCS, with
**May connect their own** beside each:

* **SMS**: when it sets a customer up, and later, a reseller decides whether the customer
  may connect its own SMS gateway. Where the reseller's SMS runs on your connection, the
  choice isn't offered: the customer gets a login under the reseller's gateway account.
* **WhatsApp**: off, the customer sends from the number the reseller gives it. Hosted
  WhatsApp numbers are outside this switch.
* **RCS**: off, the customer sends through the bots the reseller passes on.

The switch is checked on every way of connecting. Switching it off while a customer is on
its own connection moves it back. Every customer may connect its own WhatsApp or RCS until
its reseller switches that off.

### RCS bots passed on

A reseller can pass on RCS bots you gave it to its own customers, and a sub-reseller can
pass them further. Taking a bot back from a reseller takes it back from its customers.
A bot set to **Every customer may use it** has nothing to pass on. See
[Channel connections](https://cpaas.fireflo.au/operators/channel-connections.md#rcs-providers-bots-and-routes).

### Suspension

A reseller can suspend one of its customers. Nobody there can sign in until the reseller
lets them back in, and anything still running stops. A suspended account, and every
account below a suspended reseller, sends nothing on any channel: single sends are
refused and broadcasts wait. Their data, settings and credit are
kept. This is the reseller's own switch. It is separate from **Suspend** on the
customer's page under Platform → Customers, which only staff use.


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