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

        • email template

          How do I create and save an email template
        • Search Records returning different values than actually present

          Hey! I have this following line in my deluge script: accountSearch = zoho.crm.searchRecords("Accounts","(RS_Enroll_ID:equals:" + rsid + ")",1,200,{"cvid":864868001088693817}); info "Account search size: " + accountSearch.size(); listOfAccounts = zoho.crm.searchRecords("Accounts","(RS_Enroll_ID:equals:"
        • Making digital signatures accessible to all: Introducing accessibility controls in Zoho Sign

          Hi there! At Zoho Sign, we are committed to building an inclusive digital experience for all our users. As part of our ongoing efforts to align with Web Content Accessibility Guidelines (WCAG), we’re updating the application with support that will go
        • Super Admin Access to All Courses and Spaces in Zoho Learn

          Dear Zoho Learn Team, We hope this message finds you well. We are using Zoho Learn extensively for internal and agent training. While managing our courses and spaces, we encountered a significant limitation regarding admin access and course management.
        • Updating Subform Record from other Form

          Just wanted to ask how to properly approach this. I have 2 forms and would like to trigger an auto update on the subform once record submitted. block below only updates 1 row for each recordRow in input.AV_System { AssetRecord = Site_Asset_Services[SOR_No
        • Print checks for owner's draw

          Hi.  Can I use Zoho check printing for draws to Owner's Equity?  This may be a specific case of the missing Pay expenses via Check feature.  If it's not available, are there plans to add this feature?
        • Introducing Profile Summary: Faster Candidate Insights with Zia

          We’re excited to launch Profile Summary, a powerful new feature in Zoho Recruit that transforms how you review candidate profiles. What used to take minutes of resume scanning can now be assessed in seconds—thanks to Zia. A Quick Example Say you’re hiring
        • [New Release 2024] Create and embed custom capabilities across CRM with Kiosk Studio, our latest no-code tool

          [Update | New series] We've started publishing a series of posts on Kiosk Studio. It's called Kiosk Studio Sessions and you can check out the first one here! [Update | 15 Oct} Session #2 is live! This one will look at how to create a kiosk for your call
        • Revenue Management: #10 Common Mistakes while Recognizing Revenue

          We are at the end of the series on Revenue Management, covering how different businesses recognise revenue. Even with clear standards like ASC 606 and IFRS 15 in practice, businesses often struggle with the nuances of revenue recognition. Especially growing
        • Zoho Projects MCP Feedback

          I've started using the MCP connector with Zoho Projects, and the features that exist really do work quite well - I feel this is going to be a major update to the Zoho Ecosystem. In projects a major missing feature is the ability to manage, (especially
        • Windows Desktop App - request to add minimization/startup options

          Support Team, Can you submit the following request to your development team? Here is what would be optimal in my opinion from UX perspective: 1) In the "Application Menu", add a menu item to Exit the app, as well as an alt-key shortcut for these menus
        • integarting attachments from crm to creator

          when i tried to integrate pdf attachments from crm to creator via deluge i am getting this error {"code":2945,"description":"UPLOAD_RULE_NOT_CONFIGURED"} the code i used is attachments = zoho.crm.getRelatedRecords("Attachments","Sales_Orders",203489100020279XXX8);
        • Product details removed during update from other system

          We maintain our product details in an other system. These details are synchronized with Zoho at the end of each day, through an API. This has worked perfectly sofar. But last Monday, all product codes and some other product data have been wiped during
        • Search Option

          🚫 Current Limitation: As of now (September 2025), Zoho FSM lacks a global search functionality, which makes it difficult to quickly: Find specific Work Orders by number or keyword Search for customer records or contact info Locate assets, jobs, or service
        • Mobile Chat Window - Full Screen

          Hello, The mobile chat window takes up the full screen, which is highly confusing for most customers! Using a desktop machine, I see the same happens when reducing the browser width to 800px or below. This suggests that it responsive web design, causing the switch to full screen. Can we fix this very annoying behaviour ourselves using a custom css file? If so, can you please let me know how? Thanks
        • Is it possible to customize ZC Themes?

          I understand you can choose a layout and customize Brand Color, App Header, Menu, and Sub-Menu components, but can you override some of the default theme settings with CSS or a config file? For example, - Table highlight color - Listview auto filter highlight
        • Is it possible to create Custom function-based Lookup field in Zoho CRM

          Is it possible to create a custom function-based lookup field in Zoho CRM? If so, how? Use case: Need to fetch users from Zoho Projects into a dropdown field in Zoho CRM.
        • @mention in comments no notification

          Hi, hope someone can help. When we @mention someone in the comments in Zoho Creator, how is that user notifed as we don't get anything on email or in the app notifications. 
        • Add "Running Balance" column to Account Transaction Reports

          Hello, Currently Zoho Account Transaction Reports give you the opening balance, then lists the transactions, then provides the closing balance.  It would be great if you could add a column on the far right that shows the "Running Balance" on the account after each transaction.  There are many times when analyzing or tie-ing out transactions that this would be very helpful.  I currently have to frequently run a tape on my adding machine to get balance totals after a specific transaction on the list.
        • Unified customer portal login

          As I'm a Zoho One subscriber I can provide my customers with portal access to many of the Zoho apps. However, the customer must have a separate login for each app, which may be difficult for them to manage and frustrating as all they understand is that
        • WhatsApp Channels in Zoho Campaigns

          Now that Meta has opened WhatsApp Channels globally, will you add it to Zoho Campaigns? It's another top channel for marketing communications as email and SMS. Thanks.
        • error : Object code : 6500

          b3 = map(); b3.put("name", "Test Project Name"); updateprojects2 = invokeurl [ url :"https://projectsapi.zoho.eu/restapi/portal/era0130/projects/169495000000928007/" type :PUT parameters: b3 connection:"in2" ]; info b3 ; info updateprojects2; ------------
        • I got unknown charge from Zoho

          Good day, I need help disputing a charge I don't know from, zoho. I have ZohoMail and ZeptoMail. I purchase credits for ZeptoMail, and for ZohoMail I am not subcribed.
        • How can I see content of system generated mails from zBooks?

          System generated mails for offers or invices appear in the mail tab of the designated customer. How can I view the content? It also doesn't appear in zMail sent folder.
        • Zadarma + Zoho CRM Integration – Missed Calls Saved as Contacts Instead of Leads

          Hello everyone, I’m looking for input from anyone with experience using the Zadarma + Zoho CRM integration. Currently, I’m seeing that missed calls are automatically being created as Contacts instead of Leads. From a CRM perspective, this doesn’t make
        • Function 56: Automatically enable the option for customers to pay via bank account

          Hello everyone and welcome back to our series! One of the key features of Zoho Books is its integration with multiple payment gateways, allowing you to receive online payments for your invoices. This ensures faster payments, automates payment tracking
        • Attach Files to Your Notecards and share them on the go!

          Hey everyone! We’re excited to share a feature many of you have been asking for — you can now attach files directly to your text notecards and share with ease! 🙌 This update was built with your feedback in mind, especially for those who wanted a simple
        • Can i connect 2 instagram accounts to 1 brand?

          Can i connect 2 instagram accounts to 1 brand? Or Do i need to create 2 brands for that? also under what subscription package will this apply?
        • Workdrive on Android - Gallery Photo Backups

          Hello, Is there any way of backing up the photos on my android phone directly to a specific folder on Workdrive? Assuming i have the workdrive app installed on the phone in question. Emma
        • Integración Books para cumplir la ley Crea y Crece y Ley Antifraude (VeriFactu)

          Hola: En principio, en julio de 2025, entra en vigor la ley Crea y Crece y Ley Antifraude (VeriFactu). ¿Sabéis si Zoho va a cumplir con la ley para cumplir con la facturación electrónica conectada a Hacienda? Gracias
        • YouTube Live #1: AI-powered agreement management with Zia and Zoho Sign

          Hi there! We're excited to announce Zoho Sign’s first YouTube live series, where you can catch the latest updates and interact with our Zoho Sign experts, pose questions, and discover lesser-known features. We're starting off by riding the AI wave in
        • How to add a % Growth column for year-over-year comparison (2024 vs 2025)

          Hello, I am trying to build a monthly revenue comparison between 2024 and 2025 in Zoho CRM Analytics. My current setup is: Module: Deals (Affaires) Filter: Stage = Closed Won Date field: Closing Date Grouping: By Month Metrics: Sum of Amount for 2024,
        • How to searchByCriteria records that are under approval?

          I need to search for both approved and pending approval records Is that possible with this method? Or I need to a different method? var priceReqID = $Page.record_id; log(priceReqID); var records = ZDK.Apps.CRM.Price_List_Item.searchByCriteria("Price_Request:equals:"
        • Power of Automation::Streamline log hours to work hours upon task completion.

          Hello Everyone, A Custom Function is a user-written set of code to achieve a specific requirement. Set the required conditions needed as to when to trigger using the Workflow rules (be it Tasks / Project) and associate the custom function to it. Requirement:-
        • How to add Simple Analytics to Zoho Pages?

          I have a website with Zoho Pages, how do I add Simple Analytics on it? They seem to have code they need to be embedded https://docs.simpleanalytics.com/script
        • End Date in Zoho Bookings

          When I give my appointments a 30 minutes time I would expect the software not to even show the End Time.  But it actually makes the user pick an End Time.  Did I just miss a setting?  
        • Cant seem to delete an email account

          Hello, I have researching for 4 days how to delete an email account and I am absolutely without a clue. The email account I am trying to delete is support<AT>fyshoes<dot>com. It's the first email account I made and it (is???) was associated with the super user (me). I have since changed it to adming<AT>fychoes<dot>com and I see the support email in my list but I just cant seem to get rid of it. Ultimately I want to associate that email account with another user that I want to add. This is really
        • Commerce Order as Invoice instead of Sales Order?

          I need a purchase made on my Commerce Site to result in an Invoice for services instead of a Sales Order that will be pushed to Books. My customers don't pay until I after I add some details to their transaction. Can I change the settings to make this
        • Import data into Multi-Select lookup field from CSV/Excel

          How to import data into a multi-select lookup field from the CSV/Excel Sheet? Let's say I have an Accounts multi-select lookup field in the Deals module and I want to import the Deals with Accounts field. Steps:- 1. Create/edit a multi-select lookup field
        • Sync desktop folders instantly with WorkDrive TrueSync (Beta)

          Keeping your important files backed up and accessible has never been easier! With WorkDrive desktop app (TrueSync), you can now automatically sync specific desktop folders to WorkDrive Web, ensuring seamless, real-time updates across devices. Important:
        • Next Page