webjive Posted June 18, 2019 Share Posted June 18, 2019 I don't know of a setting or a way to do this but, maybe someone has done this or knows of a way. We get a LOT of customers who never read the headings in our emails discussing tickets, replies and avoiding duplicate ticket numbers. Any to the question.. Anyone of a way that when you merge two tickets that a templated email could be sent or some other way to auto-repond when two tickets are merged by the admin. We seem to have to use the pre-defined replies a lot for this and this one feature could remove a headache. 0 Quote Link to comment Share on other sites More sharing options...
webjive Posted June 18, 2019 Author Share Posted June 18, 2019 Maybe this could be handled via an API trigger? 0 Quote Link to comment Share on other sites More sharing options...
Remitur Posted June 19, 2019 Share Posted June 19, 2019 When you merge two tickets, the object changes from "whatever the object is" to "whatever the object is [merged]" So, I guess, you can use this hook: https://developers.whmcs.com/hooks-reference/ticket/#ticketsubjectchange (a little further coding will be necessary, because you need to check that "[merged]" does exist in $subject) 1 Quote Link to comment Share on other sites More sharing options...
webjive Posted June 19, 2019 Author Share Posted June 19, 2019 Great thinking and yes, it would create a looping reply when you checked for [merged] in the subject. I added this as a feature request but, I know it could be years or never for an API to get added ;) 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted June 19, 2019 Share Posted June 19, 2019 19 minutes ago, webjive said: I added this as a feature request but, I know it could be years or never for an API to get added 😉 it might be worth posting a link to that feature request, because they can be notoriously difficult to find, which can lead others in a similar intention to create a new request - each of them then only getting one or two votes (pointless) and subsequently being declined by WHMCS for "lack of interest". 0 Quote Link to comment Share on other sites More sharing options...
webjive Posted June 19, 2019 Author Share Posted June 19, 2019 Here's the link. Its still under moderation so, give it a few days ;) https://requests.whmcs.com/topic/addticketreply-api-function-addition Thanks for all the great suggestions 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted June 19, 2019 Share Posted June 19, 2019 2 minutes ago, webjive said: Here's the link. Its still under moderation so, give it a few days 😉 what's a few days in moderation, if you're going to wait years for it to be completed lol 😉 just a thought, but possibly TicketClose could be another avenue to explore because when two tickets are merged, one of them is closed... so at that point, the TicketClose hook point should be triggered... if it's been closed due to a merger, then the ID of the other ticket should have been added to the merge_ticket_id field in the tbltickets table... that ID could then be used to get the ticketid for the AddTicketReply API to send a reply to the newly merged thread. 0 Quote Link to comment Share on other sites More sharing options...
Remitur Posted June 19, 2019 Share Posted June 19, 2019 2 hours ago, webjive said: Great thinking and yes, it would create a looping reply when you checked for [merged] in the subject. Trick: in the hook you need: 1 - remove the "[merge]" from the object 2 - send the answer to the user Doing so, your merged ticket will no have [merged] tag anymore, but you'll not have any loop... and your hook will work even if the user sends two or more messages to be manually merged. 0 Quote Link to comment Share on other sites More sharing options...
webjive Posted June 19, 2019 Author Share Posted June 19, 2019 @Remitur, good point and this would need to be a module vs using the Rules feature in WHMCS from what I'm thinking? Or would the two be used together? 0 Quote Link to comment Share on other sites More sharing options...
webjive Posted June 21, 2019 Author Share Posted June 21, 2019 WHMCS accepted the feature request. Go vote! 0 Quote Link to comment Share on other sites More sharing options...
DennisHermannsen Posted September 4, 2020 Share Posted September 4, 2020 Hi. I tried messing with this - but unfortunately, no hook points are triggered when you merge two tickets. Not even the TicketSubjectChange. Seems like it can't be done 😕 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted September 4, 2020 Share Posted September 4, 2020 (edited) It can be done via AfterCronJob (the one that runs every X minutes). Ticket merge leaves a trace in tblactivitylog. You can use that to trigger your "add reply" automatically via API. You can take as example this hook. I used this approach to send an email on "ticket close via escalation rule" (there was no hook point to detect this particular event). Edited September 4, 2020 by Kian 0 Quote Link to comment Share on other sites More sharing options...
DennisHermannsen Posted September 4, 2020 Share Posted September 4, 2020 40 minutes ago, Kian said: Ticket merge leaves a trace in tblactivitylog Are you sure? I've merged a lot of tickets, and nothing can be traced in the activity log 😅 I'm on v8 beta, don't know if that's why. 0 Quote Link to comment Share on other sites More sharing options...
Kian Posted September 4, 2020 Share Posted September 4, 2020 (edited) Sorry, I misspelled the table. It's tblticketlog (not tblactivitylog). Here's the log: Ticket ID: 47 Merged with Ticket ID: 46 (by Demo Admin) Merged Tickets 47 (by Demo Admin) Edited September 4, 2020 by Kian 0 Quote Link to comment Share on other sites More sharing options...
DennisHermannsen Posted September 4, 2020 Share Posted September 4, 2020 Thanks! You're right 😄 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.