Welcome to Portal

?Unknown\pull-down

Welcome to Zoho Cares

Bienvenido a Soporte de Zoho

Search our knowledge base, ask the community or submit a request.



This is a monthly series where we pick some common use cases that have been either discussed or most asked about in our community and explain how they can be achieved using one of the automation capabilities in Zoho Desk.

Typically when a customer submits a support ticket, it is assigned with a status to map its journey. Zoho Desk provides you with four default statuses: Open, On hold, Escalated, Closed; along with the option to create your own statutes which can then be mapped to these default ones.  
 
Once the solution has been provided to the customer and the ticket is resolved the ticket is marked as "Closed". But the status changes from "Closed" to "Open" if the customer replies to the same ticket. While this behaviour might be useful for some businesses who prefer to continue the same thread instead of reopening a new one, some might not want to do so. To ensure the ticket stays in the closed status and start a new thread for a customer reply, you can create a Workflow Rule and map it to a custom function script to achieve the desired results.

Prerequisite:

To ensure the Closed status is maintained even if a customer replies to a ticket, perform the following steps: 
1. Go to Setup, and under Customization, click Ticket Status, uncheck the "Fall-Back To Default" checkbox against "Closed" status.
2. OrgID, to get the OrgID, navigate to "Setup >> Developer Space >> API". Note down the OrgID

To create the workflow rule, perform the following steps:

1. Go to Setup, and under Automation, click Workflows.
2. On the left panel, under Workflows, click Rules > Create Rule.
In the Basic Information section, perform the following steps:
3. In the Module drop-down menu, select Tickets.
4. Enter a name and description for the rule.
5. If you want to activate the rule right away, select the Active checkbox. Else, you can just create the rule now and activate it later on the Rules page.
6. Click Next.
In the Execute on section, perform the following steps:
7. Select the Customer Reply checkbox to execute this rule every time a customer responds to a ticket.  
8. Click Next.
9. In the Criteria section, set the criteria as "Status is Closed" and click "Next"
In the Actions section, perform the following steps:
10. Click the + icon under "Action" and select "New" next to Custom Functions
11Enter a name and description for the custom function.
12. In the script window, input the Custom Function you find below:
  1. numberOfHours = 48;
  2. orgId = "Paste Org Id here";
  3. //Please paste your OrgID
  4. TicketInfo = zoho.desk.getRecordById(orgId,"tickets",TicketID);
  5. lastModified = TicketInfo.get("closedTime").toTime("yyyy-MM-dd'T'HH:mm:ss");
  6. status = TicketInfo.get("status");
  7. hoursBetween = now.hoursBetween(lastModified).abs();
  8. if(hoursBetween >= numberOfHours)
  9. {
  10. threadResponse = zoho.desk.getRelatedRecords(orgId, "threads", "tickets", TicketID);
  11. if(threadResponse.get("data") != null)
  12. {
  13. latestThreadID = threadResponse.get("data").get(0).get("id");
  14. splitTicketResponse = zoho.desk.ticket.split(orgId, TicketID, latestThreadID);
  15. info "splitTicketResponse ::::" + splitTicketResponse;
  16. info "======================================================";
  17. NewTicketNumber = splitTicketResponse.get("ticketNumber");
  18. NewTicketID = splitTicketResponse.get("id");
  19. }
  20. }
  21. else
  22. {
  23. jsonString = {"status":"Open"};
  24. TicketResponse = zoho.desk.update(orgId, "tickets", TicketID, jsonString);
  25. info TicketResponse;
  26. }

NOTE:
Line 1 numberOfHours = 48, refers to the hours post which the new response received in a existing ticket should be split as new ticket. You can replace the number of hours based on your requirement.
Line 2 replace the orgId.

13. Click Edit Arguments
14. In the Name field type TicketID, and from the Value drop-down list select Ticket Id under Ticket Information
15. Click "Save" to save the custom function
16. Click "Save" again to save the workflow.

These steps would ensure that when a ticket is marked Closed, it stays in the Closed status, even if a customer replies after the mentioned hours. But also ensure that the new reply is added as a new ticket so you don't miss anything!

5 users like this announcement.
82 Replies
Reply
63 more

I'd like to echo Mike's sentiments.  I've been using Zoho Desk for a short period and my initial impression is that it is missing many very basic, but essential pieces of functionality for a ticketing system.  The ability to have tickets remain closed and create a new ticket on future responses has been a basic function that's been included in every other ticket management platform that I've used.  The lack of this function makes it very difficult to monitor and report on ticket response and resolution times as clients can respond to a 2-year-old ticket that then tanks your resolution metrics making the limited reporting options in Zoho Desk also of little value.  

  • 1 year ago

