The Conditional Fields app enables administrators to hide and show fields in tickets to give agents and end-users a better user experience.
For example, if your ticket has a custom field that asks users to select an operating system, you can have two additional, hidden conditional fields -- one listing the latest Mac OS X versions and the other listing the latest Windows versions. If the user selects Windows as their OS, the field listing the Windows versions is shown. The field listing the OS X versions remains hidden.
The Conditional Fields app is available as a Professional Add-on (as part of the Productivity Pack Add-on) and on Enterprise. Administrators can create and manage conditional fields for regular tickets or ticket forms (see Creating ticket forms to support multiple request types (Enterprise).
Topics covered in this article:
- Installing the app in your Zendesk
- Making fields conditional in the agent interface
- Making fields conditional in the request form for end-users (Guide Professional)
- Making conditional fields required
Installing the app in your Zendesk
Administrators can install the app, and configure it to apply to agents in certain roles.
To install and configure the Conditional Fields app
- Click the Admin icon () in the sidebar then select Apps > Marketplace.
- Click the Conditional Fields application icon.
- On the app details page, click the Install App button on the upper-right side of the page.
- Configure the following items:
- Title: Required. Enter a title or accept the default title.
- Remove conflict prevention warnings: Optional. Select this if you don't want to receive conflict warnings.
- Enable role restrictions: Optional. Select this to restrict access to this app to certain roles. When you select this option you can then choose the roles that you want to have access.
Note: Role restrictions are typically not recommended for the Conditional fields app. If a role is restricted from the app, agents within that role will not see your configured conditions applied to ticket fields. They will simply see all fields on the ticket form. Administration for the conditional fields app is already locked down to the Admin role, so there is no need to worry about non-admin agents editing the configuration.
- Click Install.
Making fields conditional in the agent interface
Agents can use the agent interface in Zendesk to create or update tickets. Administrators can make fields in the agent interface appear only when the agent selects a certain value in another field.
Before you start, make sure you add all the fields you'll need in the ticket, including the fields that you want to make conditional. For more information, see the following topics:
- Adding and using custom ticket fields
- Creating ticket forms to support multiple request types (Enterprise)
To make a field conditional
- Make sure Agent is selected in the upper-right corner.
- Click the Conditional Fields icon () in the left sidebar.
- If you're using ticket forms, select the ticket form you want to work on.
- In the Fields column, select the form field that will control whether or not the conditional field is shown.
For example, when a user selects a specific value in the control field, the conditional field will be shown.
- In the Values column, select the value in the control field that the user must choose before the conditional field is shown.
- In the Fields to Show column, select the conditional field to show.
This field will be hidden by default. It'll only be shown when the user selects the specified value in the control field.
- Repeat the steps above to make other fields conditional.
Note: You can only use each field once. You can't reuse a field you've already set conditions for.
You can check your existing conditions in the left sidebar.
Making fields conditional in the web form for end-users (Guide Professional and Enterprise)
End-users can use the web form in the Help Center to submit support requests. If you have Guide Professional or Enterprise, you can make fields in the web form appear only when the end-user selects a certain value in another field.
To make fields conditional
- Select End-user in the upper-left corner of the screen.
- Make your fields conditional as described in Making fields conditional in the agent interface above.
Make sure to save your work.
- Click the Save and generate rules for the Help Center button in the left sidebar.
The app generates the code to insert in the HTML of your Help Center.
- Copy all the generated code into your computer's Clipboard or in a text file.
- In Guide, click the Customize design icon () in the sidebar.
- Click the theme you want to edit to open it.
- Click the options menu, then select Edit Code.
You must have Guide Professional or Enterprise to edit your Help Center theme.
- In templates, select document_head.hbs.
- In the code view, paste the code you generated above.
- Click Save in the top right to save your changes.
Making conditional fields required
You might want certain fields to be required, but still to only appear if they meet the conditions configured in your Conditional Fields app. To do so, you can set fields to required from within the Conditional Fields app.
You cannot use the required fields feature of the Conditional fields app for fields that are already marked as required in Zendesk. If you want to use the required feature of the Conditional Fields app, make sure your ticket fields aren't already marked as required for the same group (agents or end-users) from the Admin menu.
If a field is marked as required within the Conditional Fields app, and the app displays the field on a ticket, then agents won't be able to submit any update until they fill in the field. The Submit button will be grayed-out and unavailable until the required fields from the app are filled in.
- Click the Conditional Fields icon () in the left sidebar.
- Configure conditions as described in Making fields conditional in the agent interface or Making fields conditional in the request form for end-users above.
- In the Fields to show column, click Required in the top right.
- Check the box that appears next to the selected field.
- Click Done.
- Click Save.