Web Widget(经典)允许您以多种方式自定义联系表格中显示的信息。在这篇文章中,我们将讨论以下自定义:
- 将自定义工单字段添加到 Web Widget(经典)默认联系表格
- 移除默认联系表格和工单表格中的姓名字段
- 将默认联系表格和工单表格中的姓名字段设置为必填字段
- 在 Web Widget(经典)中使用不同的工单表格
本文章涵盖以下主题:
相关文章:
将自定义工单字段添加到默认联系表格
使用任意 Support 服务模式的客户都可以选择在 Web Widget(经典)联系表格中显示一个、两个或所有可见的可编辑自定义工单字段。在某些使用量服务模式中,您可以选择在默认联系表格中显示任意数量的自定义工单字段。有关自定义工单字段的信息,请参阅在您的工单和支持请求表格中添加自定义字段。
Web Widget(经典)不支持系统工单字段,例如优先级字段。当从帮助中心访问它们时,它们显示在默认联系表格(和任何其他工单表格)中,但不会显示在 Web Widget(经典)中。Web Widget(经典)支持使用工单表格对字段重新排序,但不支持在联系表格中进行此操作。
正则表达式 (Regex)、日期和多选自定义字段无法在 Web Widget(经典)中使用。
在默认联系表格中显示自定义工单字段的步骤
- 在管理中心,单击侧栏中的
渠道,然后选择经典 > Web Widget。
- 在基本设置标签中,选中联系表格复选框,然后单击自定义工单字段下拉菜单。
- 选择您要在联系表格中显示的自定义工单字段,或选择全选。
- 单击保存。
在 Web Widget(经典)中启用多个工单表格
在 Zendesk Suite 或 Support Enterprise 或 Enterprise Plus 服务模式下,您可以在 Web Widget(经典)中使用多张工单表格。有关工单表格列表和工单表格工作方式的一般信息,请参阅创建工单表格以支持多种请求类型。
工单表格允许您根据客户提出的请求类型自定义联系表格中显示的字段。要使用此功能,您必须已创建多个工单表格。
在 Web Widget(经典)中启用工单表格的步骤
-
在管理中心,单击侧栏中的
渠道,然后选择经典 > Web Widget。
- 在基本设置标签中,选择联系表格复选框,然后选择工单表格复选框。
- 单击保存。
工单表格开启后,当客户单击“给我们留言”按钮时,他们将被要求从您所有活跃的工单表格中选择一个符合其需求的表格:
当他们进行选择时,联系表格将显示该工单表格特定的字段。
在 Web Widget(经典)中自定义字段描述
您可以添加自定义工单字段及其描述到 Web Widget(经典)中的默认联系表格。要显示这些内容,您必须从 Web Widget(经典)管理员设置的自定义工单字段选项中选择字段。
但是,请记住,Web Widget(经典)不支持系统字段,例如优先级字段。这与服务模式类型无关。当从帮助中心访问它们时,它们显示在默认联系表格(和任何其他工单表格)中,但不会显示在 Web Widget(经典)中。
工单表格并非在所有使用量服务模式中都可用。如果在您的服务模式中可用,您还可以在工单表格中包含自定义字段及其描述。要显示自定义工单字段及其描述,您必须在 Web Widget(经典)设置中启用工单表格选项。
您可从工单字段管理页面创建并编辑工单字段描述。有关工单字段的更多信息,请参阅关于工单字段。
添加字段描述的步骤
- 在管理中心,单击侧栏中的
对象和规则,然后选择工单 > 字段。
- 单击需要描述的字段的名称。
- 在用于终端用户部分,单击可编辑。
- 输入字段的描述,然后单击更新字段。
高级自定义:有背景信息的工单表格
通过修改 Web Widget (Classic) JavaScript API 中的 zESettings 对象,您可以根据终端用户当前正在查看的网页限制他们看到的表格,为用户打造更多自定义体验。有关使用 API 的信息,请参阅 Web Widget(经典)的高级自定义。
在您要修改的网页代码中,更新 zESettings 对象以包含您要显示的工单表格的 ID 号。您的工单表格 ID 列在工单表格管理页面的 URL 中。
查找工单表格 ID 号的步骤
- 在管理中心,单击侧栏中的
对象和规则,然后选择工单 > 表格。
- 单击您要隐藏或用作独立表格的表格名称。
- 记下地址栏中的表格 ID:
使用以下示例修改您的网站代码。
显示单个工单表格:
<script type="text/javascript">
window.zESettings = {
webWidget: {
contactForm: {
ticketForms: [
{ id: ###### }
]
}
}
};
</script>
显示两个工单表格:
<script type="text/javascript">
window.zESettings = {
webWidget: {
contactForm: {
ticketForms: [
{ id: ###### },
{ id: ###### }
]
}
}
};
</script>
根据需要添加其它 ID 到 zESettings 对象。
高级自定义:预填充文本字段
您可以使用新设置来预填充某些字段。您可以针对不同的区域设置使用不同的字符串,或者通过将星号 (*) 用于区域设置,从而对所有区域设置使用一个字符串。这类似于其它可自定义的文本字符串,如联系表格标题。
要预填充像 'subject' 和/或 'description' 这样的系统字段,请按下面的方法更新 zESettings 对象。
示例:预填充的描述文本
使用以下代码:
<script type="text/javascript">
zESettings = {
webWidget: {
contactForm: {
fields: [
{ id: 'description', prefill: { '*': 'This is prefilled description text' } }
]
}
}
};
</script>
示例:预填充的自定义字段:
使用以下代码:
<script type="text/javascript">
zESettings = {
webWidget: {
contactForm: {
fields: [
{ id: #####, prefill: { '*': 'Desired text' } }
]
}
}
};
</script>
在此代码块中,id: #####
是自定义字段标识符。
您可以选择始终在所有表格中预填充特定的字段,或在特定的表格中单独预填充。
代码示例:不同表格中相同字段的不同文本:
<script type="text/javascript">
window.zESettings = {
webWidget: {
contactForm: {
ticketForms: [
{
id: ###TicketFormID###,
fields: [
{
id: 'description',
prefill: {
'*': description
}
}
]
},
{
id: ###TicketFormID###,
fields: [
{
id: 'description',
prefill: {
'*': 'different description'
}
}
]
}
]
}
}
};
</script>
38 条评论
Anaida Walia
How can I have the email & name fields pre-populated? considering my platform has all the user details already - we also have SSO turned on for the knowedge guide
0
Judy Correia
Is it possible to create a form specific for messaging only that is not visible in the webform?
0
Gabrielly
Olá é possivel ocultar o campo nome e email do formulario? Pois deixo desmarcado o campo Mostrar campo de nome e mesmo assim ele aparece no chat
0
Kaitlin Hilts
I don't have the web widget option. Under 'Classic', I just see 'Mobile SDK'
0
James G
Once you confirm the that type of widget you are using is Classic and still not able to see the settings mentioned in this article, feel free to send us a ticket so we can further check - Contacting Zendesk Customer Support
Hello Milena,
Yes, you can use the method in this section Advanced customization: Pre-populating contact form text fields of the article to achieve it. However, please be advised that hiding a custom ticket field in the contact form within the Web Widget (Classic) is currently not supported. Here's a feedback about that - Feature Request: Hide ticket fields in web widget. Lastly, one of the requirements for adding a custom ticket field to the contact form is that customers should be able to edit it, and setting it to "Customer can view" means the ticket field cannot be added to the contact form hence we won't be able to prefill that field.
0
Dália Santos
Entendo que seu questionamento seja em relação ao formulário do web widget descrito neste artigo. Nesse caso, infelizmente não é possível incluir imagens, veja aqui tudo que é possível personalizar de forma avançada no formulário Web Widget Contact Form API.
0
Matheus Borges
É possível incluir imagens no formulário web?
Gostaria de deixar um exemplo de como queremos o documentado solicitado.
0
Milena Rusanova
Hi,
We would like to add some additional information to the request, but not give the end-user the option to delete or modify it.
For example, if the customer wants to contact support with the web widget, because he has encountered an error on our website, we would like to send the error code to the support agent.
Can I use the web widget script with "prefill" to add information to a custom ticket field that is not displayed to the end user?
Or make a field read-only, so the customer will still see it in the widget, but won't be able to delete the content?
I tried to add a text field with settings "Customer can View", but it does not appear in the widget.
Does this mean we won't be able to prefill it?
Thanks!
0
Aimee Spanier
Hi, Ester Marlasca. Can you confirm for me that you're using the older Web Widget (Classic), and not the messaging Web Widget?
Comparing the Zendesk Web Widgets includes some ways you can tell the difference.
0
Ester Marlasca
I don't think this article is up to date anymore, the edit section of the web widget looks completely different.
0
登录 to leave a comment.