简体   繁体   English

如何在 Zendesk Widget 中打开具体文章?

[英]How to open the concrete article in Zendesk Widget?

Is it possible to open the concrete article using Help Center API in Zendesk Widget?是否可以在 Zendesk Widget 中使用 Help Center API 打开具体文章? When user clicks on some label, I would like:当用户点击某个标签时,我想:

  1. Open Zendesk widget.打开 Zendesk 小部件。
  2. Fill the placeholder with the clicked label text.用单击的标签文本填充占位符。
  3. Load and show the article that contains descriptions for all labels.加载并显示包含所有标签说明的文章。

I've tried to do that:我试过这样做:

window.zE('webWidget', 'open');
window.zE('webWidget', 'helpCenter:setSuggestions', {
  search: `Glossary ${search}`
});

but it just opens a widget and shows the first three articles (the first article is that I want to show).但它只是打开一个小部件并显示前三篇文章(第一篇文章是我想显示的)。

I will appreciate any help or advice how to do that.我将不胜感激任何帮助或建议如何做到这一点。

The behavior you are seeing is actually expected.您所看到的行为实际上是预期的。 The reason being for the 3 article postings is because it's part of the Web Widget's contextual help feature Zendesk has put into their platform.发布 3 篇文章的原因是因为它是 Zendesk 已放入其平台的 Web Widget 上下文帮助功能的一部分。 Using setSuggestions is going to display the first three articles.使用 setSuggestions 将显示前三篇文章。 What I would suggest using is { labels: ['label1'] } and add labels to articles that you will want to appear depending on where the user clicks on your web widget.我建议使用的是 { labels: ['label1'] } 并将标签添加到您希望显示的文章中,具体取决于用户点击您的网络小部件的位置。 Also, it might be best to review your end goal and check through the API provided to see if its exactly possible to achieve the nature of your request.此外,最好检查您的最终目标并检查提供的 API,看看它是否完全有可能实现您的请求的性质。

Cheers,干杯,

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM