Kustomer.openKbArticle()
Opens a Knowledge Base article based on the article id.
Use Kustomer.openKbArticle()
to open the chat widget and take the customer to a specific knowledge base article based on the article id.
You can find the article id in Kustomer when you select an article from the Articles settings page under Settings > Knowledge Base.
Example URL for an article: https://<org>.kustomerapp.com/app/settings/kb/articles/<id>/edit
First, initialize chat fully
Kustomer Chat must finish initializing fully with
Kustomer.start()
before you can execute any additional Web SDK methods.Tip: Call other methods inside the callback of
Kustomer.start()
to ensure Kustomer Chat always completes initialization before the code tries to run other methods.To learn more, see Troubleshooting: Kustomer method calls won't execute.
Examples
// Go to an article by article id
Kustomer.openKbArticle 'SOME_ARTICLE_ID');
// Go to the article and run a callback
Kustomer.openKbArticle('SOME_ARTICLE_ID', (response, error) => {
if (error) {
console.error(error);
} else {
console.log('Successfully article conversation');
}
});
Syntax
Kustomer.openKbArticle(articleId, function(null, error))
Parameter | Type | Description |
---|---|---|
articleId | String | Required The article id. You can find the article id in Kustomer when you select an article from the Articles settings page under Settings > Knowledge Base. If invalid, an error will be returned in the callback. |
function(null, error) | Function | Optional A callback that is run after Kustomer.openKbArticle completes.error is either undefined or a native JavaScript Error object. |
Updated over 2 years ago