Automation#36: Auto-create time-entry after performing the Blueprint transition

Automation#36: Auto-create time-entry after performing the Blueprint transition



Hello Everyone,
This week’s edition focuses on configuring a custom function within Zoho Desk to streamline time tracking within the Blueprint. In this case, we create a custom field, and request the agent to enter the spending time within the single line field and then move to the next status within the blueprint. This entry updates under the Time Entry tab within the ticket.
Businesses rely on automated time entry to track time, but certain workflows require manual input. For example, ZylkerTechFix, a company specializing in hardware servicing and repairs, needed a precise way to log time spent on servicing devices across departments.
After an initial assessment, the support team transfers the ticket to the Engineering team. The time taken for servicing varied based on the complexity of the issue. To ensure accurate tracking, agents were required to manually log the time spent at this stage. A custom single line field was added to capture this information, and the organization flow was integrated into a Blueprint, making it seamless for agents and transparent for customers.
Let's go through setting up a Blueprint with a custom function that allows agents to manually log the time spent in a specific status once they've completed the process. This helps track time at each stage, improving efficiency and customer communication.

Prerequisites

Create a connection

  1.1 Go to Setup(S) and choose Connections under Developer Space.
  1.2 Click Create Connection.
  1.3 Select Zoho OAuth under Default Connection.
  1.4 Set the connection name as desk_connection.
  1.5 Under Choose Scopes, choose the below scope values:
Desk.tickets.READ
Desk.tickets.UPDATE
  1.6 Click Create and Connect.
  1.7 Click Connect.
  1.8 Choose the Zoho Desk's organization to connect with Deluge, and click Submit.
  1.9 Click Accept.
Connection is created successfully.

Create a custom single line field

a. Navigate to Setup >> Customization >> Layouts and Fields.
b. Select Tickets module and the Department in which you will configure the Blueprint.
c. Click on the layout. Add single line field which has the field value length of 255. Give the Name – Spending Time.
This single line field is  for the agent to manually enter the time taken to handle this ticket. Enter the time in this format HH:MM:SS (eg: 02:15:30)  .

Configure Custom Function within the Blueprint

Create a Blueprint with the required transitions for your process.
1. To create a Blueprint, go to Setup >> Automation >> Blueprint
2. Choose the department (the same department where you created the custom field) and click on Create Blueprint.
3. Give a desired name under Blueprint Name and description.
4. Choose Tickets under the module and let the Field be Status.
5. Add Criteria as Specific records/All records as required.
6. Add Advanced configuration as required.
7. Click Next.
8. Drag and drop the required States for your organization flow. Connect the different states  
9. Click on the + icon between the states to add a transition. Give a Name and Description for the transition.
10. Click Add transition

Within Transitions

11. Under Before, add the Agents whom you would like to give access to the Blueprint.
12. Add Transition Owner from a Different Department, Choose Department and Criteria if required.
13. Under During, click on Add Operations >> Fields >> choose Spending Time.  This will be marked validation and Mandatory.
14. Under After, click on New next to custom functions.
15. Under Configure Custom Function, enter Name and Description.
16. In the script window, insert the Custom Function given below:
  1. // ----<<<< User Inputs >>>>----
  2. // --- Replace ".com" with appropriate domain extension based on customer's location/DC ---
  3. deskURL = "https://desk.zoho.com";
  4. customFieldAPIName = "cf_"; // Replace the custom field API Name
  5. orgId = "";// Replace the org ID
  6. // ----<<<< Initial Configs >>>>----
  7. logs = Map();
  8. logs.insert("ticketId":ticketId,"timeEntryValue":timeEntryValue);
  9. //---------------------------
  10. try
  11. {
  12. // --- Perform the time calculation tasks ---
  13. executedTime = toText(now,"yyyy-MM-dd'T'HH:mm:ss.SSS'Z'","GMT");
  14. timeEntryValueList = timeEntryValue.toList(":");
  15. logs.insert("timeEntryValueList":timeEntryValueList);
  16. secondsSpent = timeEntryValueList.get(0).toNumber() * 3600 + timeEntryValueList.get(1).toNumber() * 60 + timeEntryValueList.get(2).toNumber();
  17. logs.insert("secondsSpent":secondsSpent);
  18. getHistory = invokeurl
  19. [
  20. url :deskURL + "/api/v1/tickets/" + ticketId + "/history?operationName=Blueprints_History"
  21. type :GET
  22. connection:"desk_connection"
  23. ];
  24. agentId = getHistory.get(0).get("agentId");
  25. logs.insert("getHistory":getHistory);
  26. createTimeEntry = invokeurl
  27. [
  28. url :deskURL + "/api/v1/tickets/" + ticketId + "/timeEntry"
  29. type :POST
  30. parameters:{"executedTime":executedTime,"secondsSpent":secondsSpent,"ownerId":agentId} + ""
  31. connection:"desk_connection"
  32. ];
  33. logs.insert("createTimeEntryApiResponse":createTimeEntry);
  34. update = zoho.desk.update(orgId,"tickets",ticketId,{"cf":{customFieldAPIName:""}});
  35.     logs.insert("Update":update);
  36. }
  37. catch (errorInfo)
  38. {
  39. logs.insert("errorInfo":errorInfo);
  40. }
  41. info "logs: \n" + logs;
  42. if(logs.containKey("errorInfo"))
  43. {
  44. throws "Error happen in the CF execution";
  45. }
