Jump to content
JamieErrota

Auto Ticket Reply

Recommended Posts

Hello,

Happy New Year!

 

I’m trying to get the auto response ticket poster to have a different name. Currently it’s named ‘System’, I’m looking to change this. WHMCS said this is only possible via a custom hook which changes looks at the poster and checks if it’s ‘system’ if so then it changes it.

 

any ideas? 

Share this post


Link to post
Share on other sites

Hi Jamie,

Happy New Year to you too 🙂

It appears your query was resolved by the custom hook provided by Nathan. Feel free to get back to us if you need any further assistance 🙂

 

 

 

Share this post


Link to post
Share on other sites
20 hours ago, JamieErrota said:

Hello,

Happy New Year!

 

I’m trying to get the auto response ticket poster to have a different name. Currently it’s named ‘System’, I’m looking to change this. WHMCS said this is only possible via a custom hook which changes looks at the poster and checks if it’s ‘system’ if so then it changes it.

 

any ideas? 

Could you share the solution?

Share this post


Link to post
Share on other sites

Hello,

For @edvancombr and anyone else who might want to do this. This code was provided by WHMCS directly so I take no credit. Create a hook with the below code:

<?php
use WHMCS\Database\Capsule;

add_hook('TicketAdminReply', 1, function($vars) {

    $newAdmin = 'NEW NAME';

    if ($vars['admin'] == 'System') {
        Capsule::table('tblticketreplies')
        ->where('id',$vars['replyid'])
        ->update(['admin' => $newAdmin]);
    }
});

 

Any problems more than welcome to contact me.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated