Núcleo Wondai icon

Núcleo Wondai

Atendimento de IA no Núcleo Wondai: preparar conversa (GATE liga/desliga + contexto operacional ANTES da LLM), buscar cliente, resolver catálogo (fuzzy), criar/alterar/cancelar pedido, consultar contexto e registrar conversa. Assinatura HMAC; o tenant vem do token.

Conversa → Registrar

AI-generated

Summary

Register a conversation summary and its outcome in the Núcleo Wondai system, optionally linking it to a client phone number, an order ID, and a conversation session key to associate the record with the conversation context.

Inputs

  • Token ID Dinamico — Optional dynamic token ID from multi-tenant bootstrap; must be used with the dynamic Signing Secret.
  • Signing Secret Dinamico — Optional ephemeral signing secret from bootstrap; do not log this value.
  • Resumo (required) — Objective summary of the customer service interaction; appears in the conversation inbox.
  • Resultado (required) — Outcome of the conversation: 'resolvido' (resolved), 'precisa_humano' (needs human handoff), or 'abandonado' (abandoned).
  • Telefone — Client phone number in E.164 format; links the conversation to the client if matched but does not create new clients.
  • Pedido ID — Optional UUID of the order generated in the conversation; validated against the tenant and only sent if well-formed.
  • Idempotency Key — Optional key to avoid duplicate conversation registration on retries (e.g., WhatsApp message ID).
  • Chave da Conversa (conversation_key) — Conversation key used in the 'preparar' operation (typically phone or remote JID) to link closure to the session for measuring 'service started off-hours'; empty disables off-hours measurement.

Output shape

a single JSON response object confirming the conversation registration status

The operation sends a signed request to '/api/v1/agent/conversa/fechar'. If an invalid Pedido ID is provided and rejected with 404, the node retries without the Pedido ID to still register the conversation. Inline errors are returned or thrown depending on node settings.

Examples

Example 1: Register a conversation with summary, outcome 'resolved', client phone, and optional order ID and conversation key. Use idempotency key to avoid duplicates on retry.

Set 'Resumo' with the conversation summary, 'Resultado' as one of 'resolvido', 'precisa_humano', or 'abandonado'. Optionally fill 'Telefone', 'Pedido ID' (UUID validated), 'Idempotency Key' (e.g., WhatsApp message ID), and 'Chave da Conversa' matching preparation key.

Links

Discussion