Notifizz backend quickstart
Send your first event from a backend in under five minutes. The SDK call is one line; Notifizz resolves the campaign, builds the recipients, and dispatches the notification — all server-side.TL;DR
- Install
@notifizz/nodejs(or the Java / PHP SDK). - Construct the client with your auth secret + SDK secret.
- Call
await client.track(eventName, properties, { idempotencyKey }). - The backend acks within milliseconds; the campaign runs asynchronously.
Get your Auth Secret Key and SDK Secret Key from the Notifizz dashboard under your environment settings. Keys are scoped per environment (dev / prod) — see keys and environments.
1. Install the SDK
2. Initialise the client
webhookSigningSecret) is required only if you mount enrichers. Skip it for the quickstart.
3. Track your first event
Match theeventName to an event you registered in the dashboard (or one tied to an active campaign):
client.track() posts to POST /v1/events/track, and Notifizz takes over: the event is queued, one workflow instance is created per matching campaign, the AI orchestrator builds the recipient list (calling enrichers to fetch any live data the event didn’t carry), and the notification ships through every channel the campaign configures.
4. Use idempotency for retried jobs
If the same logical emit may run twice (queue retries, scheduler, retry middleware), set an explicit idempotency key derived from your domain:{ duplicate: true, idempotencyKey } and does not re-enqueue the campaign.
5. Watch retries
The SDK retries transient failures twice (1s, then 2s) before bubbling the error:6. (Optional) Generate a widget auth token
If your frontend uses backend-token authentication, generate a per-user token from the same client:token (along with userId + userEmail) when initialising the widget — see frontend quickstart.
What just happened
Campaigns matched
Notifizz looked up campaigns wired to
user.signed_up (or order.shipped) in your environment.Workflow instance created
One instance per matching campaign. Each instance has its own recipient list, computed by the orchestrator from your event properties (and any enricher the campaign declares).
Open the Notification Center widget for
u_42 (frontend quickstart) and the message appears in real time. No refresh needed.Troubleshooting
Track returned 200 but no notification arrived.
Track returned 200 but no notification arrived.
Three checks: (1) is there a campaign in the dashboard listening on this exact
eventName and is its status Live (or Dev for dev environments)?; (2) does the campaign’s recipient logic resolve from the properties you sent (e.g. userId present)?; (3) is the user’s widget authenticated with the same userId?Got `{ duplicate: true }` after a retry — is that an error?
Got `{ duplicate: true }` after a retry — is that an error?
No — that’s the success path for an idempotent retry. The backend has already processed an event with the same
idempotencyKey. Your code does not need to do anything.Latency on my request handler went up after adding `track()`.
Latency on my request handler went up after adding `track()`.
track() is async and the SDK retries failures with 1s + 2s delays — a degraded backend can stall your handler for up to ~3s. Either fire-and-log (track().catch(...) without await) or push the emit onto a queue you control.Should I generate the idempotency key myself?
Should I generate the idempotency key myself?
Yes when the same logical emit may run twice. Use a deterministic key (
order-shipped:${orderId}), not crypto.randomUUID() — random keys defeat the dedupe by producing a new key per attempt.See also
Work with a Certified Partner
Skip the discovery-as-you-go path. Vetted experts run the project end to end.
Frontend quickstart
Set up the widget so users see the notifications.
Node.js SDK reference
Full API: enrichers, error classes, retry behaviour.
How Notifizz works
The event-driven pipeline, end to end.