Skip to main content

setHelpHubFilter(filter)

Set the HelpHub to only include articles with matching labels/tags. This filter applies to both HelpHub and Copilot.

Currently only supported for Zendesk labels and Wordpress tags.

Examples

Include articles with Article and Video labels

const labels = ["Article", "Video"];
window.CommandBar.setHelpHubFilter({ labels: labels });

Match articles according to a user's feature set

if (!user.isPaid) {
window.CommandBar.setHelpHubFilter({ labels: ["Free"]; });
} else (
window.CommandBar.setHelpHubFilter({ labels: ["Free", "Professional"]; });
)

Method parameters

filter

object

Filter to apply

PropertyTypeDescription
labelsstring[]List of labels. Any articles tagged with matching labels will be displayed in HelpHub and all others will be excluded.