Skip to content

Launch content manually ​

Publish the content, install the widget, and wait for await window.FlowtomateWidget.ready(). These methods open only content the widget has already loaded. They do not change the user's consent decision.

Enable “From site code” in the popup's display settings. Then pass its ID:

js
const opened = await window.FlowtomateWidget.openPopup('POPUP_ID');

true means the popup opened. false means it cannot open right now: the ID was not found, manual launch is disabled, content display is disabled, the popup is already open, or the required page layer is occupied. A false result alone does not identify the reason. The method does not check the popup's schedule, audience, or frequency.

Tour ​

js
const result = await window.FlowtomateWidget.startTour('TOUR_ID');
result.statusWhat happened
startedThe current step is displayed; the response contains attemptId.
pendingAn attempt was created; the tour is waiting for a page, element, or available layer. The response contains attemptId.
not_foundA tour with this ID is not loaded.
ineligibleThe tour cannot start; the response contains reason.

Possible values of ineligible.reason are status, schedule, targeting, frequency, page, consent, and conflict. These are normal results, not a Promise rejection. For a manual call, the tour checks publication status, schedule, audience, page, consent, and occupied layers. Frequency limits apply to automatic launches.

Onboarding ​

Enable manual launch in the onboarding editor, publish the guide, and pass its ID:

js
const result = await window.FlowtomateWidget.openOnboarding('ONBOARDING_ID');
if (!result.ok) console.log(result.code);

{ ok: true } means the guide opened. With { ok: false, code }, it did not open: for example, it is not loaded, does not match the visitor or page, or the required layer is already occupied. openOnboarding does not mark a step complete. The visitor completes the step according to the condition the author set in the guide. To close the displayed guide, call window.FlowtomateWidget.closeOnboarding('ONBOARDING_ID').

If a step runs a command in your product, register a handler before opening the guide:

js
const unregister = window.FlowtomateWidget.registerOnboardingAction(
  'create_report',
  async ({ parameters, invocationId, signal }) => {
    const saved = await createReport(parameters, { invocationId, signal });
    return saved ? { status: 'success' } : { status: 'failed', code: 'save_failed' };
  }
);

invocationId helps your code avoid executing a repeated request twice. Return success only after the product operation succeeds; the presence of a handler alone does not complete the step. Call unregister() when removing the handler, for example when the page unmounts. Test the command with a test user and fictional data.

To verify before launch, open the editor's “Check” tab and create a session for the exact address of your test page. Copy the provided code into that page's console: it adds a short token to the address and reloads the widget. After reloading, display the guide with the separate command shown next to the code. Click the buttons yourself and use fictional data.

In this session, the widget shows the published version of the guide and keeps progress only in page memory. It does not record the visitor, events, or steps in regular analytics. The “Check” tab distinguishes the presence of a handler from the result of a command; an event counts only after a matching track call during the walkthrough, and a trait counts only after the expected value is passed. Linked popups and tours do not launch in this session, so test them separately. The session expires after 15 minutes; create a new one after publishing again.

Checklist and feedback ​

js
window.FlowtomateWidget.openChecklist('CHECKLIST_ID');
window.FlowtomateWidget.openFeedback('FEEDBACK_ID_OR_KEY');

Both methods return void. A checklist opens in the panel if it is loaded, content display is enabled, and the panel is available. A feedback form accepts the ID or key of a loaded widget; its display also depends on an available layer and the configured frequency. Check the result on the page. The call itself does not confirm that the content was displayed.

The reference lists all methods. If content did not open, go through the integration checks.