17. Click on the Edit Arguments in the script editer window, give a desired Method Name. Map the arguments as below:
       17.1 In the Argument Name field, type ticketId and select Ticket Id in the Tickets Section.
       17.2 In the Argument Name field, type timeEntryValue and select Spending Time in the Tickets SectionClick Done.
Notes

NOTE

a. In Line 3, replace .com in the address with .in/.eu/.ca based on your DC.
b. In Line 4, enter the API name of the custom field.
To fetch the API name, go to Setup (S) Customization → Layouts and Fields. Select the department for which you've configured this blueprint under Tickets module. Select the layout, click on the gear icon(Field settings) of the custom field and select Edit properties. Copy the API name under Edit field and paste it in line 4 of the code.   

Notes

c. In Line 5, enter the Org ID. Go to Setup >> Developer Space >> APIs. Under API Plan Details, you will fine the metric Org ID and its Values. Copy the value and paste it in line 3.  
18. Click on Save & Complete Blueprint.
19. Click Yes, Proceed. 
Your configuration is complete.

In the ticket, when the agent chooses to move to the next transition, the spending time values has to be entered by the agent in the format
HH:MM:SS. Once the value is entered, the ticket proceeds to the next transition.
Info
You can utilize the custom field "Spending Time" across multiple transitions too. Each time a transition occurs, the field resets, allowing users to input the time spent during subsequent transitions.
Please share your thoughts and understanding of how the Blueprint feature has helped your business. If you need help with Blueprints, our mailbox is open to hear you: support@zohodesk.com. 
Until the next post,
Lydia | Zoho Desk 


      • Sticky Posts

      • Register for Zoho Desk Beta Community

        With the start of the year, we have decided to take a small step in making the life of our customers a little easier. We now have easy access to all our upcoming features and a faster way to request for beta access. We open betas for some of our features
      • Share your Zoho Desk story with us!

        Tell us how you use Zoho Desk for your business and inspire others with your story. Be it a simple workflow rule that helps you navigate complex processes or a macro that saves your team a lot of time; share it here and help the community learn and grow with shared knowledge. 
      • Tip #1: Learn to pick the right channels

        Mail, live chat, telephony, social media, web forms—there are so many support channels out there. Trying to pick the right channels to offer your customers can get pretty confusing. Emails are most useful when the customer wants to put things on record. However, escalated or complicated issues should not be resolved over email because it's slow and impersonal.  When you need immediate responses, live chat is more suitable. It's also quick and convenient, so it's the go-to channel for small issues. 
      • Welcome to Zoho Desk Community - Say hello here!

        Hello everyone! Though we have been here for a while, it’s time to formally establish the Zoho Desk Community; we’re really happy to have you all here! This can be the place where you take a moment to introduce yourself to the rest of the community. We’d love to hear all about you, what you do, what company or industry you work for, how you use Zoho Desk and anything else that you will like to share! Here’s a little about me. I am Chinmayee. I have been associated with Zoho since 2014. I joined here
      • Webinar 1: Blueprint for Customer Service

        With the launch of a host of new features in Zoho Desk, we thought it’ll be great to have a few webinars to help our customers make the most of them. We’re starting off with our most talked about feature, Blueprint in Zoho Desk. You can register for the Blueprint webinar here: The webinar will be delivered by our in-house product experts. This is a good opportunity to ask questions to our experts and understand how Blueprint can help you automate your service processes. We look forward to seeing

        • Recent Topics

        • Update application by uploading an updated DS file

          Is it possible? I have been working with AI on my desktop improving my application, and I have to keep copy pasting stuff... Would it be possible to import the DS file on top of an existing application to update the app accordingly?
        • Cant Save Gauge on Creator Page

          How to Save Gauge on Creator Page see movie https://vimeo.com/1116410860?share=copy#t=0
        • Granular Email Forwarding Controls in Zoho Mail (Admin Console and Zoho One)

          Hello Zoho Mail Team, How are you? At present, the Zoho Mail Admin Console allows administrators to configure email forwarding for an entire mailbox, forwarding all incoming emails to another address. This is helpful for delegation or backup purposes,
        • Change Currency symbol

          I would like to change the way our currency displays when printed on quotes, invoices and purchase orders. Currently, we have Australian Dollars AUD as our Home Currency. The only two symbol choices available for this currency are "AU $" or "AUD". I would
        • Auto Capitalize First Letter of Words

          Hi I am completely new to ZOHO and am trying to build a database. How can i make it when a address is entered into a form field like this: main st it automatically changes is to show: Main St Thank You
        • Follow-up emails via Workflow Automation not staying in the same thread

          Dear Zoho Support Team, I am currently using Workflow Automation in Zoho Campaigns to send follow-up emails. In my test case, I noticed the following behavior: All emails in the automation have the same subject line. If the follow-up email is sent within
        • Client Script refuses to set an initial value in Subform field

          I tried a very simple, 1 line client script to set a default value in a custom subform field when the "Add Row" button is clicked and the user is entering data. It does not work - can someone tell me why? ZDK documentation suggests this should be doable.
        • Archiving Contacts

          How do I archive a list of contacts, or individual contacts?
        • How do I filter contacts by account parameters?

          Need to filter a contact view according to account parameter, eg account type. Without this filter users are overwhelmed with irrelevant contacts. Workaround is to create a custom 'Contact Type' field but this unbearable duplicity as the information already
        • Send / Send & Close keyboard shortcuts

          Hello! My team is so close to using Zoho Desk with just the keyboard. Keyboard shortcuts really help us to be more efficient -- saving a second or two over thousands of tickets adds up quickly. It seems like the keyboard shortcuts in Desk are only for
        • Zoho Social - Post Footer Templates

          As a content creator I often want to include some information at the end of most posts. It would be great if there was an option to add pre-written footers, similar to the Hashtag Groups at the end of posts. For example, if there is an offer I'm running
        • Zoho Expense - The ability to add detail to a Trip during booking

          As an admin, I would like the ability to add more detail to the approved Trips. At present a requestor can add flights, accommodation details and suggest their preferences. It would be great if the exact details of the trip could be added either by the
        • Simplified Call Logging

          Our organization would like to start logging calls in our CRM; however, with 13 fields that can't be removed, our team is finding it extremely cumbersome. For our use case, we only need to record that a call happened theirfor would only need the following
        • Week date range in pivot table

          Hello, I need to create a report that breakouts the data by week.  I am using the pivot table report, and breaking out the date by week, however the date is displayed as 'Week 1 2014' format.  Is there anyway to get the actual dates in there? ex. 1/6/2014-1/12/2014 Thanks,
        • Help Center IFrame Issue

          I have had a working Help Center on my website using an iframe for a while. But now for some reason the sign in page gets a refused to connect error. Can someone please help. If I go to the url manually it works correclty
        • Staff rules

          Hi! Do you people know what are the default staff rules when a new booking is created? We have two staff members in my team (me as the admin, and my employee). As we share the same services, I'm wondering how Zoho will pick the staff for new apointments.
        • Comment Templates

          Is it possible to add a template option for comments? We have some agents in the process who's responses require a pre-formatted layout. It would be incredibly handy to have a template for them where they can insert the template and then add their responses
        • [ZohoDesk] Improve Status View with a new editeble kanban view

          A kanban view with more information about the ticket and the contact who created the ticket would be valueble. I would like to edit the fields with the ones i like to see at one glance. Like in CRM where you can edit the canvas view, i would like to edit
        • Adding Markdown text using Zoho Desk API into the Knowledge Base

          Hi Zoho Community members, We currently maintain the documentation of out company in its website. This documentation is written in markdown text format and we would like to add it in Zoho Knowledge Base. Do you know if there is REST API functionality
        • An Exclusive Session for Zoho Desk Users: AI in Zoho Desk

          A Zoho Community Learning Initiative Hello everyone! This is an announcement for Zoho Desk users and anyone exploring Zoho Desk. With every nook and corner buzzing, "AI's here, AI's there," it's the right time for us to take a closer look at how the AI
        • Shared values: From classroom lessons to teaching moments in customer service

          While the world observes Teachers’ Day on October 5, in India, we celebrate a month earlier, on September 5, to mark the birth anniversary of Dr. Sarvepalli Radhakrishnan, a great teacher, renowned scholar, educationist, and advocate for empowerment.
        • Export to excel stored amounts as text instead of numbers or accounting

          Good Afternoon, We have a quarterly billing report that we generate from our Requests. It exports to excel. However if we need to add a formula (something as simple as a sum of the column), it doesn't read the dollar amounts because the export stores
        • Image Upload Field | Zoho Canvas

          I'm working on making a custom view for one of our team's modules. It's an image upload field (Placement Photo) that would allow our sales reps to upload a picture of the house their working on. However, I don't see that field as a opinion when building
        • Create a list of customers who participated in specific Zoho Backstage events and send them an email via Zoho CRM

          How to create a list of customers who participated in specific Zoho Backstage events and send them an email via Zoho CRM? I was able to do a view in CRM based on customer that registered to an event, but I don't seems to be able to include the filter
        • Custom Button Disappearing in mobile view | Zoho CRM Canvas

          I'm working in Zoho CRM Canvas to create a custom view for our sales team. One of the features I'm adding is a custom button that opens the leads address in another tab. I've had no issue with this in the desktop view, but in the mobile view the button
        • Zoho Desk blank page

          1. Click Access zoho desk on https://www.zoho.com/desk/ 2. It redirects to https://desk.zoho.com/agent?action=CreatePortal and the page is blank. Edge browser Version 131.0.2903.112 (Official build) (arm64) on MacOS
        • Clearing Fields using MACROS?

          How would I go about clearing a follow-up field date from my deals? Currently I cannot set the new value as an empty box.
        • I hate the new user UI with the bar on the left

          How can I reverse this?
        • Constant color of a legend value

          It would be nice if we can set a constant color/pattern to a value when creating a chart. We would often use the same value in different graph options and I always have to copy the color that we've set to a certain value from a previous graph to make
        • Office 365 and CRM mail integration: permission required

          Has anyone run into this weird problem? My email server is Office 365. When I try to configure Zoho CRM to use this server, a Microsoft popup window opens requesting user and password. After entering that, I get a message in the Microsoft window saying
        • Field Not Updating in FSM Script - Service and Parts module.

          Dear Team, I am reaching out regarding a script I have implemented in Zoho FSM to automate the calculation of the End of Service date based on the End of Sale date in the Service and Parts module. Overview of the script: Fetches the End_of_Sale__C and
        • Question regarding import of previous deals...

          Good afternoon, I'm working on importing some older deal records from an external sheet into the CRM; however, when I manually click "Add New Deal" and enter the pertinent information, the deal isn't appearing when I look at the "Deals" bar on the account's
        • Client Script also planned for Zoho Desk?

          Hello there, I modified something in Zoho CRM the other day and was amazed at the possibilities offered by the "Client Script" feature in conjunction with the ZDK. You can lock any fields on the screen, edit them, you can react to various events (field
        • One person/cell phone to manage multiple accounts

          Hi. I have a personal Free account to keep my own domain/emails. Now I need to create a Business account to my company's own domain, but I have only one mobile phone number I use to everything. How do I do to manage this? Can I manage a Free domain and
        • Tracking KPIs, Goals etc in People

          How are Zoho People users tracking employee targets in People? For example, my marketing assistant has a target of "Collect 10 new customer testimonials every month". I want to record attainment for this target on a monthly basis, then add it to their
        • Zoho Desk: Ticket Owner Agents vs Teams

          Hi Zoho, We would like to explore the possibility of hiding the ‘Agents’ section within the Ticket Owner dropdown, so that we can fully utilise the ‘Teams’ dropdown when assigning tickets. This request comes from the fact that only certain agents and
        • CRM limit reached: only 2 subforms can be created

          we recently stumbled upon a limit of 2 subforms per module. while we found a workaround on this occasion, only 2 subforms can be quite limiting in an enterprise setting. @Ishwarya SG I've read about imminent increase of other components (e.
        • Can not Use Attachment Button on Android Widget

          this always pops up when I touch the attach button on android widget. going to settings, there is no storage permission to be enabled. if I open the app, and access the attach feature there, I can access my storage and upload normally.
        • Can I add Conditional merge tags on my Templates?

          Hi I was wondering if I can use Conditional Mail Merge tags inside my Email templates/Quotes etc within the CRM? In spanish and in our business we use gender and academic degree salutations , ie: Dr., Dra., Sr., Srta., so the beginning of an email / letter
        • Zoho Notebook Sync problem

          I'm facing a problem with syncing of notebook on android app. It's not syncing. Sometimes it syncs after a day or two.  I created some notes on web notebook but it's not syncing on mobile app. Please help!!!!
        • Next Page