# Outreach webhooks in production: duplicates, ordering, retries and timeouts

Agent skill: `npx skills add hookdeck/webhook-skills --skill outreach-webhooks` ([details](https://hookdeck.com/webhooks/outreach/skill))

This guide covers the problems Outreach webhooks cause in production and how to handle each one. What Outreach sends and how it's signed is on the [Outreach webhooks](/webhooks/outreach) overview, every event is on [Outreach webhook events](/webhooks/outreach/events), and signature verification code is on [Verify Outreach webhooks](/webhooks/outreach/verify).

## At a glance

| Problem | What to do | With Event Gateway |
| --- | --- | --- |
| [Timeouts](#timeouts) | Return `200` within 5 seconds; process in a background job | Answers Outreach once the request is stored, then queues it for your service |
| [Duplicates](#duplicates) | Build a key from the event name, resource and changed attributes | Can drop repeats based on the fields you choose |
| [Ordering](#ordering) | Don't rely on arrival order; fetch current state from the API | Logs every delivery and attempt, so you can see arrival order when debugging |
| [Retries](#retries) | Keep the receiver available; reconcile through the API after an incident | Accepts deliveries while your service is down, retries them and lets you replay them |
| [Choosing events](#choosing-events) | Filter per webhook; route on `meta.eventName`; merge partial attributes | Filters and routes deliveries by event name |
| [Testing](#testing) | Forward deliveries to localhost with a CLI | Forwards to localhost and replays past deliveries |
| [Other limits](#other-limits) | Alert on disabled webhooks; check the authorizer's permissions | Gives Outreach a stable public hostname to deliver to |

## Outreach webhook timeouts and slow handlers {#timeouts}

Return `200` within 5 seconds, then do the work in a background job.

**Why it happens:** Outreach waits 5 seconds for a response, and advises finishing within that time or using a message bus. Its docs don't say whether a timed-out delivery is retried. If a timeout does count as a network failure, the remaining attempts are only one second apart, so a handler that's slow for any length of time would miss those too.

**Fix it in your handler:**

1. Verify the signature, store the event and return `200`.
2. Process the event from a queue. See [why to process webhooks asynchronously](/webhooks/guides/why-implement-asynchronous-processing-webhooks).
3. Keep database writes on the request path to a single insert.

**With Event Gateway:** Hookdeck answers Outreach as soon as the request is stored, without waiting for your service, and your service can take as long as it needs to process each event.

## Duplicate Outreach webhooks {#duplicates}

Outreach makes up to 4 attempts after a network failure and sends no event ID, so make handlers safe to run twice.

**Why it happens:** A connection can drop after your handler has done the work, and Outreach then tries again. `meta` carries only `deliveredAt` and `eventName`, and nothing in the payload identifies the delivery. Outreach doesn't say whether `deliveredAt` stays the same across attempts, so don't include it in a key.

**Fix it in your handler:**

1. Build a key from `meta.eventName`, `data.type`, `data.id` and the changed attributes, such as `completedAt`.
2. Store the key with a unique constraint and skip repeats.
3. Make each handler [idempotent](/webhooks/guides/implement-webhook-idempotency), so applying the same change twice does no harm.

**With Event Gateway:** Hookdeck's [deduplication](/docs/deduplication) can drop repeated deliveries before they reach your service, based on the fields you choose. Include the `data` fields and `meta.eventName`, and leave out `meta.deliveredAt`.

## Out-of-order Outreach webhooks {#ordering}

Outreach's docs say nothing about delivery order, so don't rely on it.

**Why it happens:** Deliveries carry no sequence number, and an attempt repeated after a network failure can arrive after a newer event for the same resource. Update events also hold only the changed attributes, so applying them in the wrong order can leave an old value in your record.

**Fix it in your handler:**

1. Treat a delivery as a signal that a resource changed, and fetch it from the API when your next step depends on its current state.
2. Avoid sequential logic that assumes `prospect.created` always arrives before `sequenceState.created`.

**With Event Gateway:** Hookdeck logs every delivery and attempt, so you can see the order events arrived in when you debug a problem.

## What Outreach retries {#retries}

Outreach retries network failures only. Any HTTP status counts as an acknowledgement, so an error from your endpoint loses that event.

**Why it happens:** Outreach doesn't retry after any status code, including `500` and `429`, and it doesn't follow redirects. It retries socket errors, connection resets and similar failures, with 4 attempts in total, one second apart. Outreach warns that some proxies answer `429` when they hit a capacity limit, and it treats those responses as acknowledgements too. It documents no way to resend a delivery.

**Fix it in your handler:**

1. Keep the receiver small and highly available: verify, store, return `200`.
2. Monitor any proxy in front of the endpoint for `429` responses, as Outreach advises.
3. Point the webhook at its final URL, because a redirect ends the delivery.
4. Reconcile important resources through the Outreach API after an incident.

**With Event Gateway:** Hookdeck acknowledges Outreach as soon as the request is stored, then retries delivery to your service on a schedule you control and lets you replay any event, so an error in your service no longer drops the event.

## Choosing Outreach events {#choosing-events}

Create a webhook for each resource and action you need, and route on `meta.eventName`.

**Why it matters:** Leaving `resource` and `action` at `*` sends every applicable change to your endpoint. `data.type` names the resource and not the action, so the same `task` type arrives for created, updated, destroyed and completed events. Create and update events hold only the created or changed attributes.

**Fix it in your handler:**

1. Set `resource` and `action` on each webhook, so less traffic arrives. The [events page](/webhooks/outreach/events) lists every combination.
2. Switch on `meta.eventName`, and log and acknowledge anything you don't recognize. `task.completed` is the only name Outreach's docs show in a payload, and the others follow from its table of resources and actions, so log what you receive before you rely on an exact spelling.
3. Merge the attributes that are present instead of replacing your record, or fetch the full resource from the API.
4. Create the webhook with `payloadVersion` set to `2` if you need the previous values in `beforeUpdate`. The version isn't sent with the delivery, so a version 2 body is recognizable only by that key.

Outreach's example has a numeric `data.id` and timestamps with no time zone suffix, so check how you parse both.

**With Event Gateway:** Hookdeck can filter and route deliveries on `meta.eventName`, so one Outreach webhook can feed several services.

## Testing Outreach webhooks locally {#testing}

Forward deliveries to your machine with the Hookdeck CLI, then make a change in Outreach to trigger one.

**Why it matters:** Outreach needs a public HTTPS URL and documents no test send.

**Set it up:**

1. Run `hookdeck listen 3000 outreach --path /webhooks/outreach` with the [Hookdeck CLI](/docs/cli), which gives you a public HTTPS URL that forwards to your local server.
2. Create a webhook with that URL through the API, with a `resource`, an `action` and a `secret`.
3. Make a change in Outreach, such as completing a task to send `task.completed`.
4. Remove the webhook with `DELETE /api/v2/webhooks/{id}` when you've finished.

**With Event Gateway:** Hookdeck keeps past deliveries, so you can replay one against your handler while you work on it.

## Other Outreach limits {#other-limits}

Outreach can disable a webhook because of its hostname, and a webhook only delivers what its authorizer can read.

**Why it happens:** If the hostname resolves to a private network address, Outreach disables the webhook for an hour. If the hostname doesn't resolve after 3 DNS attempts, it disables the webhook for a minute. A webhook that can't recover for a week or more is disabled permanently. Separately, Outreach's API reference says a webhook won't deliver results if its `authorizer` doesn't have permission to read the resource.

**Fix it in your handler:**

1. Use a public hostname with stable DNS.
2. Read `active`, `disabledReason`, `disabledSince` and `disabledUntil` from `GET /api/v2/webhooks`, and alert when a webhook is disabled.
3. If events stop for one resource, check the authorizer's permissions.
4. Treat `outreach-webhook-cleanup-token` as a secret and keep it out of your logs. Every delivery carries it, and it can delete that webhook with `POST https://api.outreach.io/api/v2/webhooks/cleanup`. That returns `204` when the webhook is removed, `404` if it's already gone and `401` for an invalid token, which helps a partner integration whose API token was revoked.

Application lifecycle webhooks are a separate feature. You configure them on an Outreach app, and they report installs as `install.created` and `install.deleted`. Their [docs](https://developers.outreach.io/client-extensions/app-lifecycle-webhooks) list an `Outreach-Webhook-ID` header that the webhooks guide doesn't mention, so don't build on it for the webhooks covered here.

**With Event Gateway:** A Hookdeck source URL is a stable public hostname, so DNS changes on your side don't affect the webhook Outreach delivers to.