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 Desk under Default Services.
  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 Section. Click 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 


        Zoho Campaigns Resources


          • Desk Community Learning Series


          • Digest


          • Functions


          • Meetups


          • Kbase


          • Resources


          • Glossary


          • Desk Marketplace


          • MVP Corner


          • Word of the Day


          • Ask the Experts


            • 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

            Zoho CRM Plus Resources

              Zoho Books Resources


                Zoho Subscriptions Resources

                  Zoho Projects Resources


                    Zoho Sprints Resources


                      Zoho Orchestly Resources


                        Zoho Creator Resources


                          Zoho WorkDrive Resources



                            Zoho CRM Resources

                            • CRM Community Learning Series

                              CRM Community Learning Series


                            • Tips

                              Tips

                            • Functions

                              Functions

                            • Meetups

                              Meetups

                            • Kbase

                              Kbase

                            • Resources

                              Resources

                            • Digest

                              Digest

                            • CRM Marketplace

                              CRM Marketplace

                            • MVP Corner

                              MVP Corner




                              Zoho Writer Writer

                              Get Started. Write Away!

                              Writer is a powerful online word processor, designed for collaborative work.

                                Zoho CRM コンテンツ


                                  ご検討中の方

                                    • Recent Topics

                                    • Decoupling Email Sending from Storage in CRM & Email Storage Add-on Purchases

                                      Hello everyone, We are excited to announce the rollout of the second phase of our email storage management, designed around a simple principle: your business communication should never be disrupted by storage limits. We've decoupled email sending from
                                    • Edit PDFs using Zoho PDF Editor

                                      Hello users, In a previous article, we covered the organizing capabilities of Zoho PDF Editor. Here, we'll provide a quick recap of its editing features, including a few new additions. A few highlights of Zoho PDF Editor's editing capabilities: Add and
                                    • Feature Request - Ability to Customise Contact Info Card on Ticket Details View

                                      Hi Desk Team, I've added a "Contact Priority" and "Account Prioirty" field and it would be very useful to agents if they could see that information in the Contact Info card on the Ticket Details view. It would be great if we could choose some fields to
                                    • What is a realistic turnaround time for account review for ZeptoMail?

                                      On signing up it said 2-3 business days. I am on business-day 6 and have had zero contact of any kind. No follow-up questions, no approval or decline. Attempts to "leave a message" or use the "Contact Us" form have just vanished without a trace. It still
                                    • Customer portal: recommended way to scope lookup fields to the logged-in client?

                                      Hi all, I'm building a customer portal on Creator for our clients (we're a esting lab, so each client has their own sites, contacts and jobs). Planning stage, so I'd rather get the approach right before I build it. The portal forms need several lookup
                                    • Zia for Mail: AI-powered assistance for Email, Calendar, and ToDo in Zoho Mail

                                      Zia for Mail brings AI assistance into Zoho Mail for everyday email, calendar, and task activities. Administrators can integrate third-party AI providers, such as ChatGPT or Gemini, and decide which features are available to users. What is Zia for Mail
                                    • "Else / If" Statement in Zoho CRM Inventory Template

                                      Hello, I would like to use the below "Else If" in my Inventory Templates, but it's not working correctly. Essentially, if the field "Quote Payment Terms" is filled in, display that. If "Quote Payment Terms" is blank, display "Account Payment Terms" instead.
                                    • Office Integrator

                                      Our users are complaining the slowness and speed when working in Zoho Office. Explicitly when working in a sheet. Here are observed issues *Copy and pasting values from one cell into another takes 10-20 seconds to show it has done it. *Modifying a value
                                    • [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
                                    • Subform UI Unresponsive

                                      Has subform with a couple of hundreds of rows but suddenly the you can't add any row nor edit any fields. The subform has 10 columns Any thoughts on this Zoho team?
                                    • Kaizen #267: Four Developer Tools, One Prompt: Cracking Custom Cases with the Zoho CRM Skill

                                      Hello everyone! Welcome back to another Kaizen post. In this Kaizen, we’ll see how the Zoho CRM Skill solves a custom use case that requires multiple Zoho CRM developer tools. You describe the requirement in plain language, and the skill identifies the
                                    • 【開催報告】 福岡 ユーザー交流会 NEXUS 2026/10/30 | CRM×AIの実践事例とZia Agents活用を紹介

                                      Zoho ユーザーの皆さん、こんにちは。 コミュニティグループの中野です。 10月30日(金)、福岡にてZoho ユーザー交流会 NEXUSを開催しました。 今回は、Zoho CRM × AIをテーマに、ユーザーさんによる実践事例、 Zia Agentsのデモ、参加者同士のグループワークなどを実施しました。 ご参加いただいた皆さん、ありがとうございました! 本投稿では、当日の様子を一部ご紹介します。 ユーザー活用事例 :Zoho CRM × AIを、実際の営業業務でどう使う? 登壇者:株式会社etika
                                    • KB Articles from Zoho Learn - Import as .md

                                      I love the concept of being able to use articles from Zoho Learn as knowledge base articles for Zia Agents. This will absolutely help with proper documentation and organization of company processes and SOPs. This was a great concept. However, even when
                                    • Service Account Admin for API Calls and System Actions

                                      Hello, I would like to request the addition of a Service Account Admin option in Zoho product. This feature would allow API calls and system actions to be performed on behalf of the system, rather than an active user. Current Issue: At present, API calls
                                    • Trigger workflows from SLA escalations in Zoho Desk?

                                      Hey everyone, I’m currently working with SLA escalation rules in Zoho Desk and ran into a limitation that I’m hoping someone here has solved more elegantly. As far as I can tell, SLA escalations only support fairly limited actions (like changing the ticket
                                    • Trident Missing

                                      No way you guys get so close to having trident complete for over a year then just kill it off. Wow just wow
                                    • Zoho One - Can I add a Custom View to All Departments

                                      We have been using Desk for several years but are just making the leapt to using multiple departments. I have a custom view that is our default view. I'd like to apply that to All Departments. When I try to add a view when viewing All Departments I get
                                    • A way to create kits (groups of items) that do not require bundling and are added to an order as the individual items

                                      We are evaluating moving off of Sage BusinessWorks (which handles accounting, order entry, inventory control, accounts receivable, etc) to Zoho Books/Inventory. One of the things we heavily use is a feature called Kits, which allows creating a group of
                                    • Issue While Rescheduling Interviews in Zoho Recruit

                                      Dear Zoho Support Team, We are facing an issue with the Interview Rescheduling functionality in Zoho Recruit integrated with Microsoft Teams. Problem Description When an interview is rescheduled through Zoho Recruit: The new interview is created successfully
                                    • Global Constants / Variables

                                      It would be great if there were a Global Constant feature. The idea here is for managing constants that are used in multiple Flows and Subflows, but might change over time. The idea is that the change could be made in one place and cascade to all future
                                    • Zoho Campaigns 3.0 is here

                                      Zoho CampaignsAnnouncements We're excited to introduce the all-new Zoho Campaigns, where we have introduced our biggest update yet. Marketing has evolved far beyond email. Today's campaigns span email, SMS, and WhatsApp, customers expect personalized
                                    • Tip #95 – Collect support requests right from your website with Web Forms – 'Insider Insights'

                                      Hello Zoho Assist Community! When a customer needs help, the first step often decides how smooth the rest goes. They email a vague description, a technician asks follow-up questions, and the real details only surface after several rounds of back and forth.
                                    • Unable to integrate Whatsapp Messaging into Zoho CRM - Business Messaging

                                      Hello, I want to set up Business Messaging in our Zoho CRM and am struggling to set it up. I have logged into the account and our facebook business page, our business shows in the dropdown for WhatsApp Business Account but does not for WhatsApp Business
                                    • E-Invoicing Automation

                                      Do you have an API endpoint for pushing the invoice through the e-tims for Kenya
                                    • Phone system to integrate with Zoho CRM

                                      I am looking for phone software that would allow my agency to do the following within Zoho CRM: Make calls from zoho Track calls and notes Leave pre-recorded messages after reaching voicemail of lead Only 2 members, so need company who will allow just
                                    • Automation Series: Automate Project File Uploads from Zoho WorkDrive

                                      Project documents are often prepared before development begins. When files such as product requirements, design files, guidelines, or plans are stored in a shared folder in Zoho WorkDrive, teams can automate copying them to the corresponding project team
                                    • Is it possible to report on Task Duration in minutes/hours rather than by start and due date?

                                      I'm currently evaluating the free version of CRM and I like lots of things about it, it will definitely help my business with sales automation and I will upgrade to a paid version once the evaluation is finished. However, I also want to use CRM for existing clients (accounts) where I can track how much time is being spent on tasks for these clients.  I can see clearly that both calls and events for each account have time tracking in minutes / hours but tasks do not have this. Is it possible in one
                                    • Why is it so hard to get a fiscal YTD P&L report in Zoho Books?

                                      Yes I know that it could be done in Zoho Analytics, but I would have expected this default report view to be easily accessible in the list of Books accounting reports. Just like any other basic accounting system, I'm looking for monthly columns of the
                                    • ¡Nuevo Meetup en Barcelona! - Automatiza procesos con los agentes de Zia en Zoho

                                      ¡Hola a todos! Estamos encantados de anunciaros que el próximo 3 de diciembre estaremos en Barcelona con un nuevo Meetup de Español Zoho Community. Estos encuentros son una oportunidad fantástica para conectar con otros usuarios de Zoho, ampliar conocimientos
                                    • Stock count by bin location

                                      Is there a configuration to make a stock count by bin or area and not by product. these is useful to manage count by area Regards
                                    • Bank Feeds - Again

                                      Bank feeds broken again for me. I don't see other recent posts on this, so maybe it's just us? Tried: refresh update cred/ deact./react. feeds chat support Nothing. On day 2 without zoho as a result, which is crippling for us. We've used zoho for a year
                                    • Introducing Auto Check-out for Attendance

                                      We are pleased to announce the release of the Auto Check-out feature in Zoho People. Auto Check-out is now available as a built-in setting under Shifts to automatically check out employees who have not recorded their check-out for the day. Administrators
                                    • Issue with SalesIQ Chats Automatically Closing Due to the 24-Hour Idle Timeout?

                                      Hello, I am experiencing a significant issue with SalesIQ automatically closing chats due to the Idle Timeout setting. I use SalesIQ through the integration between SalesIQ and Line App. To be honest, this issue has become extremely frustrating. Problems
                                    • ChatGPT Plugin / MCP Server auth error

                                      Hi all I'm trying to connect the ChatGPT plugin for Zoho CRM but after username stage of the auth process, I get this error from the URL https://mcp.zoho.eu/mcp-client/ {"error_description":"Invalid request url, Request is not as per defined in oauth
                                    • Zoho Amount Cell Greyed Out

                                      I noticed a few days ago that the 'amount' cell on my Zoho App software in my windows PC is greyed out and I can't click on it to add an amount figure when recording invoice or expenses. Wheareas on mobile I can do it easily
                                    • 申請メール、まだ一件ずつ確認していませんか?― Zoho Formsで申請業務を効率化

                                      ユーザーの皆さま、こんにちは。ゾーホージャパンの友田です。 「備品を購入したいので申請します」 「イベントに参加したいです」 「経費の申請をお願いします」 このような社内申請を、メールやチャットで受け付けていませんか? メールでも申請はできますが、 「必要な情報が書かれていない」 「申請内容をあとから一覧にまとめている」 「誰がどこまで確認したのか分からない」 といった手間が発生することも。 そんな申請業務にも、Zoho Formsを活用できます。 必要な情報を、フォームでまとめて入力 例えば、備品購入の申請なら、
                                    • URGENT: Zoho Wiki searches return garbled nonsense

                                      For at least the past few days, the Search function in Zoho Wiki has been returning only strings of random characters. Example search result: The page name is readable, but the context body text is gibberish. So something is obviously broken with either
                                    • Is it really true that I can't set the default 'deposit to' account in 2025?

                                      I've been using Books for 7 years and the default account has never been a problem. I usually manually reconcile invoices and have never had a thought about which account. It has always been my account. However, I recently noticed that for the past 4
                                    • Zoho CRM gets a new email compose and lot more

                                      Dear Customers,  [UPDATE October 21, 2021: We have started opening these features to some of the customers already. And, it will be available to all the customers before November 2nd Week, 2021. Sorry for the delay caused]  [UPDATE February 21, 2022:
                                    • #19 What about the money I spend on the job?

                                      Meera buys props for a shoot, keeps the receipt in her bag, and expects to photograph it on the way back and never think about it again. The props get billed to the client at cost. The usual way to do this Covered in our published Expenses FAQ. The short
                                    • Next Page