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

# The Signal bot

> Order and get reports from supplier Signal groups.

The bot runs on Fly.io (`vendi-signal-bot`) and reads the catalogue from Vendi every 5 minutes. Only **active** products are visible to it.

## Setup

1. In the **admin group**, send `/newvendor <supplier name>`. The bot creates the group `Vendi X <supplier>`, links it to the supplier and replies with the invite link. Use `/vendors` to list groups and `/vendorlink <supplier>` to resend a link. `/removevendor <supplier>` unlinks (the bot stays in the group).
2. Send the link to the supplier.

## Day to day

* **Ordering:** in a supplier's group, a message that does not start with `/` is treated as a purchase order. Example: `2 cases Zyn Cool Mint, 1 box Backwoods Honey`. The bot extracts the items, matches them to the catalogue, creates the PO in Vendi and replies with the number and lines. Items it cannot match are listed back.
* **Reports** (in a supplier group the supplier sees only their own data; in the admin group add the supplier name):
  `/owed` (or `/balance`), `/unpaid`, `/paid [days]`, `/supplied [days]`, `/products [days]`, `/deliveries [days]`, `/lastdelivery`, `/invoices [paid|unpaid|all]`, `/invoice <ref>`, `/orders`, `/po <number>`, `/statement [days]`, `/summary`.
* **Admin only:** `/owedall`, `/help`.

If a supplier name is unclear the bot replies with the closest matches and does nothing.

## Known limits

* `/sell` and `/buy` are not implemented; see [Not built yet](/not-built-yet).
* Messages with no activity for 30 minutes make the bot restart its Signal connection; this is normal.
* The bot's number (`+13188939579`) is registered on the Fly machine. The database record for the bot account still says `captcha_required`; that is stale and can be ignored. If messages stop arriving, check with `fly ssh console -a vendi-signal-bot`.


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