← story.propek
STORY 6.4
Bot WhatsApp: Handoff Inteligente com Coleta de Dados Obrigatorios
Epic: Bot WhatsApp Propek
DONE
2026-03-26
ACCEPTANCE CRITERIA (11/11)
1. Bot e honesto quando nao tem informacao: responde "nao tenho informacao sobre esse produto" (sem inventar)
2. Bot oferece escolha antes do handoff: continuar conversa sobre outro produto OU falar com time comercial
3. Bot coleta nome completo antes do handoff
4. Bot confirma telefone com o cliente (ja tem do WhatsApp via Z-API)
5. Bot coleta CPF ou CNPJ antes do handoff
6. Bot coleta endereco completo antes do handoff
7. Bot coleta CEP antes do handoff
8. Bot coleta email antes do handoff
9. Bot coleta todos os dados obrigatorios antes do handoff; se cliente recusar um campo apos 2 tentativas, handoff parcial com nota ao atendente (AUTO-DECISION aprovada)
10. Handoff inclui resumo da conversa + dados coletados para o atendente
11. Dados coletados sao armazenados (Supabase tabela `handoff_leads` com criptografia AES-256-GCM)
TIMELINE
01/04/2026
docs: update Story 6.4 AC wording and gate status to PASS [Story 6.4]
bac5240
26/03/2026
feat: intelligent handoff with mandatory data collection + PII encryption + LGPD purge [Story 6.4]
fb441e7
ARQUIVOS (9)
propek-whatsapp-bot/src/prompts/system-prompt.ts MODIFIED
propek-whatsapp-bot/src/services/handoff.service.ts MODIFIED
propek-whatsapp-bot/src/handlers/whatsapp.handler.ts MODIFIED
propek-whatsapp-bot/src/statemachine/types.ts MODIFIED
propek-whatsapp-bot/src/statemachine/engine.ts MODIFIED
propek-whatsapp-bot/src/migrations/024_create_handoff_leads.sql MODIFIED
propek-whatsapp-bot/src/migrations/025_lgpd_purge_handoff_leads.sql CREATED
propek-whatsapp-bot/src/services/lead-capture.service.ts MODIFIED
docs/stories/active/story-6.4-bot-handoff-inteligente-coleta-dados.md MODIFIED
RETROSPECTIVA
Qualidade: ★★★☆☆
Incluir @qa no proximo ciclo
Rodar @cyber-chief antes do push