AddThisFeature

Customer.io Event Forwarding

Forward real product behaviour to Customer.io so campaigns fire on what users do.

involved Sales & Marketing Tools

What it adds

A server-side pipeline that sends a defined catalogue of product events and profile attributes to Customer.io under a stable identity.

What your agent is told to do

5
  1. 1

    Write down the event catalogue before writing any code: a small fixed set of names in one tense and one convention, each with a documented property list. An open-ended stream of ad-hoc names is unusable for anyone building a campaign.

  2. 2

    Emit events from the server after the underlying change has committed, through the app's existing background-job system. Do not emit from the browser, where events are lost to ad blockers, duplicated by reloads, and trivially forged.

  3. 3

    Key every event and every profile on the app's own immutable user identifier rather than the email address, so changing an email moves the profile instead of creating a second one.

  4. 4

    Separate the two payload shapes deliberately: durable profile attributes such as plan, workspace, and lifecycle stage belong on the profile, and per-occurrence detail belongs on the event. Do not accumulate one-off transactional values as profile attributes.

  5. 5

    Where a contact-and-list sync brief is also applied to this app, that feature owns identity and subscription state. This one owns behaviour only and must never write subscription status, or the two will fight over the same contact.

Edge cases it handles

8
  • Anonymous activity captured before signup must be attached to the real profile exactly once. A merge that replays those events as new ones double-counts every campaign trigger built on them.
  • Retried and delayed jobs arrive out of order. Send each event's own occurrence timestamp rather than letting the provider stamp receipt time, or a campaign reacts to something that happened hours ago as if it were new.
  • Data the app is not permitted to share — payment details, message bodies, identity documents, anything under a processing restriction — must be excluded by an allowlist of properties, never by a blocklist that the next new field escapes.
  • Renaming an event breaks every campaign already listening for it. Treat names as a public contract: deprecate rather than rename, and emit both during any transition.
  • Rate limits and provider outages must apply backoff and hold events in the queue. Dropping events on a rate-limit response leaves campaigns permanently missing a step for those users.
  • A user deleted in the app must be deleted or suppressed at the provider too, or campaigns keep mailing someone who left.
  • A burst from a bulk import, a backfill, or a runaway loop must be throttled and capped, so one job cannot exhaust the quota that every other event depends on.
  • Development, staging, and seeded test activity must never reach the production workspace.

Definition of done

9
  • A documented event catalogue exists and every forwarded event conforms to it.
  • Events are emitted server-side after commit, through the existing background-job system.
  • Profiles are keyed on a stable internal identifier that survives an email change.
  • Anonymous pre-signup activity is attached to the account once, with no duplicated events.
  • Event properties are assembled from an allowlist and contain no restricted personal data.
  • Rate limiting and provider downtime delay events rather than discarding them.
  • Account deletion in the app propagates to the provider.
  • The feature matches the existing design system.
  • No existing functionality is broken.

Related features

How it works

  1. 1

    Copy the link

    Grab the Markdown instruction URL for this feature.

  2. 2

    Give it to your AI

    Paste it into Claude Code, Cursor, v0, Lovable — whatever you build with.

  3. 3

    It inspects, then implements

    Your agent reads your existing app first, then adds the feature to fit it.

Works with your stack

These instructions are written to adapt. They tell the agent to detect your framework, match your existing design system, and reuse what you already have — rather than assuming a particular stack.

Need it tighter than that? Customize the feature and tell it exactly what you're running.