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

        • Getting events in the future

          Hi I am trying to get events in the future by calling this API Endpoint https://www.zohoapis.eu/crm/v8/Events?fields=Event_Title,Created_By,Created_Time,Start_DateTime But that gives me all events in the database. How do I make a query that returns all
        • Created Date/Invalid Fields

          Since Saturday we have suddenly had issues with our webhooks and data retrieval from CRM. Specifically how Created Date is handled. It appears there was some sort of change within CRM that broke a lot of our code that has been in place for several years.
        • Zoho Inventory. Preventing Negative Stock in Sales Orders – Best Practices?

          Dear Zoho Inventory Community, We’re a small business using Zoho Inventory with a team of sales managers. Unfortunately, some employees occasionally overlook stock levels during order processing, leading to negative inventory issues. Is there a way to
        • Problem for EU users connecting Zoho CRM through Google Ads for Enhanced conversions

          Has anyone else experienced this problem when trying to connect Zoho CRM through Google Ads interface to setup enhanced conversions? Did you guys get it fixed somehow? The Problem: The current Google Ads integration is hardcoded to use Zoho's US authentication
        • integration zoho form - drive

          I integrated my form with Google Drive. The report of user submissions from the Google Form becomes a Google Sheets table. When I used Google Forms for the same task, the summary sheet adapted to the form. For example, if I added a new field to the form,
        • Revenue Management: #9 Revenue Recognition in Media & Publishing

          Media & Publishing industry has evolved in recent times. It offers subscriptions, bundles digital and print access, runs sponsored content, and sometimes even sells ad spaces. If you run a media or publishing business, you will always get into a situation
        • Zoho CRM Community Digest - July 2025 | Part 2:

          Hello, Everyone! We’re closing out July with a can’t-miss highlight: Zoholics Europe 2025! Happening from September to October, it’s your chance to level up your CRM skills, covering everything from automation and CPQ to dashboards and advanced workflows.
        • How can I trigger a flow action only once while updating contact?

          Hi, we have a trigger to merge&mail file when the field YYY is filled out. For this acion I used "Create or update module entry". But unfortunately we get tens of email on a day with this merged file, because the contact is being regularly updated. The
        • Copy a Record Template from one Form to another

          I have a Creator application with several forms.  I developed a record template for one of the reports/forms but want to use most of it for another of the form/report combinations in the application. Is there a way to copy the template (code or otherwise) to another form?
        • Tip of the Week #70 – Create common team signatures for your shared inboxes

          Did you know that a small detail, such as an email signature, can make a big difference in how your brand is perceived? One simple yet smart way to enhance your team’s communication is by creating common team signatures for your shared inboxes. Instead
        • Enhanced data export features: XLSX format, custom character encoding, and selective record export

          Greetings all, Here are a few enhancements related to exporting CRM data, including the ability to export data in XLSX file format now. The Export feature under Data Administration now offers new options that expand its flexibility and enable users to
        • Invalid value passed for file_name

          System generated file name does not send file anymore - what is the problem?
        • Tip #42 – How to manage data security with Privacy Settings – 'Insider Insights'

          Data privacy is a cornerstone of trust in remote support. Through Privacy Settings in Zoho Assist, you can set up how data is gathered, stored, and handled in your organization. These settings ensure compliance, data protection for sensitive details,
        • Zoho DataPrep and File Pattern configuration

          I'm using Zoho data prep to ingest data from One Drive into Zoho Analytics... The pipeline is super simple but I can't any way to get all the files that I need. Basically I need to bring all the files with a certain pattern and for that I'm using a regex
        • Custom Function for Estimates

          Hey everyone, I was wondering if there was a way to automate the Subject of an estimate whenever one is created or edited: * the green box using following infos: * Customer Name and Estimate Date. My Goal is to change the Subject to have this format "<MyFirm>-Estimate
        • Introducing Dark Mode / Light Mode : A New Look For Your CRM

          Hello Users, We are excited to announce a highly anticipated feature - the launch of Day, Night and Auto Mode implementation in Zoho CRM's NextGen user interface! This feature is designed to provide a visually appealing and comfortable experience for
        • Quick Item Search & Auto-suggestion for Invoices

          Hi Team, I am facing an issue while creating invoices in Zoho Books. Currently, I have to type the full item name in the correct sequence and spelling for it to appear. For example, my item name is: "Distemper Acri Silk Special White 10kg" If I type something
        • Ticketbai! en el Pais Vasco

          Hola a todos, En enero de 2.022 se va a implantar en el país vasco un nuevo sistema de facturación, denominado ticketbai!, ¿hay alguna previsión de realizar las adaptaciones en zoho books o zoho invoices? Ignoro la cantidad de clientes que tienen estas
        • Zoho CRM mobile app feature update: home page widgets, field tooltips and user image upload

          Hello everyone! Your business doesn't pause when you're on the move, and neither should your CRM. That's why in our latest update, we've introduced a few new features to make your mobile CRM experience smoother and more efficient. Let's take a quick look
        • Zoho CRM Plain Text Template: Line Breaks and Formatting Issue

          Hello, I'm following the instructions to create email templates in Zoho CRM, but I'm having a problem with the plain text version. https://help.zoho.com/portal/en/kb/zoho-sign/integrations/zoho-apps/zoho-crm/articles/zoho-crm-email-templates#Steps_to_create_a_custom_email_template
        • Optimizing Task Handling: Auto-Remove Recurrence for cancelled Tasks.

          Hello Everyone, A Custom function is a user-written set of code to achieve a specific requirement. Set the required conditions needed as when to trigger using the Workflow rules (be it Tasks / Project) and associate the custom function to it. Requirement:
        • Important updates to your connectors

          Hello everyone, Greeting from Zoho Creator! We're excited to announce that we'll be rolling out significant backend updates to Zoho Creator's built-in connectors to enhance security by following the latest frameworks. The existing version of some of the
        • Create, collaborate, and manage agreements with Zoho Sign

          Agreements drive business. We launched Zoho Sign in 2017 as a simple digital signature tool to sign agreements from anywhere, at any time. Over the years, we've learned that most agreements go through last-minute changes before they're signed. Our users
        • Function #25: Automatically generate purchase orders from a sales order

          We kicked off the "Function Fridays" series with the goal of helping you automate your everyday accounting tasks. As we delve into today's post, I'm delighted to announce that we're here to present the 25th custom function in this series. While it is
        • Has Anyone successfully integrated Zoho and Sage Intact?

          Hey all, We’re evaluating Zoho One + Sage Intacct and I’m trying to connect with anyone who has actually implemented the two together.Specifically, I’d love to know: -- Which functions you kept in Zoho vs. Intacct (e.g., Product Catalog, AR/AP, invoicing,
        • 5名限定 課題解決型ワークショップイベント Zoho ワークアウト開催のお知らせ (9/25)

          ユーザーの皆さま、こんにちは。Zoho ユーザーコミュニティチームの藤澤です。 9月開催のZoho ワークアウトについてお知らせします。 今回はZoomにて、オンライン開催します。 ▷▷参加登録はこちら:https://us02web.zoom.us/meeting/register/6OSF2Bh6TumsMIlDwaY_PQ ━━━━━━━━━━━━━━━━━━━━━━━━ Zoho ワークアウトとは? Zoho ユーザー同士で交流しながら、サービスに関する疑問や不明点の解消を目的とした「Zoho
        • hiding a topic from all but one segment (or list)

          My organization sends out a number of newsletters using Zoho Campaigns. One of those newsletters is for volunteers. In order to become a volunteer, a person has to first go through our volunteer orientation (training). After that, they can receive newsletters
        • How do I set up this automation correctly?

          When contacts enter my Subscribers list, I want it to reference a custom field to see if it is empty. Then I want it to do two things: If empty: Assign a tag based on a different custom field. If that custom field is empty, assign a different tag. If
        • Function #62: Display associated Quote on Invoice details screen

          Hello everyone! Today, we are sharing a Related List script that makes it easy to view and access the quote from which an invoice was created right from the invoice details screen. This Related List displays the Quote number and Amount, allowing you to
        • Custom confirmation message

          How can I change the message that users see after they submit the booking form? I have to confirm some details before their appointment is officially "confirmed", so I want to change it where it doesn't say their appointment is "confirmed" but rather
        • Desk x CRM Integration

          Howdy! We currently use SalesIQ but we are considering moving across to Desk as it seems to have more functionality that we want. One of the pulls is the ability for our customers to self serve. But, I might be getting over excited and not actually need
        • Function #53: Transaction Level Profitability for Invoices

          Hello everyone, and welcome back to our series! We have previously provided custom functions for calculating the profitability of a quote and a sales order. There may be instances where the invoice may differ from its corresponding quote or sales order.
        • Issue with Save & Share Link – Works for Others but Not Creator

          I’ve enabled the "Save and Share" feature in Zoho Forms, and it works correctly for all users accessing the public link—except for me (the form creator). Issue Details: When I save and share the link, recipients see a “no permission” error. The form is
        • Save the pdf report from a registration form in a Folder

          Through Zoho Forms I created a registration form with quite a lot of rules to handle different variables (TEAM types, payment in installments, etc.), and the result is pretty good. The automatic PDF that is sent to the respondent upon submission is already
        • zoho forms integration to zoho work drive

          Scenario: A user fills out a Zoho Form, entering details such as email, mobile number, and other required information, and uploads supporting documents like PAN, Aadhaar, etc. Upon submission, the data is available in Zoho Forms Reports. Requirement:
        • Zoho Forms to Zoho CRM Integration failed - can I restart it?

          The integration of Zoho Form to Zoho CRM has failed. Is there a way for me to restart it for the impacted entry?
        • insert an equation, but in document, it shows an image not available.

          I'm new to Zoho writer and used Zoho writer in desktop app version . When I inserted an equation, I got an image not available sign. Any help is appreciated. Thanks, Charles
        • Zoho Desk Android app update - Swipe action customization

          Hello everyone! We have brought in support for the swipe action customization in latest version(v2.9.13) of the Zoho Desk Android app update, enabling you to configure left and right swipe gestures on tickets to carry out the actions swiftly without opening
        • Import KB template OR Export template for zoho desk?

          Greetings. Can you tell me if there is a way to get an EXPORT of my KB articles? OR is there a template you supply for importing KB articles into my zoho desk? I am looking for a method of understanding what fields can be imported, and what their possible
        • XML format to import knowledgebase into Zoho Desk

          Hi, We just started to use Zoho Desk and want to import our knowledgebase from our old support system (Freshdesk) to Zoho Desk. Can anyone give us information about the format of xml file to import? There is no explanation on the related page.
        • Next Page