DeckleDocs
Dashboard

Integrations · Inbound

Segment

Stream Segment identify and track calls into Deckle contacts and events — automatically enrolling contacts into matching automations.

Add Deckle as a Segment Webhook (Actions) destination. Every identify upserts a contact and every track becomes an event, so product and marketing data flows straight into your audience and lifecycle automations.

Set it up#

Connect Segment in Deckle

Open Integrations → Segment and click Connect. Deckle generates your endpoint URL and a signing secret — copy both. The secret is shown once.

Add a Webhook destination in Segment

In Segment, add the Webhooks destination to your source. Set the webhook URL to the endpoint from the previous step, and set the shared secret to your Deckle signing secret.

Send a test event

Trigger an identify or track from your source. It appears as a contact or event in Deckle within seconds.

How data maps#

Segment callBecomes
identifyA contact (traits.email → email, name → name, remaining traits → custom fields)
trackAn event named after the Segment event, with properties as event data
page / screenAn event (page / screen)
groupContact company data (when an email resolves)

Events drive automations

A track event uses its name verbatim as the automation trigger. Create an automation triggered by that exact event name and matching contacts enroll automatically.

Request signing#

Every request is signed so Deckle can trust it’s from your Segment source. Segment sends an x-signature header — the HMAC-SHA1 of the raw request body, keyed with your shared secret. Deckle recomputes and compares it in constant time; a mismatch is rejected with 401. This is the same scheme you can verify yourself:

verify.ts
import { createHmac, timingSafeEqual } from "node:crypto";

function verify(rawBody: string, signature: string, secret: string) {
  const expected = createHmac("sha1", secret).update(rawBody, "utf8").digest("hex");
  const a = Buffer.from(signature);
  const b = Buffer.from(expected);
  return a.length === b.length && timingSafeEqual(a, b);
}

Next steps#