# How it works

> The path of a message: from WhatsApp to the business's base, the reply and the alert to the owner.

## The path of a message

1. A customer writes to the business's WhatsApp.
2. Meta delivers the message to Atenta through the **official WhatsApp Business API** (Cloud API), with a verified signature.
3. Atenta identifies the business by its number and builds the context: the business's **approved base**, the customer's profile if one exists, and the short history of the conversation.
4. It decides how to answer. Many things are answered **by code, with no model**: today's menu, "how much balance do I have?", a promotions opt-out. The rest is written by the model with the base as the only source of figures.
5. **It checks the reply against the base** before sending it: no figure that doesn't exist in the base goes out to the customer.
6. If the message asks for something that isn't in the base, or something only a person can decide, Atenta tells the customer it will check and **alerts the owner** with the full thread and a label (quote, booking, emergency, department).
7. The owner sees it live in their app. They can **take over** the chat with one tap; Atenta stays quiet in that chat until they hand it back.

## The knowledge base

It's what Atenta knows about your business: description, location, hours, contact, services with prices, policies and frequently asked questions. It's drafted at sign-up by reading your website and your social media; you correct it and **approve** it from the app. There is always an active version (the approved one) and a draft (what you're changing). The conversation only reads the approved one.

When Atenta didn't know something in a chat, it proposes a **patch**: "this is how to answer that". If you accept it, it goes into the draft and you approve it whenever you want.

## Signing up with no humans involved

The `/alta` form creates your business in **test mode**: Atenta only answers the test numbers you register. You get a magic link to enter the app (no passwords). Once the base is approved and your number connected, you switch Atenta on for the public from Settings.

## Who sees what

- **You**, from your app, see everything about your business.
- **Kalia Code** only comes in to operate and give support.
- **Every business is isolated**: one business's base, customers and conversations are never mixed with another's. This is written in code and tested on every change.
- Conversations **are not used to train** third-party models. The details are in the [privacy notice](https://atenta.mx/en/privacidad).

## What about phone calls

With the plan that includes them, Atenta also answers the phone with a voice agent that uses **the same base and the same golden rule**: it takes the order, confirms it over WhatsApp and passes the call to you when needed. See [Calls](https://atenta.mx/en/docs/llamadas).
