Browse docs

Using custom events

Updated June 4, 2026

On this page

Most checklist items complete based on what users do visibly in your app, for example by clicking a button. Custom events come in when the thing that should complete the item isn’t a visible action. Maybe a chat widget finished a conversation, a third-party payment tool confirmed a charge, or a video player finished playing. FlowNavi can’t see those directly, but your app can. Emit a custom event when they happen and FlowNavi triggers whatever you’ve wired it to.

When to use a custom event

Use a custom event when the trigger isn’t a visible user action. Common cases:

In the browser:

  • An embedded tool finishes something (a chat closes, a video finishes playing, a meeting gets booked)
  • Something happens behind the scenes in your app (a payment confirms, a search result loads, a file finishes uploading)
  • Your app figures something out from data it already has (a user just hit their plan limit, a setting flips on)

On your server:

  • Your backend gets a notification from another tool (payment confirmed, account upgraded)
  • A scheduled task runs in the background (a nightly job, a daily check on user activity)
  • Another service in your stack tells your backend that something happened

Register the event

Custom events must be registered in the editor before you can emit them. Each event has a name your code references.

Event names must be 1–100 characters and use letters, numbers, underscores, or hyphens (regex: ^[a-zA-Z0-9_-]+$). Names are case-sensitive: Trial_Started and trial_started are different events.

Emit a custom event in the browser

Once registered, emit the event from your frontend code by passing its name to emitEvent:

window.FlowNavi.emitEvent("trial_started");

Emit a custom event on the server

To emit events from your backend, send a POST request directly to the FlowNavi API.

You’ll need your project’s API key from the dashboard.

curl -X POST https://sdk.flownavi.com/api/v1/event \
  -H "Content-Type: text/plain;charset=UTF-8" \
  -d '{
    "apiKey": "YOUR_API_KEY",
    "endUserId": "USER_ID_FROM_YOUR_APP",
    "eventName": "trial_started"
  }'

Firing the same event multiple times for the same user completes matching items only once. Safe for webhook retries.

Endpoint reference

POST https://sdk.flownavi.com/api/v1/event

Headers:

HeaderValue
Content-Typetext/plain;charset=UTF-8

The body is stringified JSON. FlowNavi uses text/plain to skip CORS-preflight in browsers.

Request body:

FieldTypeRequiredDescription
apiKeystringyesYour project’s public API key.
endUserIdstringyesThe user ID the event is for. Same ID you’d pass to identify in the browser.
eventNamestringyesThe name of an event you registered in the editor.
propertiesobjectnoUser properties to attach. Same shape and supported value types as user properties.
companyobjectnoCompany data for company-scoped completions.
company.idstringyesRequired when company is included.
company.propertiesobjectnoCompany properties. Same supported value types as user properties.
debugbooleannoWhen true, the event still completes checklist items but is not written to analytics.

Responses:

StatusMeaning
200Event accepted.
400Unknown eventName.
401Missing or invalid apiKey.
422A required field is missing.