This article details how to set up each section in the Merge Duplicate Tickets Merging Rules.
In this Article
Adding a New Merging Rule
Entering the Name for the Rule
Merging Window
Matching Criteria
Select how to check if two Tickets are Duplicates
Match on Ticket Fields - Adding Fields for the Matching Criteria
Fields
Removing or Changing Requester from the Matching Criteria
Match on value extracted from text - Add Parsed Value
Adding Additional Parsed Value Rules
Writing your Own Regular Expression
Target ticket status
Filters
Merging Comments
Merging Direction
Other Settings - Copy All Custom Fields
Enabling a Merging Rule
Saving the Changes
Setting up Additional Rules and Enabling or Disabling Merge Duplicate Tickets
Adding a New Merging Rule
To add a Merging Rule, click New rule on the Configuration.
The screen displays for you to enter the details for that Merging Rule.
Entering the Name for the Rule
You can enter a Name for the Rule or, if you leave this blank, the app will automatically assign a Name when you Save the rule.
- The first Merging Rule you add will be automatically named Default Rule.
- Additional Merging Rules that you add will automatically be named Additional Rule 1, Additional Rule 2, and so on.
Merging Window
The setting for Merging Window determines the time within which tickets are considered duplicates. Tickets that are created within the time interval set for the Merging Window are considered for merging.
For example, when the Merging Window is set to "24 hours", if two tickets are created within 24 hours for the settings in the rule (such as by the same Requester) they are considered for merging. If the second ticket arrives more than 24 hours after the first ticket, it will not be considered for merging.
The default for the Merging Window is 720 hours which is 30 days. You can change the number of hours as relevant for your own organization. This can be set up to a maximum of 8760 hours, which is one year.
Matching Criteria
The Matching Criteria determines which fields are used to determine if a ticket is considered a duplicate.
Select how to check if two Tickets are Duplicates
You first select the option for How to check if two tickets are duplicates. You can select
-
Match on ticket fields (this is the default)
OR - Match on value extracted from text. This allows you to extract text from the Ticket Subject and/or one of Ticket Description, Any Customer Message or Requester Name and use this for the matching.
Match on Ticket Fields - Adding Fields for the Matching Criteria
- Ensure Match on ticket fields is selected as the option for How to check if two tickets are duplicates.
- Select the Fields to match on.
Fields
The default is Requester, which is the person who created the ticket. In most cases this is the person's email address and this may have a name associated with it.
By default, the Matching Criteria Field shows as Requester. In this case, if two tickets are created by the same Requester, within the time interval set in the Merging Window, they are considered for merging.
Requester can be changed or deselected from the Matching Criteria. Refer below to Removing or Changing Requester from the Matching Criteria.
- Click Add Field.
A new line is added to the Matching Criteria and the drop-down displays all the ticket fields, including any Custom Fields you have set up in your Zendesk Support.
- Select the Field to add to the Matching Criteria.
Refresh from Zendesk
If you have added new fields in Zendesk, you can reload the list of ticket fields by clicking Refresh from Zendesk. Or, if the Custom Field you need does not already exist when you are setting up the Merging Rule, you can add it from the Zendesk Admin Centre (using a different window) and then click Refresh from Zendesk so you can select it.
Match Blank
When adding a Field to the Matching Criteria, you can enable Match Blank. For example, if you add Subject as a Field and set this as Match Blank, this will also merge the tickets where the Subject is blank in both tickets.
Exclude Value
When adding a field, Exclude Value is only relevant for Custom Fields that you have set up in your Zendesk Support. For example, if you have a Field set up for "Ticket Status", you may want to exclude any tickets from the merge where this is set as "test" so all the tickets with this Field set as "test" always display separately and are never merged.
Removing or Changing Requester from the Matching Criteria
You can set up Merging Rules with Matching Criteria that does not include the Requester. This allows you to match on fields such as Custom Fields in the ticket. For example, you could set up a rule that checked if the "Order Numbers" were the same in two tickets, and this would automatically merge the tickets regardless of the who the Requester was. You can the configure different settings for this Merging Rule to the rule that is applied when matching on the Requester.
When you remove or change the selection of Requester from the Matching Criteria a message displays for you to confirm this.
Click Yes and select the field.
Match on value extracted from text - Add Parsed Value
Instead of matching using the Ticket Fields. you can select Match on value extracted from text and set up rules to extract text from the Ticket Subject and/or one of Ticket Description, Any Customer Message or Requester Name. The app will then use that extracted text to match the tickets.
As part of setting up Match on value extracted from text, you can also checkmark that the app will Only match tickets if they have the same requester.
The value that is extracted is used to search tickets with the same value in the Ticket Subject, Ticket Description, Any Customer Message or Requester Name (as relevant for how you have set up the Merging Rule). If an existing ticket with the same value is found (and this can be from a different requester) the app will perform the merge.
- Select Match on value extracted from text as the option for How to check if two tickets are duplicates.
- Click Add parsed value.
On the right-hand side, the Rule to extract a value from text displays.
- Select Ticket Subject and/or one of Ticket Description, Any Customer Message or Requester Name as the field(s) from which the text will be extracted.
For example, if you select both Ticket Subject and Any Customer Message, this will look for a match in either the Ticket Subject or in Any Customer Message.
In most cases, the Ticket Description is the same as the First Customer Message, that is the message from the customer (the end-user in Zendesk) that created the ticket.
If you have configured Zendesk differently (such as with a description as an internal note followed by the first message from the customer), you can set up the Workflow as Any Customer Message or Ticket Description as relevant.
- Then select the Format of the value to extract.
Use a Pattern to match the value displays preset settings that you use to define what the value that you want to extract looks like.
- When setting up the pattern, you add the following. Add as many of these as possible to ensure an exact match.
Match phrase before the value
You can enter a phrase that appears before the value you want to extract. This phrase will be used in the matching but will not be extracted. For example, if you want to merge tickets on an order number in the ticket, this may have "Order" or "No" before the value.
Match phrase after the value
You can enter a phrase that appears after the value you want to extract. This phrase will be used in the matching but will not be extracted.
Value to Extract
You select one of the following for the Value to Extract:
A Sequence of Letter or Digits
or
An Email Address
Selecting Value to Extract as A Sequence of Letter or Digits
When you select A Sequence of Letter or Digits, the following can be set up.
Starts with can be used if the value to extract always starts with any specific character(s) and or number(s).
Choose a format as relevant for the sequence. This must be selected, for example, "Digits", "Letters, upper or lower case", "Letters, upper case", "Letters, lower case", "Letters or digits".
Set up the number of Characters long for the values to extract.
You can enter this as the range of the number of characters (for example, between 5 and 8).
To set this as an exact number of characters, enter the same number for each (for example, between 6 and 6).
If relevant, enter any characters for the Followed by to define any specific character(s) and/or number(s) that always follow the value to extract.
The following is an example of setting up the Pattern for the matching and for the value to extract.
With this rule, the following tickets would be matched on the text in the Ticket Subject, even though the tickets are from different Requesters.
Selecting Value to Extract as An Email Address
Email Address would usually be used if the ticket has been created in certain contexts, for example, when a customer submits a form, and the email in the ticket has been generated with structured content such as "Email Address: annexample@gmail.com". For this, you would usually add the text that needs to match before or after the email address.
- You can test the pattern by entering a test sample and clicking Test. This displays the value that would be extracted.
The following is an example of testing the example above with the pattern of A Sequence of Letters or Digits.
- Click Submit. The parsing rule displays in the Merging Rule.
From here you can edit the parsing rule by clicking the Edit icon. or delete it by clicking the x.
- If relevant for the Merging Rule, checkmark Only match tickets if they have the same requester.
Adding Additional Parsed Value Rules
If needed, you can add additional rules for parsed values in the same way. Where there is more than one rule, either of these have to match. The extracted value is taken from the first extract rule that matches in the sequence of rules.
Writing your Own Regular Expression
You can also select Write my own Regular Expression. Due to the complexity of Regular Expressions, only use this if you have expertise in writing these. If you need help with more complex rules, contact Swifteq with the Live Chat or email support@swifteq.com.support.
If you select Write my own Regular Expression, an area displays for your to enter the expression and the reminder displays that using this option requires expertise in regular expressions.
Target ticket status
A new ticket is only merged as a duplicate ticket if the existing ticket has one of the Statuses set in the Target ticket status in the Merging Rule.
The default for this is "Any status, except Solved or Closed". So by default, when a new ticket is created, if the existing ticket is "Solved" or "Closed" they will not be merged.
You may decide that you want to change this so that, for example, you want to merge into a ticket even if it is "Solved". In this case you would select all the options for the Target ticket status.
Or you may decide that you want to configure this to exclude tickets that have a status of "On Hold" and "Solved". In this case you would select all Statuses except "On Hold" and "Solved".
Filters
The Filters determines which new tickets are considered for merging. By default, there are no Filters set initially.
A common use of the Filters is to exclude tickets from automated systems, which come from the same email address or from the same domain.
Adding a Filters Condition
- Click Add condition.
- A new line is added and the drop-down displays the tickets fields that can be used as a Filter.
- Select the ticket Field to add to the Filters.
- Select whether the condition is applied as "Is Any Of" or "Is None Of".
- Add any values to apply.
You can include all the values that you want checked for against that Field in the same condition and press the Enter key after each value.
In the following example, the Filters are being set up to exclude tickets sent from the email "notifications@junk.com" and from the domain "@auto,com". When adding a domain as the value, include the @ sign.
You could also use this to add your own domain if you do not want internal tickets to be merged.
For Fields that hold set values in your Zendesk Support, such as Group and Priority, you select from the list of set values.
In the following example, the Filters are being set with two conditions. This applies Filters to exclude tickets from the selected email address or the domain specified in the first Filter, and where the tickets are also for the Group "Support".
Merging Comments
For each Merging Rule, you can customize the Comments that are added when tickets are merged.
Expand the section to see the options.
You can change the text that is added for both the ticket that is being closed and for the ticket being merged into.
In the Comment for ticket being closed (source ticket) use the following placeholders for the target ticket. These add the Ticket ID and Subject of the ticket being merged into.
- {ticket_id}
- {ticket_subject}
In the Comment for ticket being merged into (target ticket) use the following placeholders for the source ticket. These add the Ticket ID, Subject and Description of the ticket that is being closed.
- {ticket_id}
- {ticket_subject}
- {ticket_description}
For both the Comment for ticket that is being closed and the Comment for ticket being merged into you can checkmark Requester can see this comment (public comment) which will add the comment as a Public Reply instead of as an Internal Note and send it to the Requester.
Merging Direction
For each Merging Rule, you can select the Merging Direction to set it to merge the newer ticket into the older ticket, or to set it the other way round to merge the older ticket into the newer ticket.
Expand the section to see the options.
You can set the Merging Direction for each of the following types of ticket or channel:
- All tickets except chats, messaging and calls
- Chat and messaging tickets
- Tickets created from calls
The Merging Direction for each is initially set with a default.
- The default Merging order for all tickets except chats, messaging and calls is to merge the newer ticket into the older ticket.
- The default Merging order for Chat and messaging tickets and Tickets created from calls is to merge the older ticket into the newer ticket. The reason for this is that, usually for chats, messaging and calls, the agent is still working on the ticket after it is created. When the older ticket is merged into the newer one, the older ticket is closed.
Merging into the newer ticket ensures there is no disruption to the agent's workflow or to the current communication flow between the agent and the customer.
You can change the direction if required for the Merging Rule by selecting from the drop-down list,
Other Settings - Copy All Custom Fields
In the Other Settings, you can enable Copy all custom field values from the target ticket to the source ticket before merging.
When this is enabled, all the custom field values from the target ticket (the ticket that remains open) are copied over to the source ticket (the one that will be merged and closed).
This is helpful for reporting purposes so that the merged tickets are not excluded from the calculations.
Enabling a Merging Rule
When you have set up the new rule, enable it by clicking the Enable/Disable toggle at the top.
Saving the Changes
When you have added a new Rule or made any changes, ensure you click Save to save the settings.
A message displays to show that the changes were saved. The Configuration displays and includes the saved Rule. A Rule that is Enabled shows with a green dot.
A Rule that is Disabled shows on the Configuration with a grey dot.
Once you have added a Merging Rule to the Merge Duplicate Tickets, the Swifteq New Ticket Trigger is created in your Zendesk Admin Center and the View Trigger button is included in the Merge Duplicate Tickets Configuration. You can click this to display the Swifteq New Ticket Trigger in your Zendesk Admin Center.
Setting up Additional Rules and Enabling or Disabling Merge Duplicate Tickets
You can set up multiple Merging Rules. For example, you can set the rules to apply for different Filters or Conditions, such as for a different "Group" or for a different "Brand".
Refer to Setting up Additional Rules in Configuring the Merge Duplicate Tickets App.
The Merge Duplicate Tickets app is initially disabled. We recommend that you review the Merging Rules and make any changes to the merging criteria and filters, and then enable merging. Refer to Enabling Merge Duplicate Tickets.