In Fusion, the customized fields in a ticket can be stored using the custom fields. This information can be used to refer to something or take action in another system through HTTP Actions. However, the captured information should be valid to give a reference or take action.
For example, a business captures the details of their orders in a CRM Application. It uses a unique identifier for each order, which can have predefined syntaxes such as ABC123456, ABC123457, and others. While talking to a consumer, an agent captures the order ID in the custom field that can be passed to another system. Before that, the business needs a system to validate the order ID.
To meet this requirement, Ameyo Application Server now features a new Custom Field Type named "Regex". It allows the Voice-Admin to create a Custom Field and define the validation. It accepts "String" type values as per the validation implemented during their creation.
Go to "Process" Tab → Settings of a Process → "Custom Field" to create and manage the custom fields.
Figure: Custom Field Tab
The changes made in the Custom Fields will be visible to the agents only when they log out and re-login. Therefore, it is recommended to make these changes in the non-working hour so that the agent will notice these changes when they login to their working hours. On the top, the following message is displayed.
It is recommended to make changes during non-working hours as they will be visible only once the users login again. You may also have to update some rule actions.
Perform the following steps to create a Regex type Custom Field in an already existing Custom Field Category.
Click "Add" button to add a new Custom Field. It shows the following modal.
Figure: New Custom Field
Provide a name for the new custom field.
Select the category of the Custom Field.
Click "Type" drop-down menu to select the custom field type.
Figure: Types of Custom Field
Select "Regex" as a type of the custom field.
The default data type of "Regex" is "String".
The next step is to provide the Regular Expression. To create a Regular Expression, the Ameyo User can provide a range of letters or numbers, such as the following examples.
[a-z]: It denotes a single small-case letter between "a" to "z".
[A-Z]: It denotes a single capital-case letter between "A" to "Z".
[1-9]: It denotes a single number between "1" to "9."
[a-c]: It denotes a single small-case letter between "a" to "c".
[D-F]: It denotes a single small-case letter between "D" to "F".
Instead of the range, the Ameyo User can provide a constant value such as "ABC", "FII", "2020", or "2021". The following table illustrates some sample Regular Expressions.
Sample Regular Expression |
Sample Valid Value 1 |
Sample Valid Value 2 |
---|---|---|
[A-Z][A-Z][A-Z][1-9][1-9][1-9] |
ABC123 |
XYZ345 |
IFC[a-d][n-p][1-9][1-9][1-9] |
IFCan123 |
IFCep789 |
After entering the Regular Expression, the Ameyo User can provide a sample value in "Test a String" text field and click icon to test whether the provided test value is valid or not.
Example 1: The test value in the following case is valid as per the provided Regular Expression.
Figure: Successful Validation of the test value
Example 2: The test value in the following case is invalid as per the provided Regular Expression.
Figure: Failed Validation of the test value
Example 3: The test value in the following case is invalid as per the provided Regular Expression.
Figure: Another failed validation of the test value
Select other options as per requirement. Refer to this user manual link for details.
Click "Submit" to create a Regex type Custom Field.
If the agent tries to enter the wrong Regex, then the agent will receive an inline error for the Regex field if the provided value does not match the defined pattern.
Figure: Inline Error Message for Regex Field on Agent Console
The validation for Regex type Custom Field will be available in App Framework, Rule Engine, and API also.
If a rule is created for a Regex field already, but that Regex Field is modified, then that rule may not work.