Using regex, or regular expressions, can help you validate input in Zendesk forms and improve the quality of incoming requests.
For example, if you need an order number, customer number, or IBAN to process a request properly, you can ask for this information in a ticket form. With a regex field, you can define the pattern the input must match in order to be accepted. This helps reduce common input errors.
Especially in Zendesk and Zendesk Guide, you can use contact forms both internally and publicly. With a dedicated regex field, you can define the required format for an input.
Use cases for Zendesk regex
Regex fields can be helpful in many situations, for example when asking for:
- Customer numbers
- Order numbers
- Item numbers
- VAT IDs
- IBANs
- License plate numbers
Creating a new Zendesk regex field
To create a new regex field in Zendesk, follow these steps:
- Open the Zendesk Admin Center.
- Go to Objects and rules → Tickets → Fields.
- Click Add field.
- Select Regex as the field type.
- Enter a field title and, optionally, a description.
- Define whether the field should be visible and editable for end users.
- In the field Regular expression to validate this field, enter the desired regex expression.
- Save the field and then add it to the relevant ticket form.
Examples of regex expressions
| To be checked | Regex |
|---|---|
| Email-Adresses (i.e. happycustomer@company.de) | ^[^\s@]+@[^\s@]+\.[^\s@]+$ |
| Postcode (5 digits) (i.e. 12345) | ^\d{5}?$ |
| Order ID starting (i.e. O2023-1234567) | ^O\d{4}-\d{7}$ |
Automatic data extraction from tickets
For use cases where information is not captured through form fields but is already included in the ticket text, automatic extraction using regex can be a useful option.
With the Ticket Parser Extract Patterns by Knots, information such as order numbers, customer numbers, IBANs, or other IDs can be automatically extracted from ticket texts, such as emails, and stored directly in custom Zendesk fields.
This reduces manual effort, avoids copying and pasting data, and makes it possible to use the extracted information in macros, automations, and other processes.
Interested in regex and automation?
Would you like to learn more about using regex in Zendesk or custom automation solutions? Feel free to get in touch.
Comments
0 comments
Please sign in to leave a comment.