Duck Float
All posts
7 min read

Support webhooks: how to connect tickets to your own systems

Support rarely lives in isolation. When a ticket is created, you might want to notify the team in chat, update a CRM, count a metric, or kick off an internal process. Doing that by hand is a waste of time and a source of errors: someone forgets to check a new inbox, someone copies data with a typo, someone only notices a ticket two days later.

This is where webhooks come in: a mechanism that lets your system learn about support events automatically, the moment they happen. In this article — what a webhook is, which events are worth listening for, what a typical payload looks like, how to write a simple handler, and how to make it reliable, even if you've never built an integration before.

What a webhook is in plain words

A webhook is a "reverse call." Instead of your system constantly asking "anything new?" (this is called polling), the support system itself sends an HTTP request to a URL you specify every time an event happens.

Think of the difference between a doorbell and repeatedly peeking through the peephole: the first is a webhook, the second is polling. You give the address of your handler once — and from then on you simply get notified when something actually happens. That's faster, more reliable, and far cheaper than constantly asking "is there anything new" every few seconds.

Technically a webhook is just a POST request to your endpoint. No special libraries or protocols are needed — just a server that can accept HTTP requests and return a status code.

Which events to listen for

Not every support event deserves its own automation, but a few are worth listening for almost always:

  • Ticket created — to notify the team in a work chat right away or create a record in your CRM. This is the most common trigger: a new customer's first message is often more important than anything else.
  • New message — to react to a customer's reply in real time, for example raising priority if the customer wrote again without an operator response.
  • Status changed — to count metrics (how many tickets closed today), close related internal tasks, or remove a "needs attention" flag.
  • Operator assigned — to sync load with an internal task tracker or nudge the operator in a personal chat.
  • Tag added — to route the ticket further: for example, a "billing" tag could automatically notify a separate team.

Choose events based on what action you'll actually take in response. If an event doesn't trigger a decision, it's probably not worth listening for.

What the payload looks like

A webhook usually arrives as a POST request with a JSON body: the event type, the ticket id, the source (Telegram, widget, API), and the useful data — message text, status, tags. Here's an illustrative example of what such a body might look like for a status-change event:

{
  "event": "ticket.status_changed",
  "ticket_id": "8f21a4",
  "source": "widget",
  "occurred_at": "2026-03-01T10:15:00Z",
  "data": {
    "previous_status": "open",
    "new_status": "resolved"
  }
}

This is just an example of the shape, not a guaranteed spec for any particular provider — field names may differ. What matters is that you always get enough context to understand what happened, to which ticket, and where it came from, without an extra call back to the API.

Your handler reads this body and decides what to do. The most important rule on the handler side is to reply with a 200 quickly. If your logic is complex — calls to several services, slow database queries — it's better to offload the heavy work to a queue than to keep the webhook sender waiting on the line for a response.

A simple handler example

A webhook handler doesn't have to be complicated. In its simplest form it's two steps: accept and acknowledge the event, then — separately — process it.

function handleWebhook(request):
    event = parseJson(request.body)
    if not isValidSignature(request):
        return 401
    enqueue(event)
    return 200

function processQueue():
    for event in queue:
        if event.type == "ticket.created":
            notifyTeamChat(event)
        else if event.type == "ticket.status_changed":
            updateCrmRecord(event)
        else if event.type == "message.new":
            maybeEscalate(event)

Splitting "accept" from "process" isn't a whim, it's insurance. If your notifyTeamChat or updateCrmRecord fails or slows down, it won't affect how fast you respond to the webhook itself, and the sender won't start retrying because of a timeout.

Reliability tips

A few simple rules save you from most webhook problems in practice:

  • Make your handler idempotent. The same webhook can arrive twice — because of a network hiccup or a sender retry. Reprocessing must not corrupt data: check whether an event was already applied, by its id.
  • Verify the signature, if there is one, so you accept only genuine events, not forgeries from someone who guessed your URL.
  • Don't block the response. Accept, enqueue, reply 200 — then do the main work. A slow response is often interpreted as a failure and triggers unnecessary retries.
  • Log every event, so you can reconstruct what arrived and when if something goes wrong a week later.
  • Have a plan for failure. If your handler goes down and doesn't respond, a good support system will retry later — but your code needs to handle a "late" event correctly.

None of this requires heavy infrastructure — even a small in-memory queue or a simple "processed events" table solves 90% of the common problems.

Common use cases

In practice, webhooks are most often used for a handful of recurring tasks:

  • Team notifications. A new ticket shows up in the work chat right away — nobody misses a customer's first message.
  • Syncing internal tools. A ticket's status update updates a record in your customer-tracking system without manual copying.
  • Automatic actions by tag. An "urgent" tag can create a task in an internal tracker or notify the responsible person directly.
  • Real-time analytics. Instead of a daily data export, you accumulate events the moment they happen.

This is the same principle behind the broader idea of automating support without losing trust: automation works best when it reacts to real events rather than replacing a human operator's reply.

Webhooks and the API — two sides of integration

Webhooks answer "how do I find out something happened," and the API answers "how do I make something happen myself" — create a ticket, add a message, change a status. Together they give full control over integrating support into your processes: a webhook tells you about an event, and in response you use the API to make changes or request extra details.

If webhooks are the incoming stream of events, the API is the outgoing stream of actions. Most complete integrations use both directions at once. On the other side, see the article on the support API.

How it's implemented in Duck Float

Duck Float has webhooks and an event log: your system learns about every ticket change — from creation to a new message to a status change to operator assignment or a tag being added — and can react automatically. Together with the public API this lets you embed support into any of your processes, without manually moving data between systems.

And internally, every request — whether it comes from the Telegram bot, the chat widget on your site, or the API — becomes a ticket the same way, with history, status, and tags. AI prepares a draft reply in the customer's language, and the operator only confirms it with Tab or edits it — nothing goes to the customer without a human reviewing it. Duck Float is free during the beta. Want to connect webhooks to your processes, or just see how it works — message us through the widget on this site.

Try Duck Float with your team

Free while in beta. Setup takes a few minutes.

Create an account