Skip to main content
The Service Webhook notifies your external system whenever a conversation is finished in Tartini. On each closure, Tartini sends a JSON POST to the configured URL, containing the conversation’s and contact’s data. Optionally, the payload can include the summary generated by Tino, the message history, and the CSAT score. The setting is at Configurações > Integrações > Webhooks > Finalização de Atendimento (Settings > Integrations > Webhooks > Service Completion) (talk.saninternet.com/settings/webhooks).
The trigger fires when the conversation is actually finished. This includes manual closing by the agent, automatic closing due to inactivity, and closing after the CSAT evaluation (with or without a customer response).

Configuration

1

Turn on the webhook

In Configurações > Integrações > Webhooks > Finalização de Atendimento, turn on the Ativar webhook (Enable webhook) switch.
2

Enter the destination URL

Your system’s endpoint that will receive the POST. Enter the full URL, including the protocol (http:// or https://).
3

Generate the signing secret

Click Gerar novo secret (Generate new secret) and store the value securely. It will be used to validate the authenticity of each delivery.
4

Choose the payload content

Conversation and contact are always sent. You can also include the summary generated by Tino, the message history, and the CSAT score.
5

Set the relevance filter (optional)

With Registrar apenas atendimentos relevantes (Only log relevant services) turned on, trivial conversations (such as a greeting with no follow-up) aren’t sent to your system.
6

Test the delivery

The Testar webhook (Test webhook) button sends a test delivery to the configured URL, to validate the integration before you turn it on.

Identifying the Customer: the External ID

For your system to know which customer the service belongs to, every Tartini contact has an ID externo (External ID) field: a free-form code that references the customer in your system (for example, their ID in your ERP or CRM). The agent sets this value in the contact’s details panel, inside the Inbox. Once filled in, it follows the contact through every future closure and arrives in the payload as contact.externalId.
When the ID externo isn’t filled in, contact.externalId arrives as null. The payload also carries contact.phoneNumber.

Payload Format

Special Fields

When the summary generated by Tino is enabled, the delivery waits for the summary to be generated and may lag a few minutes behind the conversation’s closure.

Delivery and Response

  • The POST is sent with Content-Type: application/json.
  • Your endpoint must respond with a 2xx status to confirm receipt.

Headers Sent


Validating the Signature

Every delivery is signed with HMAC-SHA256 using the configured secret, sent in the X-Webhook-Signature header. Requests with an invalid signature must be rejected.
The secret never travels in the requests. If it leaks, generate a new one on the configuration screen and save. The next deliveries will immediately start using the new value.