The impacted ticket count against each rule under admin>>automations is only to give an overview of the number of tickets impacted by the particular rule. 

Customers will not be able to expand and see the list of ticket IDs.




As an alternate solution, customers can add an additional action to each of the automation rule to add a tag so they can get the list of impacted tickets by filtering based on tags,




Filtering by tags can be either done via analytics or ticket list view page where we can add the filter -  tag contains




Request for impacted tickets


If at all any special requests come in from the customer to get the list of ticket IDs impacted by an automation rule mostly time trigger rules, the same can be fetched from our internal logs. 

Please note that this is a special request and should not be entertained unless very critical.


Steps to get the impacted tickets,


1. Log into Haystack - https://logs.haystack.es/app/discover. The URL of the haystack might be different based on the account pod details. Pod details can be seen in DevOps

https://logs.haystack.es/app/discover. - poduseast

https://logs-in.haystack.es/app/discover - podapsouth

https://logs-euc.haystack.es/app/discover - podeucentral

https://logs-au.haystack.es/app/discover - podau


2. Enter the search query -


supervisor" AND "rule id” AND “A=accountid”

rule_id -  is the unique ID associated with each rule and can be seen in the address bar when viewing a particular rule

accountid - Internal ID associated with each account and can be retrieved from DevOps

3. You will get logs as shown below.


4. The next step is to narrow down the exact issue reported time. Get the job id & search it again in the HayStack.  Here I'm choosing the event that happened on May 14th, 2020, 09:52:15.432.


5. If there are no matching conditions, then you can see the logs printed as executed=0. There were 5 tickets executed for the event selected. ( executed=5).


6. Now take this id and use it in the following query in Haystack :


“Acc id” AND “job_id” AND “SET” AND “helpdesk_tickets”


7. Every time a supervisor rule executes on a ticket, it would update a table called helpdesk_tickets in the DB.


8. The results for one specific ticket would look something like this :


[e311e713-8f06-49e9-b185-9bbbd069201c] [1437a85b6c1b02d98aaad150]   [1m[36m (2.0ms)[0m  [1mUPDATE `helpdesk_tickets` SET `updated_at` = '2022-01-04 13:59:57', `cc_email` = '--- \n:cc_emails: \n- test1@Test.com\n:fwd_emails: []\n\n:reply_cc: \n- test1@Test.com\n:tkt_cc: \n- test1@Test.com\n:bcc_emails: []\n\n:tkt_bcc: []\n\n' WHERE `helpdesk_tickets`.`id` = 60068217334 AND `helpdesk_tickets`.`account_id` = 1301047


9. The id highlighted in the log snippet above is the backend ticket id of one such impacted ticket. If there are 10 tickets for a specific time range, there would be 10 results shown. Haystack would load at most 2000 results for a specific time range. 


10. We need to reduce the timestamp further to fetch all the results in case the count exceeds 2000 and perform this in batches. In our case here, since the impacted count is 10K, we can fetch the results in about 5 batches.


11. Once this part is clear, completely load the first 2000 results in haystack. Then select all (using Ctrl+A) and paste them into a sublime text editor.


12. Our motive is to extract only the backend ticket ids from these results. To achieve this, use Ctrl+F → Select Regular expression→ use \d{11} →Find all



Doing this would select all the 11-digit characters. Our backend ticket ids have 11 digits in this case, so we can extract them this way.


Transfer these IDs to a different file and use Ctrl+Shift+L--> Right arrow--> comma to separate them using a comma and save them.


NOTE : The Backend Ticket IDs may not always have 11 digits. Please modify the regex accordingly if it is different.


Here's a short video demonstrating the same as well - https://share.vidyard.com/watch/kDkMaDa2nntT7rswN7Ty2d? 


13. Please raise a ticket to Support L2 with this file and they would be able to help with the corresponding display ids. 

Skim through the Display IDs shared and cross-check a few of them with the ticket activities in the respective account to ensure everything is in place before it can finally be shared with the customer.