# ticket.suggested

> O evento ticket.suggested (A Noa sugeriu um ticket) do ByDomu: quando é emitido, como assinar, seus campos e o payload que chega por webhook.


A Noa sugeriu um ticket

Objeto · conversation Inclui · contact Na hora

## Quando é emitido

A Noa viu que a conversa precisa da equipe (falha, reclamação ou solicitação) e sugeriu criar um ticket. Ainda não há ticket: traz a conversa e ticketSuggestion.

Na hora, quando acontece no ByDomu: pelo app, pela API, pela Noa, por uma automação ou uma integração. `actor.kind` diz quem foi: USER, NOA, SYSTEM, API, AUTOMATION ou INTEGRATION.

## Assine com

- `ticket.suggested` Só este evento
- `ticket.*` Todos os de Conversa
- `*` O catálogo inteiro

## Campos que traz

caminhos para filtros e modelos

`conversation.id` Identificador da conversa

`conversation.channel` Canal

`conversation.status` Status da conversa

`conversation.priority` Prioridade

`conversation.mode` Quem responde

`conversation.contactId` Contato

`conversation.assignedToId` Responsável

`conversation.intent` Intenção

`contact.id` Identificador do contato

`contact.code` Código do contato

`contact.firstName` Nome

`contact.lastName` Sobrenome

`contact.email` E-mail

`contact.phone` Telefone

`contact.source` Origem

`contact.status` Status

`contact.type` Tipo de contato

`contact.score` Pontuação

`contact.ownerId` Responsável

`contact.preferredCity` Cidade de interesse

`contact.preferredType` Tipo de imóvel que procura

`contact.budget` Orçamento

`contact.tags` Etiquetas

Até 5 tentativas (0 s, 5 s, 30 s, 2 min e 10 min) em erro de rede, 429 ou 5xx. Responda 2xx em menos de 10 s.

Payload:

```
{
  "event": "ticket.suggested",
  "id": "5f3a0c1e-7d2b-4f7e-9a51-0b6c1d2e3f40",
  "type": "ticket.suggested",
  "timestamp": "2026-09-22T14:30:00.000Z",
  "organizationId": "clx1org001",
  "actor": {
    "kind": "NOA",
    "userId": null
  },
  "data": {
    "conversation": {
      "id": "clx1cnv001",
      "channel": "WHATSAPP",
      "status": "OPEN",
      "priority": "NORMAL",
      "mode": "AI",
      "contactId": "clx1con001",
      "assignedToId": "clx1usr001",
      "intent": "QUIERE_VISITA",
      "lastMessageAt": "2026-09-22T14:30:00.000Z",
      "createdAt": "2026-09-20T15:04:00.000Z"
    },
    "contact": {
      "id": "clx1con001",
      "code": "C-0042",
      "firstName": "Laura",
      "lastName": "Restrepo",
      "fullName": "Laura Restrepo",
      "email": "laura.restrepo@example.com",
      "phone": "+573000000001",
      "source": "WEBSITE",
      "status": "QUALIFIED",
      "type": "CLIENT",
      "score": 72,
      "ownerId": "clx1usr001",
      "preferredCity": "Bogotá",
      "preferredType": "APARTMENT",
      "budget": 450000000,
      "currency": "COP",
      "tags": [
        "Compra",
        "Chapinero"
      ],
      "createdAt": "2026-09-20T15:04:00.000Z"
    },
    "ticketSuggestion": {
      "id": "clx1tnd001",
      "category": "technical",
      "reason": "La clienta reporta que no ve las fotos y Noa no lo puede resolver respondiendo.",
      "trigger": "KEYWORDS",
      "byNoa": true
    }
  }
}
```

Cabeçalhos:

```
X-Domu-Event: ticket.suggested
X-Domu-Signature: t=1790610130,v1=9c1e…
User-Agent: Domu-Webhooks/2
```

Verificar assinatura:

```
import { createHmac, timingSafeEqual } from "node:crypto";

// header = X-Domu-Signature: t=<timestamp>,v1=<hmac>
function verifyWebhook(rawBody, header, secret, toleranceSec = 300) {
  const parts = Object.fromEntries(header.split(",").map((p) => p.split("=")));
  const timestamp = Number(parts.t);
  if (!timestamp || !parts.v1) return false;
  if (Math.abs(Date.now() / 1000 - timestamp) > toleranceSec) return false;
  const expected = createHmac("sha256", secret)
    .update(`${timestamp}.${rawBody}`)
    .digest("hex");
  const a = Buffer.from(expected);
  const b = Buffer.from(parts.v1);
  return a.length === b.length && timingSafeEqual(a, b);
}
```

**Peça com seus dados de teste** GET /v1/webhooks/sample/ticket.suggested

[Testar](https://developers.bydomu.com/pt/referencia/get-webhook-sample?probar=1&type=ticket.suggested)
