Tickets resolved by a automatic scenario, but are'nt count as resolved for the agent

  • 31 May 2016
  • 1 reply
  • 51 views


Hi support,




We're facing a problem with an automatic scenario which :




- Set the current agent as the ticket's agent


- Send an email


- Add a private note


- Set a defined type


- Set the ticket as resolved




The problem is that when we look at the reporting, these resolved tickets are note related to me (Morgan) ; this morning I worked on 66 tickets, and solved them, but he just count 3 tickets, instead I set them as resolved. ( => see attachment)




Can you explain us what happened ?




My automatic scenario is in attachment also.




Many thanks,




Morgan (count : snieditions.freshdesk.com)


captured_27_c3_a9cran2016-05-3114.54.53_22732.pngcaptured_27_c3_a9cran2016-05-3114.51.08_22732.png

This topic has been closed for comments

1 reply

I believe that I have a solution but you will have to create 1x Custom Ticket Field, 3x observer rules, 1x Custom App and 1x Scenario.

1) Custom Ticket Field:

Admin > Ticket Fields

Drag and drop a new checkbox field wherever you like. Name it 'Flag Resolved' and make it invisible to customers. Don't forget to save.



Now we have the field that we will use as a flag for triggering the Observer rules:




2) Observer rules:

Admin > Observer > [ New Rule ]

I can not say for sure ( ie, have not tested this ), but it is probable that your statistics are messed up because the ticket status is set as Resolved before the Agent is assigned. To avoid this, we will split the process in stages and have the status change after we assign the agent. That means the order of the following rules must be respected:




2.1) 1st rule:

When 'Flag Resolved' is checked, we will do everything else except setting the status as Resolved and adding the note.




2.2) 2nd rule:

When 'Flag Resolved' is checked, we will set the agent to the agent that checked it.




2.3) 3rd rule:

When 'Flag Resolved' is checked, we will uncheck it ( housekeeping )




3) Custom App:

Admin > Apps > Custom Apps > [ New Custom app ]

This custom app will hide 'Flag Resolved' and reload the ticket page when a scenario ( any scenario ) is executed. This is not my code but code I "borrowed" from the good folks at Freshdesk.




The code is:
<script type="text/javascript">
jQuery(document).on('sidebar_loaded',function(){
jQuery('#helpdesk_ticket_custom_field_flag_resolved_359268').closest('.field').hide();
});
jQuery(document).on('scenario_executed',function(){
location.reload();
});
</script>


IMPORTANT: You must replace the number above ( '359268' ) with the one that corresponds to your instance of Freshdesk ( which you can do by browsing the page source, say by pressing Ctrl+U, and searching for the 'helpdesk_ticket_custom_field_flag_resolved_' string ). If you don't do that the app will not work correctly.




Make sure your app is enabled and that you refresh the cache of your browser.




 



4) Scenario:

Admin > Scenario Automations > [ New Rule ]

This scenario creates your note and sets 'Flag Resolved' as checked, which in turns triggers the Observer rules above.