company logo

Help center

Go to Gleap
Privacy policyDocs
Powered by
All collectionsBuild with GleapControl the widget from your code

Control the widget from your code

Open the messenger from your own buttons, launch a specific flow, and react to what the user does.

Rami MagdiยทSeptember 11, 2026

The launcher is one way in. The SDK is the other, and it's how you connect Gleap to the help menu, empty states and error screens you already have.

All examples are JavaScript; the other SDKs have the same methods.

Open and close

Gleap.open();
Gleap.close();
Gleap.isOpened(); // true / false

To run without the floating launcher entirely โ€” your own button, nothing of Gleap's:

Gleap.showFeedbackButton(false);

Open a specific place

Landing someone on the messenger home when you know what they want is a wasted click. Each of these opens straight to the point:

Gleap.openHelpCenter();
Gleap.openHelpCenterArticle("42");
Gleap.openHelpCenterCollection("7");
Gleap.searchHelpCenter("invoice");
Gleap.openConversations();
Gleap.startConversation();
Gleap.openNews();
Gleap.openFeatureRequests();
Gleap.openChecklists();

Most take an optional showBackButton. Pass false when you're sending someone to one specific thing and a back button would just offer a place they never came from.

A help icon that runs searchHelpCenter with the current screen's name is a small change that answers a lot of questions before they're asked.

Start a flow

Gleap.startBot("BOT_ID");
Gleap.startClassicForm("FORM_ID");
Gleap.startProductTour("TOUR_ID");
Gleap.startChecklist("CHECKLIST_ID");
Gleap.showSurvey("SURVEY_ID");

This is how a tour starts after your own onboarding step rather than on a page rule, or a bug form opens from your error boundary with the failure already in context.

For AI:

Gleap.askAI("How do I export my data?");
Gleap.startAgent("AGENT_ID", {
  initialQuestion: "How do I export my data?",
});

Give the ticket context

Set these before opening a form, and they land on whatever ticket gets created:

Gleap.setTicketAttribute("screen", "billing-settings");
Gleap.preFillForm({ subject: "Payment failed" });
Gleap.startClassicForm("bugreport");

Anything you can set here is something the customer doesn't have to type and an agent doesn't have to ask for.

React to what happens

Gleap.on("initialized", () => {
  // safe to call other Gleap methods
});

Gleap.on("open", () => {});
Gleap.on("close", () => {});
Gleap.on("checklist-completed", (data) => {});

Waiting for initialized matters when your code runs early โ€” it's the fix for calls that appear to do nothing on first load.

Handle links yourself

Gleap.setUrlHandler((url, newTab) => {
  // route internally instead of a full page load
});

Worth doing in a single-page app or a native shell, where the default behaviour would reload everything or open a browser on top of your app.

info icon
Every method here has its arguments documented per platform at docs.gleap.io. The list of what exists is in the SDK method index.

Did this answer your question?
๐Ÿ˜ž
๐Ÿ˜
๐Ÿ˜