質問
APIを使用してヘルプセンターのWeb Widget(従来版)をカスタマイズするにはどうすればよいですか?
回答
Web Widget(従来版)がヘルプセンターに埋め込まれている場合は、ヘルプセンターのdocument_head.hbs テンプレートファイルを変更して、Web Widget(従来版)APIを使用して設定をカスタマイズします。
カスタムWeb Widget(従来版)設定を追加するには
- Guideで、「デザインをカスタマイズ」アイコン(
)をクリックします。
- 編集したいテーマをクリックして、開きます。
- オプションメニューをクリックし、「コードを編集」を選択します。
- 「テンプレート」セクションで、document_head.hbs をクリックしてコードを変更します。
-
<header class="header">
最初の行の下、および最後のヘッダー行の上に目的のコードを挿入します。
たとえば、ヘルプセンターで Web Widget (従来版) の配置を変更する場合は、次の API 設定を使用します。
<script type="text/javascript">
window.zESettings = {
webWidget: {
offset: { horizontal: '100px', vertical: '150px' }
}
};
</script>
これは、document_head.hbs ファイルで次のように表示されます。
Web Widget (従来版) とヘルプセンターのカスタマイズについて詳しくは、次の記事を参照してください:
翻訳に関する免責事項:この記事は、お客様の利便性のために自動翻訳ソフ トウェアによって翻訳されたものです。Zendeskでは、翻訳の正確さを期すために相応の努力を払っておりますが、翻訳の正確性につ いては保証いたしません。
翻訳された記事の内容の正確性に関して疑問が生じた場合は、正式版である英語の記事 を参照してください。
5件のコメント
Casey Keefe
Hi Zendesk - In partnership with our Premier team, we have identified that something in our theme (Mink) is preventing the customization of Web Widget. This was determined by plugging the code into the ZD Copenhagen theme where the customizations were able to be applied.
Question now is - does anyone have any suggestions on what JS in the theme might be preventing the API calls to the Web Widget? You can view our current Help Center here. Thanks!
0
Casey Keefe
Thank you Gab
Upon further investigation and working with our ZD engineers, it looks like some of these customizations are no longer available now that we have ZD Messaging deployed on the backend (but not yet enabled on the frontend).
0
Gab
Yes, that's definitely possible! There are a wide variety of ways to customize the look and feel of the Web Widget (Classic). Some are built in functionality, and even more options appear when you start working with custom code and the API.
Here are some resources to get you started:
0
Casey Keefe
Hi Zendesk - I am attempting to customize Web Widget for a Brand under our main account (in order to differentiate the Brand), but unfortunately none of the window.zESettings API calls are working for me. At this time, I am trying to change the name of the Title in the Widget as well as the bot icon (please see screen). The Main Zendesk account is currently running Web Widget. The Brand's Web Widget appears the same, with the exception of the yellow theme color:

Is it possible to customize the Brand's Widget? Thanks!
0
Shawn
Hello,
Is this the only method to use use the APIs in the Help Center Web Widget? Looks like editorial access to header.hbs requires Pro or Enterprise level plans. Ideally from a UI and controls prospective it would seem to make more sense that admins should be able to do this via the 'Setup' tab under Channel/Widget since there is an interactive input field here but no way to save changes. Putting in a feature request for this.
Thanks
1
サインインしてコメントを残します。