Home / Developers / Webhook Integration Patterns

Guides and playbooks

Webhook Integration Patterns

Design webhook consumers that acknowledge quickly, handle duplicates safely, and connect rollout changes to downstream systems.

Filter only what you need

If your consumer exists only to refresh local caches, start with flag.target.changed. If you audit rollout logic or precompute audience snapshots, also subscribe to the three rule events.

Acknowledge first, process second

Do minimal synchronous work in the webhook handler. Validate the payload, record the transaction ID if present, enqueue the expensive work, and return success quickly.

Queue-first consumer javascript

app.post('/zenmanage/webhooks', express.json(), async (req, res) => {
  const event = req.body;
  await jobs.enqueue('zenmanage-webhook', event);
  res.status(200).json({ ok: true });
});

Delivery design note

Because the public docs do not publish a strict retry schedule, treat webhook delivery as something your consumer must make safe. Build for duplicate delivery, replay, and temporary endpoint failure.

Per-event handling ideas

  • flag.target.changed: invalidate caches or warm a derived configuration store.
  • target.rule.created: notify teams that audience shape changed.
  • target.rule.changed: compare current and previous rollout assumptions in audit or incident tooling.
  • target.rule.removed: verify that fallback target behavior is still safe for all affected contexts.

Next step

Take the next integration step in your own stack.

Start with the quickstart that matches your runtime, then return to the reference pages when you need exact request and payload details.