Automation #11 - Auto Update Custom Fields with Values from Emails

Automation #11 - Auto Update Custom Fields with Values from Emails



This is a monthly series designed to help you get the best out of Desk. We take our cue from what's being discussed or asked about the most in our community. Then we find the right use cases that specifically highlight solutions, ideas and tips to optimize your customer support with the automation capabilities of Zoho Desk.

With the help of Custom fields in Zoho Desk you can extract context that is specific to your business. For example, a travel company might want their customers to enter PNR numbers while submitting their tickets. Or, a product manufacturing company may have a mandatory field for serial numbers in the add ticket form.
 
But when your customers send in emails with vital information like Order numbers and PNR numbers listed in the email content, extracting it to add it to the custom fields can be a challenge. Here's an automation designed to help you sidestep this challenge. It extracts specific context from the email content and updates the custom fields automatically.
 
Let's take the example of "Order Number" to understand how we can achieve this automation.
 
You may recall how we replaced Auth-tokens with Connections for all the existing custom functions. So the first step to making the most of ZohoDesk's automation capabilities is to create a connection to be used in the custom function later.
 
To create a  connection, carry out the following steps: 
  1. Click on Setup > Developer Space > Connections 
  2. Click Create Connection
  3. In the Pick Your Service section, under Pre-Defined Services find and select Zoho OAuth
  4. In the Connection Details section, add zohodesk as the Connection Name and Connection LinkName
  5. In the Choose Scopes list, select all values that start with 'Desk.' and ending with '.ALL' and then include Desk.search.READ, Desk.products.READ
  6. Click Create and Connect
  7. In the page that appears, click Connect
  8. If you have more than one portal associated, select the Portal to which this connection should be added and click Accept
Say you receive an email with the content: 
Order Number: 4345312

Contact Name: Sundar

To extract the value of the Order Number from the above email, proceed with these steps: 

  1. Go to Setup, and under Automation, click Workflows.
  2. On the left panel, under Workflows, click Rules > Create Rule.
    In the Basic Information section, carry out the following steps:
  3. In the Module drop-down menu, select Tickets.
  4. Enter a name and description for the rule.
  5. If you want to activate the rule right away, select the Active checkbox. Else, you can just create the rule now and activate it later, on the Rules page.
  6. Click Next.
    In the Execute on section, perform the following steps:
  7. Select the Create checkbox to execute this rule every time a new ticket is created. 
  8. Click Next.
    In the Criteria section, do not select any criteria and move to the next section.
    In the Actions section, carry out the following steps:
  9. Click the + icon and select Custom Functions > New
  10. Click Edit Arguments
  11. In the Name field type TicketID, and from the Value drop-down list select Ticket Id under Ticket Information.
  12. In the script window, input the Custom Function you find below:
    orgId = "paste orgId here";
    fromWord = "Order Number:";
    toWord = "Contact Name:";
    lenfromWord = fromWord.length();
    T_Info = invokeurl
    [
    url :"https://desk.zoho.com/api/v1/tickets/" + TicketID + "/latestThread?include=plainText"
    type :GET
    connection:"zohodesk"
    ];
    plainText = T_Info.getJSON("plainText");
    orderNumber = plainText.subText(plainText.indexOf(fromWord) + lenfromWord ,plainText.indexOf(toWord));
    updateTicket = zoho.desk.update(orgId,"tickets",TicketID,{"cf":{"cf_order_number":orderNumber}});
    info updateTicket;
