Skip to main content

Pages

Pages, although humble, are some of the highest leverage building blocks in Command AI. They will allow users to teleport around your app.

More simply, you can create a Page for any view in your product to allow users to quickly jump there from different Command AI widgets.

Set up Pages in the Dashboard

Setting up a page is super-duper easy (idiot-proof?). All you need to do is pop open Dashboard -> Pages and create a new page.

How are Pages used in Command AI?

Once you've set up a Page, you can re-use it in any Command AI experience:

Ok, but what about Pages with dynamic URLs?

Dynamic URLs are URLs that don’t look the same user-to-user. For example, maybe your URLs include a user-specific parameter like an organization ID: the 424242 in /home/424242/settings. Command AI handles these dynamic URLs through a fancy-sounding topic called "interpolation" (break that out at your next party, we recommend). To interpolate a value, use the double curly brace syntax (like {{this}}), so to handle a dynamic organization ID, you'd use something like /home/{{metadata.org_id}}/settings.

Where did the metadata value come from?

Metadata is any dynamic data that can change from user to user or even page to page.

How to make Page navigation snappy

Modern apps often use something called SPA's to make pages loads feel freaky fast. These work by only loading the data that's different from page to page. If your app is built with an SPA, you'll definitely want to hook Command AI up to your SPA, so that Command AI Pages feel freak fast, too.

To do so, you'll share your app's "router" with Command AI. It requires a developer to set up, but is an easy change that almost always needs to be done just once.