Understood, John. We intend to incorporate it as a built-in functionality. However, we haven't commenced work on it yet due to our current commitments with tasks that must be delivered on time. Nevertheless, we are confident that we will provide an update on this matter shortly.


Regards,
Ash | Zoho Desk

  • 11 months ago

Common Zoho, this is feature isn't available for standard!?? I was already following the steps and notice some steps weren't available. Please make this available to the standard. Looking forward to your response!

@simplex, Sorry the feature is available only in the Enterprise edition.

Regards,
Ajith | Zoho Desk

  • 11 months ago

I tried testing this function in two ways. First, with 0 hours and does work as expected. However, when we set the hours to 168 which is 7x24, the ticket reopens after 7 days if a reply is sent.

Given we know the function works, does the function automatically take into account business hours? Or, are the hours literal? Our business hours are 9 hours and 5 days. Should the functions hours be set to 9x5=45 or 7x24=168?

Regards,
Drew

@Drew, the custom function calculates hours based on calendar hours, and yes, for 7 days, the number should be 168.

Regards,
Ajith | Zoho Desk

  • 11 months ago

 I believe you meant 7 days? 7x24=168. You had said 5 days.

Yes, I meant 7 days. Thanks for pointing it out. I have updated the comment now, Drew.

Regards,
Ajith | Zoho Desk

I am trying to test this with 1 hour and it is not working. I tried to execute the function manually and I get this error message:

Value is empty and 'get' function cannot be applied


@Elaine, Kindly email us at support@zohodesk.com to look into this further.

Regards,
Ajith | Zoho Desk

  • 7 months ago

Does anyone already have a resolution to this? I tried the code but this does not do anything.
Instead it keeps failing, with or without a blueprint being active and no matter how many hours are mentioned.
Also the code I wish to have is this:

If a ticket is closed then and a customer sends a reply, then:
- keep the ticket closed.
- split the new reaction into a new ticket, with the mention of the old ticket.
- mention in the new ticket that it is not possible to react on older and closed tickets.
-put the status of the new ticket to 'unsorted'.



Hi Theo,

Thanks for sharing your detailed requirement!

A few tweaks to the existing code will help you meet this requirement. We'll follow up in the ticket #102195881 and provide the necessary function to accomplish this.

Regards,
Shivani | Zoho Desk

The above script splits the ticket if the ticket is closed and customer replies after 48 hours of ticket closure...Here the issue which I am facing is the customer everytime replies on same email after 48 hours and every time new ticket is getting generated.
What if I doesnt want to re-open the ticket and split at my end instead of this script could notify the customer to compose a new email
or
identify the earlier split ticket is open then update it there istead creating tikcet each time. 
Any solution for this ?

Hi Mamta Tripathi,

You can send a heads-up email to customers responding to a closed ticket without reopening or splitting it. Here’s how to set up the workflow automation to make this happen. 
[Note: Missing out the customer's email will still be a risk while opting this method.]

Go to Setup -> Automation -> Workflow -> Create Rule.
   - Module: Ticket
   - Rule Name: Choose any name you prefer
   - Execute On: Customer Reply
   - Criteria: Status - is Closed
   - All Actions: Alert -> Select the template -> Notify Contact

Remember to keep the "Fall Back to default" option disabled in Ticket Status.

Give it a try and let us know how it goes!

Cheers,  
Shivani | Zoho Desk

The if-branch part works like a charm. If I repond to a closed ticket after "numberOfHours", a new ticket is opened. But if I repsond before "numberOfHours" the else-branch does not work. There is now new ticket so I am pretty sure that the else-branch ist executed. My resonse is dsplayed in the ticket, but the ticket keeps being closed.

So this code seems to do nothing:
  1. jsonString = {"status":"Open"};
  2. TicketResponse = zoho.desk.update(orgId, "tickets", TicketID, jsonString);
  3. info TicketResponse;
Any hint what could be wrong? Did the API change? The orgId for instance is number and not string ;-)

Solved. I have a German version so it is not "Open" but "Offen". Changing the status variable solved the problem.

  • 2 months ago

Glad it is solved, Jochen. 


Regards,
Ash | Zoho Desk

  • 24 days ago

Hi, I tried this function but I receive this error:

splitTicketResponse ::::{"errorCode":"INTERNAL_SERVER_ERROR","message":"An internal server error occurred while performing this operation."}======================================================
How can I solve this?
Thank you
Hide

Hi @Francisco,

This error response occurs in a few collective cases, and we believe checking the logs live would be the most effective way to address this promptly.

Please book your available time via #111598193.

Regards,
Shivani | Zoho Desk


Reply to Chinmayee MishraA
/* */
  • 12
  • Insert
  • Plain text
Add Comment
(Up to 20 MB )