Skip to main content

boot(id, userProperties?, instanceAttributes?)

Make CommandBar available to the user. Before boot is called, CommandBar will not be available, even if the snippet has been run on the page they are on.

boot returns a promise which resolves when it is finished and ready.

Examples

const loggedInUserId = "12345"; // example

// Simple
window.CommandBar.boot(loggedInUserId);

// With user properties
window.CommandBar.boot(loggedInUserId, {
persona: "foo",
});

// With instanceAttributes
window.CommandBar.boot(
loggedInUserId,
{},
{
hmac: hmacUserId,
}
);

Method parameters

id Required

string

ID corresponding to the currently logged-in end user. Used to tag analytics events and for end-user personalization (e.g. custom shortcuts, Checklist progress). If you must use anonymous users, pass an empty string.

userProperties

object

Key-value pairs to be associated with the end user for whom CommandBar is being booted. You can filter on these properties from the analytics page in your dashboard. In addition, events passed to a supplied event handler will include metadata you provide via boot.

These properties are stored along with each end-user on the server, and can be used in User property targeting.

instanceAttributes

object

CommandBar options associated with the current session.

PropertyTypeDescription
hmacstringIdentify users with an HMAC of their user ID; this make end user related features, like customizable shortcuts, secure. Learn about identity verification
products('spotlight' | 'checklists' | 'nudges' | 'help_hub')[]A list of products that will be turned on. By default, all CommandBar products will turn on. This can be used to only enable certain features. Products can include 'spotlight', 'checklists', 'nudges' (Product Tours, Announcements, and Surveys), and 'help_hub' (HelpHub and Copilot).
copilotAPIHeadersobjectAdditional headers that Copilot will pass to APIs when calling them. This is commonly used to allow Copilot to call authenticated APIs. For example, {'Authorization': 'Bearer 1234'}.