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

# WhatsApp channel

> What the muveya WhatsApp channel does, how a member gets linked today, and the rules that keep it safe.

The WhatsApp channel lets a linked team member do a few everyday stock tasks from their phone, in a one-to-one chat with the muveya WhatsApp number. It is an operational channel, not a chatbot: it offers a fixed menu, asks for one piece of data at a time, shows a summary of exactly what will change, and changes stock only after you tap **Confirmar** (Confirm).

<Note>
  The WhatsApp channel is not part of the current pilot service (section 4 of the [Terms of Service](https://muveya.com/en/terms-and-conditions)). It is also not switched on in the production service today, for any dental clinic account: this page describes how it works. Ask [team@muveya.com](mailto:team@muveya.com) about availability before you plan work around it.
</Note>

## What it can do today

| Menu option (as sent today) | What it does | Changes stock |
| - | - | - |
| **Consultar stock** (Check stock) | Shows a box's supply, warehouse, available quantity, lot and expiry. | No |
| **Registrar consumo** (Log consumption) | Records units used from an existing box. | Yes, after confirmation |
| **Recibir stock** (Receive stock) | Receives a delivery into a new box. | Yes, after confirmation |
| **Ayuda** (Help) | Explains the menu. | No |

Every step, message and error is described in [WhatsApp operations](/docs/en/whatsapp/operations).

The channel does **not** do anything else today. Orders, approvals, picking, dispatch, delivery and receipt of deliveries, moves between warehouses, corrections, counts and reports are done in the console. The channel does not answer free-text questions, and it does not read photos, audio, documents or stickers: sending one of those ends the flow in progress and shows the menu again.

## How a conversation works

```mermaid theme={null}
flowchart LR
  A[Any message] --> B{Number linked?}
  B -- No --> C[Link prompt]
  B -- Yes --> D[Menu]
  D --> E[Guided steps: one question at a time]
  E --> F[Summary card]
  F -- Confirm --> G[muveya records the operation]
  G --> H[Receipt with operation number]
  F -- Edit --> E
  F -- Cancel --> I[Nothing changes]
```

* **Deterministic.** The channel acts only on the option or button you tap and on your answer to the question it just asked. It never guesses what a message means, and no AI takes part in any step.
* **Confirmation first.** Nothing changes until you tap **Confirmar** (Confirm) on the summary card. **Corregir** (Edit) takes you back to correct the data; **Cancelar** (Cancel) ends the flow with no change.
* **Same rules as the console.** muveya checks your permissions, your warehouses and the current stock again when you confirm, exactly as it does for the console.
* **One flow at a time.** Each number has one active flow. Starting another option replaces it. A flow forgets its data 10 minutes after the last answer it accepted.
* **No duplicates.** A repeated tap on the same **Confirmar** button, or a message WhatsApp delivers twice, never records the operation twice.

## Who can use it

Any active member of a dental clinic account can link their own number. What they can do from the chat depends on their permissions and on the warehouses assigned to them, which muveya reads again on every message:

| Option | Permission needed | Console label |
| - | - | - |
| Check stock | `inventory.read` | **View inventory** |
| Log consumption | `inventory.consume`, or `inventory.adjust` which includes it | **Record usage**, or **Adjust and count stock** |
| Receive stock | `inventory.receive`, or `inventory.adjust` which includes it | **Receive deliveries**, or **Adjust and count stock** |

A member limited to some warehouses only sees and uses boxes in those warehouses. A member with no warehouse at all cannot log consumption or receive stock. Permissions are granted in **Team**; see [Team](/docs/en/account/team) and [Roles and permissions](/docs/en/account/roles-and-permissions).

## Link your WhatsApp number

A number is linked with a one-time code that belongs to you and to the dental clinic account that was active when the code was created. muveya then recognizes messages from that number as yours.

<Warning>
  The console currently has no screen to create the link code. A code can only be issued to you while you are signed in to your own dental clinic account: the muveya team cannot create one on your behalf. Write to [team@muveya.com](mailto:team@muveya.com) if you want to use the channel or do not know the muveya WhatsApp number.
</Warning>

<Steps>
  <Step title="Get your code">
    Obtain your one-time code as described above. It is valid for 10 minutes.
  </Step>

  <Step title="Open a chat with muveya">
    From the phone you want to link, open a WhatsApp chat with the muveya number. If you write anything that is not a code, muveya answers with the link prompt.
  </Step>

  <Step title="Send the code">
    Send the 8 characters as a message. Upper or lower case and spaces do not matter.
  </Step>

  <Step title="Check the answer">
    muveya confirms the link. From then on, any message shows the menu.
  </Step>
</Steps>

The messages you can see while linking (the channel sends the Spanish version today, see [Languages](#languages)):

<CodeGroup>
  ```text Spanish (sent today) theme={null}
  Para operar muveya desde WhatsApp, primero vincula tu cuenta: responde con el código de un solo uso que generaste en la consola.

  Listo — tu WhatsApp quedó vinculado a muveya. Ya puedes operar desde aquí.

  Ese código no es válido o expiró. Genera uno nuevo en la consola y envíalo por aquí.
  ```

  ```text English theme={null}
  To operate muveya from WhatsApp, first link your account: reply with the one-time code you generated in the console.

  Done — your WhatsApp is now linked to muveya. You can operate from here.

  That code is not valid or has expired. Generate a new one in the console and send it here.
  ```

  ```text Portuguese theme={null}
  Para operar o muveya pelo WhatsApp, primeiro vincule sua conta: responda com o código de uso único que você gerou no console.

  Pronto — seu WhatsApp foi vinculado ao muveya. Você já pode operar por aqui.

  Esse código não é válido ou expirou. Gere um novo no console e envie por aqui.
  ```
</CodeGroup>

The first message is the link prompt, the second confirms the link, the third means the code failed. The prompt mentions the console, but the console has no screen to create the code yet (see above).

### Link code rules

| Rule | Detail |
| - | - |
| Format | 8 characters: capital letters and digits, without the easily confused `0`, `1`, `I`, `L` and `O`. |
| Lifetime | 10 minutes from creation. |
| Single use | A code links once. A new code for the same person in the same dental clinic account cancels any earlier unused one. |
| Failure message | An invalid, expired or already used code gets the same answer, which does not say which case it was. |
| What it links | Your membership in the dental clinic account that was active when the code was created. |
| One number, one membership | A number links to one membership only. Linking the same number again with a new code replaces the previous link. |

<Note>
  While a number is linked to an active membership, every message from it is handled by the menu or by the current question, and a new code is never redeemed. So a linked number cannot be moved to another person or another dental clinic account by sending a code. Write to [team@muveya.com](mailto:team@muveya.com) if you need that.
</Note>

## Unlinking and revoking

There is no unlink option in the chat or in the console yet. A link stops working, immediately and on the next message, when:

* the member is suspended (**Suspend access**) or removed from the dental clinic account (**Remove from clinic**) in **Team**;
* the membership was suspended after the number was linked: even after **Reactivate access**, links from before the suspension stay closed, and the person must link again.

After that, messages from the number get the link prompt, and any flow in progress can no longer be continued; its data expires within 10 minutes. There is no way yet to unlink a number without suspending or removing the member.

Changes to permissions or warehouses do not unlink the number: they apply from the next message. A permission removed during a flow ends that flow with a "no permission" reply, even at the confirmation step.

## Languages

Today the channel always replies in **Spanish** (neutral Latin American), whatever the language the member uses in the console. English and Portuguese versions of every message exist in the product, and this documentation shows them next to the Spanish text, but the channel does not select them yet. Button and menu labels are therefore in Spanish too: **Confirmar**, **Corregir**, **Cancelar**.

## Privacy and security

* **No costs, values or patient data.** No message ever contains a cost, an order value or a patient or care reference. The channel never asks for them; do not send them in the chat.
* **What messages contain.** Box codes, supply names and SKUs, warehouse names, quantities, lot numbers, serial numbers, expiration dates and operation numbers.
* **Built from records.** Every reply is assembled from muveya's records and fixed texts, never generated.
* **Your number.** muveya stores the number to recognize you. Audit records keep only a one-way hash of it, not the number itself.
* **Short memory.** The step you are on and its draft are kept for 10 minutes after the last answer the flow accepted. The id of each incoming WhatsApp message is kept for 24 hours only to discard duplicates.
* **Verified origin.** muveya accepts incoming messages only when its WhatsApp provider signs them; anything else is refused.
* **Delivery ticks are not proof.** WhatsApp's sent, delivered and read states are used only to monitor the channel. They are never recorded as proof that stock was delivered or received.
* **Access follows the membership.** A suspended or removed member loses the channel at once, as described above.

More in [Security and privacy](/docs/en/trust/security-and-privacy).

## What the system records

| Event | Record |
| - | - |
| Number linked | Audit fact `channels.linked` for the member, with a hash of the number. |
| Consumption confirmed | A `consume` movement in the stock ledger with the member as actor and reason `whatsapp`, plus the audit fact `channels.consume_confirmed` with the movement id and quantity. |
| Reception confirmed | A new box and its `receive` movement, plus the audit fact `channels.receive_confirmed` with the movement id and quantity. |
| Stock checked | Nothing. |

The operation number in each receipt is the id of the ledger movement. The same movement appears in the box history in the console; see [Boxes](/docs/en/inventory/boxes).

## What can go wrong

| What you see | Cause | What to do |
| - | - | - |
| The link prompt, again and again | The number is not linked, the membership is suspended or removed, or the link predates a suspension. | Link the number again with a new code. The console cannot create one yet: write to [team@muveya.com](mailto:team@muveya.com). |
| **Ese código no es válido o expiró. Genera uno nuevo en la consola y envíalo por aquí.** | The code is wrong, older than 10 minutes, already used, or replaced by a newer code. | Get a new code and send it within 10 minutes. |
| **No tienes permiso para …** | You lack the permission for that option, or no warehouse is assigned to you. | Ask someone with **Manage team access** to grant it in **Team**. |
| No answer at all | A temporary problem with WhatsApp or muveya. muveya retries the message automatically. | Wait a minute and send any message to get the menu. Before repeating a consumption or reception, check the box in the console so you do not record it twice. |

For every message of each flow, see [WhatsApp operations](/docs/en/whatsapp/operations).

## Related pages

<CardGroup cols={2}>
  <Card title="WhatsApp operations" icon="list-check" href="/docs/en/whatsapp/operations">
    Every conversation, prompt, limit and error reply.
  </Card>

  <Card title="Team" icon="users" href="/docs/en/account/team">
    Grant permissions, suspend or remove a member.
  </Card>

  <Card title="Receive stock" icon="box-open" href="/docs/en/inventory/receive">
    The console reception, with presentations and more options.
  </Card>

  <Card title="Security and privacy" icon="shield-halved" href="/docs/en/trust/security-and-privacy">
    How muveya protects your data.
  </Card>
</CardGroup>


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