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.

Telemetria → Enviar

AI-generated

Summary

Send execution telemetry metrics such as token usage, model info, execution status, duration, and tools used to the Núcleo Wondai backend, identified by a unique event key to ensure idempotency.

Inputs

  • Token ID Dinamico — Optional dynamic token returned by multi-tenant bootstrap; must be used with the dynamic signing secret.
  • Signing Secret Dinamico — Optional ephemeral signing secret returned by bootstrap; must not be logged or exposed.
  • Chave do Evento (event_key) (required) — Unique identifier for the execution or event (e.g., n8n execution ID). Ensures idempotency, preventing duplicate telemetry on resend.
  • Provedor — Model provider name (default 'google'). Used with model to estimate cost.
  • Modelo — Model name returned by the provider (e.g., 'gemini-2.5-flash'). Used for cost estimation.
  • Tokens de Entrada — Number of input tokens used (provider usage metadata). Zero or empty means not informed.
  • Tokens de Saída — Number of output tokens produced (provider usage metadata). Zero or empty means not informed.
  • Status — Technical outcome status of the execution ('ok', 'error', or 'blocked'). Default is 'ok'.
  • Duração (ms) — Total execution duration in milliseconds. Zero or empty means not informed.
  • Ferramentas Usadas — Comma-separated or JSON array of tool names used during execution. Only the tool names without arguments.
  • Conversa ID — Optional UUID of the conversation, validated against the tenant; invalid values are discarded.
  • Pedido ID — Optional UUID of the related order, validated against the tenant.

Output shape

A single JSON object representing the telemetry submission response from the Núcleo backend.

The operation is idempotent by event key; re-sending telemetry with the same key does not create duplicates. Telemetry does not interfere with primary workflow execution; failures are handled based on 'continue on fail' setting.

Examples

Example 1: Sending telemetry data after an AI execution completes.

Provide a unique event key (usually the workflow execution ID), optionally specify model and provider details, and include metrics like input/output tokens, execution status, duration in ms, and tools used. Optionally associate telemetry to a conversation or order via UUIDs.

Links

Discussion