boot(id, userProperties?, instanceAttributes?)
Make Command AI available to the user. Before boot
is called, Command AI 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 userId = "12345";
window.CommandBar.boot(userId);
Boot with anonymous user
window.CommandBar.boot(null);
With User Properties
const userProperites = { persona: "foo", isAdmin: false };
window.CommandBar.boot(userId, userProperties);
With Instance Attributes
window.CommandBar.boot(userId, userProperties, {
products: ["help_hub"], // makes only HelpHub/Copilot available!
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 Command AI 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
Command AI options associated with the current session.
Property | Type | Description |
---|---|---|
hmac | string | Identify 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 Command AI 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). |
copilotAPIHeaders | object | Additional 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'} . |