badges on the right, evolution api sender

This commit is contained in:
Lucas Tettamanti
2026-01-26 01:21:08 -03:00
parent e85afab3e6
commit 53293ce9b3
13 changed files with 422 additions and 51 deletions

View File

@@ -28,6 +28,25 @@
- **`WOO_CONSUMER_KEY`**: consumer key (se usa solo si en `tenant_ecommerce_config` falta `consumer_key`).
- **`WOO_CONSUMER_SECRET`**: consumer secret (idem).
### Evolution API (WhatsApp)
Variables para el envío de mensajes a WhatsApp via Evolution API.
- **`EVOLUTION_API_URL`**: URL base de Evolution API (ej: `https://api.evolution.com`).
- **`EVOLUTION_API_KEY`**: API key para autenticación (header `apikey`).
- **`EVOLUTION_INSTANCE_NAME`**: nombre de la instancia de WhatsApp (ej: `piaf`).
- **`EVOLUTION_SEND_ENABLED`**: habilita/deshabilita el envío real a WhatsApp.
- `0` (default): Solo guarda mensajes en BD, NO envía a WhatsApp. Ideal para desarrollo/pruebas.
- `1`: Envía mensajes realmente a WhatsApp. Para producción.
**Flujo:**
1. Bot recibe mensaje de Evolution via webhook (`/webhook/evolution`)
2. Procesa el mensaje y genera respuesta
3. Guarda respuesta en BD (`direction: "out"`)
4. Si `EVOLUTION_SEND_ENABLED=1`, envía respuesta a Evolution API → WhatsApp
**Endpoint usado:** `POST {EVOLUTION_API_URL}/message/sendText/{instance}`
## Debug por temas (nuevo)
Todos aceptan `1/true/yes/on` para activar.