Start a conversation

Configuring Regular Expression Fields

Overview

The Regular Expression field is a field type that only permits users to enter values that match the 'regular expression' specified in the field.

 


  

Diagnosis

A regular expression (RegEx) defines a search pattern for strings. In Kayako, you can create this type of field which lets you enter a regular expression that Kayako will use to validate any information users enter in this field. This field type is helpful if you want to collect important information accurately that will help your support team resolve the issue faster.

 

Back to top


 

Prerequisite

  • To add custom fields in Kayako, you will need an administrator account with either the 'Manage conversation fields' or 'Manage custom user and organization fields' permissions, depending on the type of field you're creating. 
  • Knowledge of regular expressions - If you want to read up on regular expressions or test out some of your own, we recommend a tool like PHP Live Regex.

Back to top


 

Solution 

To create regular expression fields:

  1. Sign in to Kayako and go to the admin area.
  2. Click Custom fields under Customizations.
  3. Depending on the kind of field you're creating, click either Conversation fields, Organization fields, or User fields on the sidebar.
  4. Here, you'll see a list of system and custom fields that have been created already. Click the New field button to start customizing a new one.

    Fields_Create.jpg
  5. Choose the Regular expression option.
  6. In the Field title text box, enter a descriptive title for the field.
    NOTE: This is only an internal title — it will not be visible to your customers.
  7. If you're creating a conversation field, you can make it mandatory for your agents when updating or resolving a conversation. Just check the Creating, replying to, or updating a conversation and/or the Resolving a conversation box.

    mceclip0.png
  8. Check the Customers can see this field box to make the field visible to your customers.
  9. In the 'Field title for customers' text box, enter a label for the field.
  10. In the 'Field description for customers' text box, enter a brief description of the field.
  11. You can make conversation and user fields usable by your customers as well. Check the Customers can edit this field box to enable your customers to use the field, and the 'This field is required for customers' box to make it mandatory.
  12. Enter the regex text in the Regular expression field.

    mceclip0.png
    • NOTE: This example will match the word "this" followed by one or more whitespace characters followed by the word "is" followed by one or more whitespace characters followed by the word "text".
  13. When you've finished, click the Save button.

 

Back to top


 

Confirmation

Once your field is created, any new field you create will be available to add and edit on either forms, organization pages, or user profiles. They'll also be available when building SLAs, and other automations. If you're on the Growth, Scale, or Enterprise plans, and you've enabled multiple languages for your Kayako, you can add translated names, descriptions, and values for your fields.

If a user enters a value that does not match the regular expression, they will not be able to submit the form and will receive the error 'The value of the field is invalid'.

mceclip1.png 

 

Back to top

Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. ATLAS

  2. Posted

Comments