Once the steps are completed, the value will be updated in a custom field named Order Number and the API name of the field that is cf_order_number. For other business scenarios, you can replace "Order Number" with other keywords that describe the specific values you need to extract.

 

 

 

 

 


    Access your files securely from anywhere







                        Zoho Developer Community





                                              Use cases

                                              Make the most of Zoho Desk with the use cases.

                                               
                                                

                                              eBooks

                                              Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho Desk.

                                               
                                                

                                              Videos

                                              Watch comprehensive videos on features and other important topics that will help you master Zoho Desk.

                                               
                                                

                                              Webinar

                                              Sign up for our webinars and learn the Zoho Desk basics, from customization to automation and more

                                               
                                                
                                              • Desk Community Learning Series


                                              • Meetups


                                              • Ask the Experts


                                              • Kbase


                                              • Resources


                                              • Glossary


                                              • Desk Marketplace


                                              • MVP Corner


                                                        • 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


                                                        Manage your brands on social media



                                                              Zoho TeamInbox Resources



                                                                  Zoho CRM Plus Resources

                                                                    Zoho Books Resources


                                                                      Zoho Subscriptions Resources

                                                                        Zoho Projects Resources


                                                                          Zoho Sprints Resources


                                                                            Qntrl Resources


                                                                              Zoho Creator Resources



                                                                                  Zoho CRM Resources

                                                                                  • CRM Community Learning Series

                                                                                    CRM Community Learning Series


                                                                                  • Kaizen

                                                                                    Kaizen

                                                                                  • Functions

                                                                                    Functions

                                                                                  • Meetups

                                                                                    Meetups

                                                                                  • Kbase

                                                                                    Kbase

                                                                                  • Resources

                                                                                    Resources

                                                                                  • Digest

                                                                                    Digest

                                                                                  • CRM Marketplace

                                                                                    CRM Marketplace

                                                                                  • MVP Corner

                                                                                    MVP Corner







                                                                                      Design. Discuss. Deliver.

                                                                                      Create visually engaging stories with Zoho Show.

                                                                                      Get Started Now


                                                                                        Zoho Show Resources


                                                                                          Zoho Writer Writer

                                                                                          Get Started. Write Away!

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

                                                                                            Zoho CRM コンテンツ






                                                                                              Nederlandse Hulpbronnen


                                                                                                  ご検討中の方




                                                                                                        • Recent Topics

                                                                                                        • Zoho Notifications - Received two notifications for one message and none for the other

                                                                                                          We had a client reply to a ticket twice in one minute. The ticket owner received two emails for the second message but none for the first (which was crucial content and unfortunately was therefore missed). I'm assuming this created a race condition -
                                                                                                        • What is the difference between "Reply" and "Public Comment" in a ticket?

                                                                                                          Hey, my company is thinking about switching to Zoho Desk but we do not understand the difference between the "Reply" and the "Public Comment" feature. When should we use which? And why? What is the difference between them? Thank you for your help! Kindest
                                                                                                        • Zoho Books | Product updates | June 2025

                                                                                                          Hello Users, We’ve rolled out new features and enhancements in Zoho Books, from the option to record advances for purchase orders to dynamic lookup fields, all designed to help you stay on top of your finances with ease. Introducing Change Comparators
                                                                                                        • Zoho Books API Creating Invoice and Address API

                                                                                                          I'm trying to create an invoice with zoho books api and i get the following error: Error creating invoice in Zoho Books: { message: 'Request failed with status code 400', details: { code: 15, message: 'Please ensure that the "billing_address" has less
                                                                                                        • Missing Payload Details

                                                                                                          Hi All, Does anyone know how to fix missing webhook payload data in the next step of the flow? Payload comes into the webhook -- All details here When i go to use the webhook data in the next step -- the majority of the payload data is missing
                                                                                                        • Numeric options in Decision

                                                                                                          Zoho really needs to add options for numeric comparisons in the Decision action. These are the ones that should be implemented: Greater than Less than Greater than or equal to Less than or equal to Equal to (although this is actually handled already)
                                                                                                        • Supercharge your VoC analyses with data from anywhere: Modules are now sources for VoC

                                                                                                          Dear customers, We hope you're well! Your customers talk about your brand, praise your service, criticize your offerings, or promote your business—literally from anywhere on the internet—and it has become strategically necessary to factor in all possible
                                                                                                        • Populate drop down field from another form's subform

                                                                                                          Hello, I found how to do that, but not in case of a subform. I have a Product form that has a subform for unit and prices. A product might have more than one unit. For example, the product "Brocoli" can be sold in unit at 3$ or in box of 10 at 25 $. Both
                                                                                                        • Better Security, Better User Experience | Help Center Update | June'25

                                                                                                          As part of our commitment to enhancing user experience and security, we are happy to announce updates to our authentication mechanism. This update introduces several key enhancements designed to improve the password recovery process and streamline the
                                                                                                        • Anyone Building AI-Based SEO Dashboards in Zoho Analytics?

                                                                                                          Hey everyone, I’m currently working on an SEO reporting dashboard in Zoho Analytics and looking to enhance it with AI-based insights—especially around AI visibility, keyword trends, and traffic sources. The goal is to track not just traditional metrics
                                                                                                        • Nouveautés Zoho Flow - Intégration SAP S/4HANA et SAP HANA

                                                                                                          Bonne nouvelle! Deux applications très attendues dans la galerie d’intégrations de Zoho Flow sont désormais disponibles : ✨ SAP S/4HANA ✨ SAP HANA Que vous gériez des opérations d’entreprise ou des systèmes de données, ces intégrations vous permettent
                                                                                                        • Record/edit view to pop-up simultaneously with button click from report of a different form

                                                                                                          I have two forms: Form A & Form B. Form B contains all of the same fields of Form A, plus a few additional fields. I've created a button in the report view of Form A that creates a new record in Form B and populates all the applicable fields, (I've posted the code I used below), but visually nothing happens on the screen. If I want to finish filling out the remaining fields in Form B, I have to navigate to the report and open the record. How do I get this new record to just pop-up when I click the
                                                                                                        • How to get NSE/BSE Stock Prices in Zoho sheets?

                                                                                                          I've been looking for a function that provides me with the NSE/BSE listed stocks price in Zoho Sheets like GOOGLEFINANCE in Google sheets, but I found none. Please help if there is any way to het stock prices?
                                                                                                        • How to update "Lead Status" to more than 100 records

                                                                                                          Hello Zoho CRM, How do I update "Lead Status" to more than 100 records at once? To give you a background, these leads were uploaded or Imported at once but the lead status record was incorrectly chosen. So since there was a way to quickly add records in the system no matter how many they are, we are also wondering if there is a quicker way to update these records to the correct "Lead Status". I hope our concern makes sense and that there will be a fix for it. All the best, Jonathan
                                                                                                        • Zoho Project API search?

                                                                                                          Good day, i would like to search our entire portal for a task using the API. We have over 20k tasks so I dont to search for all tasks and then do a for each as it would take way to long and also would need to go over the limit of 200 records per query.
                                                                                                        • Cross module filtering is now supported in CRM

                                                                                                          Editions: All DCs: All Release plan: This enhancement is being released in phases. It is now available in AU, JP, and CN DCs. Help resource: Advanced filters The Cross-module filtering enhancement is now available to all CRM accounts in the following
                                                                                                        • Archiving Contacts

                                                                                                          How do I archive a list of contacts, or individual contacts?
                                                                                                        • 【参加無料】8月8日(金) 福岡 ユーザ交流会 参加登録 受付開始!

                                                                                                          ユーザーの皆さま、こんにちは。コミュニティチームの藤澤です。 8月8日(金)に1年ぶりに、福岡でZoho ユーザー交流会を開催します! ユーザー事例セッションでは、CreativeStudio樂合同会社の前田 美知太郎さまが、労働時間を削減したZoho活用のリアルな工夫を語ります。 Zoho社員セッションでは、データ収集から自動処理まで一気に効率化できるZoho Formsの最新活用アイディアをお届けします。 ▷▷詳細はこちら:https://www.zohomeetups.com/Fukuoka2025#/?affl=fuk2508forumpost
                                                                                                        • INVOICE DONT HAVE AN INCOME ACCOUNT FIELD TO POST TRANSACTIONS

                                                                                                          INVOICE DON'T HAVE AN INCOME ACCOUNT LIKE THE EXPENSE ACCOUNT FIELD IN THE EXPENSE MODULE. PLEASE CAN YOU TELL ME WHAT TO DO TO ADD THIS FIELD AND FUNCTION TO POST IT TO THE RIGHT INCOME ACCOUNT. THANK YOU VERY MUCH
                                                                                                        • Error in Deluge script, but all should be OK

                                                                                                          I get an error when using the following deluge script (sensitive info changed with ***). This script should parse a projectnumber out of the subject or body text and put it in a custom field of the ticket. The error: Validation failed for the condition
                                                                                                        • Problems with clipboard paste into ticket comments

                                                                                                          Problem as title. Using Chrome get to paste contents of clipboard but submit gives 'you've exceeded the character limit of 30,000 for this comment' irrelevant of actual number of characters. Edge just pastes txt 'undefined' irrelevant of actual contents of clipboard All other areas of Zoho desk work fine with clipboard paste (i.e. new ticket description) it's just comments on existing tickets that seem to have problem. Was all working fine until early yesterday (14th) Client is Windows 10 Pro 1803
                                                                                                        • Support Mixed Visibility Settings in Knowledge Base Categories

                                                                                                          Hello Zoho Desk Team, We hope you're all doing well. We’d like to submit a feature request regarding visibility settings in the Knowledge Base module. 🎯 Current Limitation As of today, when a category is set to a specific visibility level (e.g., Public),
                                                                                                        • Mapping Issue

                                                                                                          since, Tickets are already mapped with the Requestors and when we map Requestors with Organization, then Tickets are not visible under that Organization. Kindly solve this issue.
                                                                                                        • New features and improvements in Desk's integration with Zia powered by GPT 

                                                                                                          Hi everyone, We’re pleased to announce several new enhancements in Zia Powered by GPT integration. These updates bring more customization options, improved response generation, and additional language support. Below is an overview of the enhancements
                                                                                                        • Painéis do Zoho CRM ajudam na Gestão Comercial?

                                                                                                          A gestão do departamento comercial é uma questão fundamental para qualquer empresa. Uma boa gestão proporciona previsibilidade, alinhamento e melhores resultados. Acredito que todos que adquirem uma plataforma de CRM buscam uma gestão ágil e eficiente
                                                                                                        • Empowered Custom Views: Cross-Module Criteria Now Supported in Zoho CRM

                                                                                                          Hello everyone, We’re excited to introduce cross-module criteria support in custom views! Custom views provide personalized perspectives on your data and that you can save for future use. You can share these views with all users or specific individuals
                                                                                                        • Why don't we have better integration with Mercado Pago or Pagseguro?

                                                                                                          Currently, the integration between Zoho Commerce and Mercado Pago for Brazil is very poor... Since it is old, it does not include the main payment method in Brazil today, which is PIX. Is there a date for this to finally be launched? There are numerous
                                                                                                        • How to Bulk-Update Sales Orders in CRM

                                                                                                          Hi - I need to bulk update existing sales orders with dates from our ERP of when the sales orders were created. I made a date field on the Sales Order module where I want to insert that data. I can't Mass Update because I am not updating the fields to
                                                                                                        • How to track salesiq on google analytics without GTM

                                                                                                          Hello! We had to move the installation of the SalesIQ widget from GTM to directly do it in our wordpress site. The SalesIQ widget was being blocked by Adblockers which caused a lot of our visitors to not be able to see it. This issue was fixed from deleting
                                                                                                        • Feature Request - Improved booking layouts, specifically for individual booking links

                                                                                                          I would like to see more layout options and specifically to have the meeting description beside the calendar booking function, when sharing booking links to specific consultations/meetings. Below is a screenshot from Calendly. I love this layout and it
                                                                                                        • Announcing New Features in Trident for macOS (v.1.2.0)

                                                                                                          Hello Community, Trident for macOS has quite a few new features that will improve your business email communication. Let's take a quick look at them. Creating templates Earlier, you could save email drafts as templates in Trident. With the current update,
                                                                                                        • Products in time entry

                                                                                                          Morning, Is there a way to add the product field to the time entry layout? Giving us the ability to identify a product per time entry. Thanks Rudy
                                                                                                        • Zoho.eu and U.S. Cloud Act? Can U.S. request Zoho.eu data?

                                                                                                          Given the current political situation in the U.S. and possible near future implications for data privacy and security, I am curious about Zoho’s obligation to comply with the U.S. cloud act or other U.S. requests for private customer information from
                                                                                                        • Zoholics Europe Awards

                                                                                                          We're excited to announce that at this year's Zoholics events across Europe, we're holding customer awards for the first time ever! This is your chance to shout about the amazing things you've created, connected, or achieved with Zoho's developer application!
                                                                                                        • Fetching whole month availability via API

                                                                                                          We are currently building a custom calendar component that books directly into our client's Zoho Bookings instance. The challenge we are facing is that your API only allows fetching availability one day at a time, which is problematic. Our second workaround
                                                                                                        • Why "balance due" for the VOIDED INVOICE is not zero?

                                                                                                          We wonder why the "balance due" for the VOIDED INVOICE is not zero? For example our case, we issued invoice for a client for MYR1000, then after client request for cancellation. Client haven't make payment yet. So we marked the invoice as void. We think
                                                                                                        • Format handling error

                                                                                                          Hi, I'm having an issue when merging a document using a custom function when with decimal numbers. In my template preview, it's seems correct ,but when I do the merge and attach the file to a record, all types of docs aren't displaying the number correctly.
                                                                                                        • Announcing New Features in Trident for macOS (v.1.20.0)

                                                                                                          Hello everyone! Trident for macOS is here with interesting features and enhancements to elevate your workplace communication and productivity. Let's take a quick look at them. Change the "From" email address easily. When composing or replying to an email,
                                                                                                        • we need to add a Customer Number field to the PDF document templates

                                                                                                          Hello everyone. We are currently using Zoho Inventory for our small business operations and have found it to be a valuable tool. However, we’ve encountered a specific requirement: we need to add a Customer Number field to the PDF document templates (such
                                                                                                        • Announcing new features in Trident for Windows (v.1.27.6.0)

                                                                                                          Hello Community, Trident for Windows is here with exciting new features to elevate your email communication. Let’s dive into what’s new! View and manage .pst files. A .pst (Personal Storage Table) file is an Outlook Data Storage file format for storing
                                                                                                        • Next Page