Jump to content
DennisMidjord

Answer and Close ticket

Recommended Posts

It seems like a lot of clients have no idea that they can close their ticket when their issue is solved. We want to add a button called "Answer and Close ticket" to make it more obvious for the customer that they should close tickets when an issue is fixed.

I've been trying to mess with this for some time now, but it can't seem to make it work. Has anyone done this before in WHMCS?

Share this post


Link to post
Share on other sites

What you can do is edit the template for the ticket reply and add the button.  Then use a hook such as ticketuserreply or what might be better is the view ticket hook.  Either hook used, you could then check $_POST to see if the close submit button was used.  If the answer and close button is used, then you would use the updateticket API with status set to closed.

Share this post


Link to post
Share on other sites
On 30/04/2019 at 11:10, DennisMidjord said:

It seems like a lot of clients have no idea that they can close their ticket when their issue is solved. We want to add a button called "Answer and Close ticket" to make it more obvious for the customer that they should close tickets when an issue is fixed.

another option would be to auto-close the ticket after a period of inactivity...

https://docs.whmcs.com/Support_Tickets#Auto_Closing

Quote
  • This feature allows you to have support tickets automatically closed after a certain time of inactivity has passed.
  • To set the length of time of inactivity before closure, go to Setup > Automation Settings > Support Ticket Settings > Close Inactive Tickets and enter the time in hours (for example 48 = 2 days)
  • Tickets set to On Hold or In Progress are not closed automatically, only those set to Open or Answered
  • When closing the ticket, the email template Support Ticket Auto Close Notification is sent to the user. You can customise that email in Setup > Email Templates as normal

if the ticket is auto-closed before the issue is fixed, they can always reopen it.

Share this post


Link to post
Share on other sites

@brian! we're already using the Auto Close feature, but that doesn't help us in this case.

It'll just leave us with a bunch of tickets with 'Customer Reply'-status which will need to be changed to 'Answered' in order for the Auto Close feature to close them. And in that case, we might as well close the ticket manually. 🙂

Share this post


Link to post
Share on other sites
2 hours ago, DennisMidjord said:

 

It'll just leave us with a bunch of tickets with 'Customer Reply'-status which will need to be changed to 'Answered' in order for the Auto Close feature to close them. And in that case, we might as well close the ticket manually. 🙂

No, ticket are auto-closed even if they're in Customer-Reply mode.

Share this post


Link to post
Share on other sites

What, are you sure? That has never happened to us.

It even says in the documentation that it's only for 'Open' or 'Answered':

Tickets set to On Hold or In Progress are not closed automatically, only those set to Open or Answered

Share this post


Link to post
Share on other sites
1 minute ago, DennisMidjord said:

It even says in the documentation that it's only for 'Open' or 'Answered':

the documentation may or may not be up to date - so can't confirm this either way.

whether a ticket is auto-closed is based on it's ticket status settings...

https://docs.whmcs.com/Support_Ticket_Statuses

Quote

For each ticket status, you can set the following attributes:

  • Status Color - A six-digit hexadecimal representation of the color to display that status in
  • Include in Active Tickets - Ticking this box includes the status in the tickets considered as open (or more precisely, not closed)
  • Include in Awaiting Reply - Ticking this box includes the status in the tickets considered as awaiting a reply by staff
  • Auto Close - This is used to determine if tickets set to this status should be included in the automatic closing after a defined period of inactivity (no replies). It is defined in Setup > Automation Settings.
  • Sort Order - This determines in what order the ticket statuses are displayed

in my dev ticket statuses setup, Customer-Reply is set to auto-close, and so long as the cron is running correctly, it should auto-close the ticket based on the value in Automation Settings (as long as that's not 0).

8zbHr9y.png

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