Launch Resource Center
Opens a Resource Center by its ID. If another Resource Center is active, it will be closed, and the requested one will be launched.
Type Definition
type launchResourceCenter = (
resourceCenterId: number,
options?: {
bypassFilters?: boolean,
sidebarOpen?: boolean
}
) => void
Optional parameters:
bypassFilters(boolean) – If true, launch the Resource Center without checking any targeting or segmentation rules. If false, all page targeting, audience segmentation, and scheduling conditions for that Resource Center will be checked first. Default is true.sidebarOpen(boolean) – If true, the Resource Center will start in an expanded state. Default is false.tab(string) - Overrides resource center's default opening tab. Options are:homeknowledgeBaseaiAssistantproductUpdates
articleId(string) - Select an article for knowledge base to display. Should be used together withtabparameter
Examples
Triggers a Resource Center with default options
userGuiding.launchResourceCenter(1234)
Triggers a Resource Center & Expands it even if the rules don’t match
userGuiding.launchResourceCenter(1234, {
sidebarOpen: true,
bypassFilters: true
})
Triggers a Resource Center only if the rules match. It can be expanded or collapsed.
userGuiding.launchResourceCenter(1234, {
bypassFilters: false,
sidebarOpen: true
})
Open a knowledge base article inside Resource Center
userGuiding.launchResourceCenter(1234, {
tab: 'knowledgeBase',
sidebarOpen: true,
articleId: '123',
})
Open product updates tab inside Resource Center
userGuiding.launchResourceCenter(10, {
tab: 'productUpdates',
sidebarOpen: true,
})
Expand Resource Center
Expands an active Resource Center’s content area.
Type Definition
type expandResourceCenter = () => voidExample
Expands the resource center if it's currently minimized
userGuiding.expandResourceCenter();Collapse Resource Center
Collapses an open Resource Center widget. This will hide the content area and show just the Resource Center’s launcher.
Type Definition
type collapseResourceCenter = () => voidExample
Collapses the resource center if it's open
userGuiding.collapseResourceCenter();Hide Resource Center
Closes the currently active Resource Center widget, removing it from the page.
Type Definition
type hideResourceCenter = () => voidExample
Hides the active resource center
userGuiding.hideResourceCenter();