Kaizen 232 - Building a Ticket Escalation Mechanism from Zoho CRM

Kaizen 232 - Building a Ticket Escalation Mechanism from Zoho CRM



Howdy, Tech Wizards!

Picking up the thread from last week, we will continue our Zoho CRM and Zoho Desk integration. 

In Kaizen #231 - Embedding Zoho Desk Tickets in Zoho CRM, we built a Related List widget that displays open Zoho Desk tickets within the Contact detail page. 

Now, let us take it a step further. 

We will enable sales representatives to escalate critical support tickets directly from Zoho CRM.

This controlled escalation mechanism triggers the SLA in Zoho Desk and simultaneously creates a trackable work item in Zoho CRM. The work item captures additional notes from the Sales team, enabling immediate action by the support team. It also allows Sales to monitor escalation progress anytime.

Business Problem

At Zylker, the Sales team works in Zoho CRM to manage customer relationships and track ongoing deals, while the Support team uses Zoho Desk to manage customer issues and service requests. Now the sales representatives have visibility into open support tickets using the widget built in the previous post. However, there is no structured way to escalate tickets from within Zoho CRM.

This leads to:
  1. Delayed escalations, increasing customer frustration.
  2. Lack of accountability when issues slip through the cracks.
  3. No audit trail of internal interventions for compliance and review.
Visibility alone is not enough. Sales teams need an actionable escalation mechanism within CRM.

Solution

We will extend the existing Related List widget by adding an Escalate button to each ticket row. On clicking this button, a confirmation pop-up appears. 

When the user clicks the Confirm button in the pop-up, the ticket status in Zoho Desk is updated to Escalation from Zoho CRM. This status change triggers the associated SLA configured in Zoho Desk.

As part of the SLA automation, the ticket priority can be updated to High, and the ticket owner can be notified. You can also configure additional actions based on your business requirements. If the Support team does not respond within the defined SLA time, the ticket can be automatically escalated to a manager or the escalation team.

After the ticket status is updated, the confirmation pop-up closes and an escalation form appears within the parent widget. This form allows the Sales team to capture additional details such as escalation reason, customer impact, and expected closure date. When the form is submitted, a record is created in a custom module called Escalation Work Items in Zoho CRM.

The Support team accesses only the Escalation Work Items module in Zoho CRM. This module acts as a shared escalation tracker between the Sales and Support teams. Support agents review the escalation details provided by Sales, take the required action in Zoho Desk, and update the escalation record in CRM. This allows the Sales team to track progress and stay informed before their sales call. 

Prerequisites

1. Complete the Related List Widget setup from Kaizen #231 - Embedding Zoho Desk Tickets in Zoho CRM. Ensure the following are already configured:
  1. Related List Widget in CRM
  2. Two-way sync between Zoho CRM and Zoho Desk
  3. Existing Zoho Desk connection
  4. Working widget project
2. Update the existing Zoho Desk connection to include the Desk.tickets.UPDATE scope in addition to the existing Desk.tickets.READ and Desk.contacts.READ scopes.


Refer to the Connections help doc for more information. 

3. Create a custom module named Escalation Work Items in Zoho CRM to store escalation records. 


  1. Go to Zoho CRM > Setup > Customization > Modules and Fields.
  2. Click Create New Module and enter Escalation Work Items as the module name. 
  3. Add the following custom fields:
Fields
Date Type
Contact Name
Lookup
Customer Impact
Multiline
Desk Ticket
URL
Escalation Reason
Multiline
Expected Closure Date
Date Time

Refer to the Customizing Modules help page to learn more about it. 


Make GET Modules Metadata and GET Fields Metadata API calls to retrieve the API names of the required module and its fields.

Store these API names, as they will be used later in the widget implementation.

4. Create a custom ticket status in Zoho Desk to differentiate that the particular ticket is escalated from Zoho CRM. 
  1. Log into Zoho Desk. 
  2. Go to Settings > Customization > Layouts and Fields > Ticket Status and click Add Status.
  3. Fill in the Status Name, Status Type and click Save.


4. Create an SLA in Zoho Desk that triggers when the ticket status changes to Escalation from Zoho CRM.
  1. Go to Settings > Automation > Service Level Agreements and click New SLA
  2. Provide Name and Description to the SLA. 
  3. Choose the trigger condition as Field Update and select the Status field. 
  4. Click Next and proceed configuring the target
  5. Configure the escalation rules, response times, and resolution targets as per your business requirements.


5. Create two new files called escalate-popup.html and escalate-popup.js in the widget project. These files will handle the confirmation dialog UI and button actions. 

This pop-up acts as a sub-widget of the parent Related List widget.

6. Validate and Pack the parent widget with the empty files and upload it to Zoho CRM to register the sub-widget. 
  1. Go to Zoho CRM > Setup > Developer Hub > Widgets and click Create New Widget
  2. Provide the widget details and choose the widget type as Button.
  3. Set the file path of escalate-popup.html as the Index Page and upload the package. 
  4. After saving the widget, navigate to the Widget Details page to find its API name. Store this API name, as it will be required in the parent widget to render the pop-up using the openPopup() method. 

Step-by-Step Implementation

In the existing widget project directory, we will add the escalation functionality.

Step - 1: Add the Escalate Button to the Ticket Table

In the renderTickets function, add an escalate button alongside the view link for each ticket row. On clicking, the button has to call the escalateTicket function that opens a pop-up. 

Step - 2: Create the Escalation Confirmation Pop-up

Add the HTML and CSS for the pop-up in the escalate-popup.html and the button functions in the escalate-popup.js file. 

ZOHO.embeddedApp.on("PageLoad", function(data) {
    console.log("Escalation popup loaded with data:", data);
});
ZOHO.embeddedApp.init();
// Confirm escalation - close popup and return confirmed: true
document.getElementById('confirmBtn').addEventListener('click', function() {
    $Client.close({ confirmed: true });
});
// Cancel escalation - close popup and return confirmed: false
document.getElementById('cancelBtn').addEventListener('click', function() {
    $Client.close({ confirmed: false });
});

Use the $Client.close() in pop-up to return data back to the parent widget. When the user clicks Confirm, it returns { confirmed: true }, and when they click Cancel, it returns { confirmed: false }.

Step - 3: Implement the Escalate Ticket Function

In the escalateTicket function, use the openPopup method to open the escalate-popup.html file and render the confirmation dialog. 

When the user clicks Confirm, call the Zoho Desk Update Ticket API to change the ticket status to Escalation from Zoho CRM. This status change automatically triggers the configured SLA in Zoho Desk.

// Escalate a ticket using openPopup
async function escalateTicket(ticketId, subject) {
    try {
        // Open the escalation confirmation popup widget
        var result = await ZDK.Client.openPopup({
            api_name: 'Zoho_Desk_Pop_Up',
            type: 'widget',
            animation_type: 6,
            header: 'Escalate Ticket',
            bottom: 'center',
            height: '250px',
            width: '400px'
        }, {
            ticketId: ticketId,
            subject: subject
        });
        console.log("Popup result:", result);
        // If user clicked Confirm
        if (result && result.confirmed) {
            ZDK.Client.showLoader('Escalating ticket...');
            // Update ticket status to "Escalation from Zoho CRM" using Desk Update Tickets API
            const updateResponse = await deskZrc.patch('/tickets/' + ticketId, {
                status: 'Escalation From Zoho CRM'
            });
            console.log("Update Ticket Response:", updateResponse);
            ZDK.Client.hideLoader();
            ZDK.Client.showMessage('Ticket escalated successfully');
            // Show escalation details form
            var ticketUrl = 'https://desk.zoho.com/agent/zylkerpvtltd/zylker/tickets/details/' + ticketId;
            renderEscalationForm(ticketId, ticketUrl, subject);
        }
    } catch (error) {
        ZDK.Client.hideLoader();
        console.error('Error escalating ticket:', error);
        ZDK.Client.showAlert('Failed to escalate the ticket. Please try again.', 'Error');
    }

After the ticket status is successfully updated, render an escalation form within the parent widget to capture additional details.

The form should pre-populate the ticket subject and ticket URL as read-only fields. It should also allow the user to enter the customer impact, escalation reason, and expected closure date.

Step - 4: Create an Escalation Entry in Zoho CRM

The Save button should trigger the saveEscalationRecord function. The function validates that all fields are filled and formats the datetime with timezone offset as required by Zoho CRM. The Contact_Name field relates the escalation record to the current Contact using the entityId captured during page load.

With this payload, the function creates a record in the Escalation Work Items module using the Insert Record API via the ZRC POST method

// Save escalation record to Zoho CRM
async function saveEscalationRecord(ticketUrl, ticketSubject) {
    var customerImpact = document.getElementById('customerImpact').value.trim();
    var escalationReason = document.getElementById('escalationReason').value.trim();
    var expectedClosureDate = document.getElementById('expectedClosureDate').value;
    if (!customerImpact || !escalationReason || !expectedClosureDate) {
        ZDK.Client.showAlert('Please fill in all fields before saving.', 'Validation Error');
        return;
    }
    // Format datetime with timezone offset for CRM 
    var dateObj = new Date(expectedClosureDate);
    var tzOffset = -dateObj.getTimezoneOffset();
    var tzSign = tzOffset >= 0 ? '+' : '-';
    var tzHours = String(Math.floor(Math.abs(tzOffset) / 60)).padStart(2, '0');
    var tzMins = String(Math.abs(tzOffset) % 60).padStart(2, '0');
    var closureDate = dateObj.getFullYear() + '-' +
        String(dateObj.getMonth() + 1).padStart(2, '0') + '-' +
        String(dateObj.getDate()).padStart(2, '0') + 'T' +
        String(dateObj.getHours()).padStart(2, '0') + ':' +
        String(dateObj.getMinutes()).padStart(2, '0') + ':' +
        String(dateObj.getSeconds()).padStart(2, '0') +
        tzSign + tzHours + ':' + tzMins;
    var recordData = [{
        "Name": ticketSubject,
        "Customer_Impact": customerImpact,
        "Escalation_Reason": escalationReason,
        "Expected_Closure_Date": closureDate,
        "Desk_Ticket": ticketUrl,
        "Contact_Name": { "id": entityId }
    }];
    try {
        ZDK.Client.showLoader('Saving escalation record...');
        const crmResponse = await zrc.post('/crm/v8/Escalation_Work_Items', {
            data: recordData
        });
        console.log("CRM Insert Response:", crmResponse);
        ZDK.Client.hideLoader();
        ZDK.Client.showMessage('Escalation record created successfully');
        // Go back to tickets list
        await loadTickets();
    } catch (error) {
        ZDK.Client.hideLoader();
        console.error('Error creating escalation record:', error);
        ZDK.Client.showAlert('Failed to create escalation record. Please try again.', 'Error');
    }
}

Step - 5: Validate and Pack the Widget

Follow the steps given in the Widget help page to validate and pack the widget. A complete working code sample is provided as attachment at the end of this post.

Step - 6: Update the Widgets in Zoho CRM

Since we have added new functionality to the widgets, we need to update it in Zoho CRM.
  1. Go to Zoho CRM > Setup > Developer Hub > Widgets.
  2. Locate the existing Related List widget and pop-up widget. 
  3. Click the settings icon and select Edit
  4. Update the package in both the widgets and click Save

Try it Out!

Let us look at the escalation flow from the Contacts detail page in Zoho CRM.



Info
Key Points to Remember
  1. The Desk connection must include Desk.tickets.UPDATE scope in addition to Desk.tickets.READ and Desk.contacts.READ scopes.
  2. The custom module API name Escalation_Work_Items and field API names like Customer_Impact, Escalation_Reason, Expected_Closure_Date, Desk_Ticket, and Contact_Name are organization-specific. Replace them with your actual API names in the saveEscalationRecord function.
  3. The pop-up widget must be registered separately in the Widgets page, and its API name must be used in the openPopup method. Update the api_name parameter in line 229 with your pop-up widget's API name.
  4. Update the Desk URL pattern in lines 182 and 266 with your portal name and company name.
  5. Ensure the SLA in Zoho Desk is configured to trigger when the status changes to Escalation from Zoho CRM.
  6. If you have a large number of contacts or tickets, implement pagination using from and limit parameters as mentioned in the previous Kaizen.
We hope this Kaizen empowers your sales team to take immediate action on critical support issues without leaving Zoho CRM. The combination of visibility and controlled escalation ensures that no customer issue falls through the cracks.

Have questions or suggestions? Drop them in the comments or write to us at support@zohocrm.com.

On to Better Building!

-----------------------------------------------------------------------------------------------------------

Related Reading 

2. Connections - An Overview
3. CRM Customizations - Related Lists
4. CRM APIs - Insert Records API

-----------------------------------------------------------------------------------------------------------
Idea
Previous Kaizen: Embedding Zoho Desk Tickets in Zoho CRM | Kaizen Collection: Directory


    • Sticky Posts

    • Kaizen #198: Using Client Script for Custom Validation in Blueprint

      Nearing 200th Kaizen Post – 1 More to the Big Two-Oh-Oh! Do you have any questions, suggestions, or topics you would like us to cover in future posts? Your insights and suggestions help us shape future content and make this series better for everyone.
    • Kaizen #226: Using ZRC in Client Script

      Hello everyone! Welcome to another week of Kaizen. In today's post, lets see what is ZRC (Zoho Request Client) and how we can use ZRC methods in Client Script to get inputs from a Salesperson and update the Lead status with a single button click. In this
    • Kaizen #222 - Client Script Support for Notes Related List

      Hello everyone! Welcome to another week of Kaizen. The final Kaizen post of the year 2025 is here! With the new Client Script support for the Notes Related List, you can validate, enrich, and manage notes across modules. In this post, we’ll explore how
    • Kaizen #217 - Actions APIs : Tasks

      Welcome to another week of Kaizen! In last week's post we discussed Email Notifications APIs which act as the link between your Workflow automations and you. We have discussed how Zylker Cloud Services uses Email Notifications API in their custom dashboard.
    • Kaizen #216 - Actions APIs : Email Notifications

      Welcome to another week of Kaizen! For the last three weeks, we have been discussing Zylker's workflows. We successfully updated a dormant workflow, built a new one from the ground up and more. But our work is not finished—these automated processes are
    • Recent Topics

    • Zoho Meeting - Feature Request - Introduce an option to use local date and time formating

      Hi Zoho Meeting Team, My feature request is to add an option for dates to be displayed in the users local format. This is common practice across Zoho applications and particularly relevant to an application like Zoho Meeting which revolves around date
    • Cannot give public access to Html Snippet in Zoho Creator Page

      Hi, I created a form in Zoho Creator and published it. The permalink works but I want to override the css of the form. (style based URL parameters is not good enough) So I created a page and added an Html snippet. I can now override the css, which is
    • How can Outlook 365 link back into Zoho Projects so meetings and events in Outlook calendar show in Zoho?

      We use Outlook 365 for our emails and diaries and have integrated Zoho Projects with Office 365. One challenge we face is getting Zoho Projects to recognise when we have meetings and events in Outlook and not allow project managers to assign tasks over that period. Is there a way to resolve this? Thanks
    • On Edit Validation Blueprint

      Hello, I have a notes field and a signature field. When the Approve button is clicked, the Signature field will appear and must be filled in. When the Reject button is clicked, the Notes field will appear and must be filled in. Question: Blueprint will
    • Zoho Invoice en Navarra (Spain)

      Hola, ¿Alguien usa Zoho Invoice en la Comunidad Foral de Navarra? En Navarra tenemos un sistema tributario diferente y no aplica Verifactu (la Hacienda Foral de Navarra ha anunciado su alternativa, NaTicket, pero no ha informado cuándo entrará en vigor).
    • Emails from Zoho are getting blocked due to Zoho IP address being blacklisted

      This is the info I got from my hosting provider – please address this issue immediately. I don’t expect this from such a big household name. Every single invoice I have sernt it not being received by my clients, all being blocked. All of a sudden. As
    • agentid : Where to find?

      I've been looking around for this agenId to check for the total ticket assigned on a specific agent url :"https://desk.zoho.com/api/v1/ticketsCountByFieldValues?departmentId=351081000000155331&agentId=35108xxxxxx132009&field=statusType,status" type :GET
    • Zoho DataPrep integration with OpenAI (beta)

      We are thrilled to announce Zoho DataPrep's integration with OpenAI. The public beta roll-out opens up three features. Users who configure their OpenAI Organizational ID and ChatGPT API key (Find out how) will be able access the features. The features
    • AI Bot and Advanced Automation for WhatsApp

      Most small businesses "live" on WhatsApp, and while Bigin’s current integration is helpful, users need more automation to keep up with volume. We are requesting features based on our customer Feedbacks AI Bot: For auto-replying to FAQs. Keyword Triggers:
    • Setting total budget hours for a specific project

      Hi there, I work on a lot of projects that have fixed budget hours. Is there a way to enter the total budgeted hours so i can track progress and identify when hours have been exceeded. I see in the projects dashboard there is a greyed out text saying
    • Clone entire dashboards

      If users want to customize a dashboard that is used by other team members, they can't clone it in order to customize the copy. Instead they have to create the same dashboard again manually from scratch. Suggestion: Let users copy the entire dashboard
    • Introducing Formula Fields for performing dynamic calculations

      Greetings, With the Formula Field, you can generate numerical calculations using provided functions and available fields, enabling you to derive dynamic data. You can utilize mathematical formulas to populate results based on the provided inputs. This
    • Getting started with Zoho PDF Editor

      Hello users, If you are new to Zoho PDF Editor or aren't sure of its full potential, then this article is for you. Zoho PDF Editor is a free online PDF editing tool, that allows you to upload and edit PDFs, insert text and images, add fillable and e-signature
    • Zoho Projects - Cloning a task does not trigger task workflow when created

      Hello! I have a Project where my team uses a set of tasks from a tasklist as templates, so we could simply clone it and drag it to another list in kanban view to avoid creating a new one from scratch. The process works well, but after cloning it the new
    • Purchase Orders not in sequence

      I am unable to sort by Purchase Order Numbers. I can only sort by date; however, the PO numbers aren't in the order they were entered. This was not the case prior to today.
    • Internal Fillable Contract with Zoho Writer (Before Sending to Client)

      Hi everyone, I’m trying to automate the following process in Zoho CRM and would appreciate some guidance. Process: When a Deal moves to a specific stage, CRM triggers an automation. CRM sends a contract template to an internal team member so they can
    • Date/time displayed in ZohoCRM does not match date/time of entries in ZohoForm

      Hello there, we use a ZohoForm as a worksheet, i.e. users use it to track start time, break and stop time for every working day. The ZohoCRM org time zone is set on GM -4, so is the Time Zone in the Date&Time section in ZohoForm (see attachment). Despite
    • Update Existing Records greyed out in Free Version

      Trying to update records from an Excel sheet, and not getting the option to update. Only option is to add as new accounts. All documentation I can see says update should be an option! Accounts, Leads, Contacts, all the same.
    • Dynamically Populate Picklist Values from Another Module Using Client Script

      I am working in Zoho CRM and trying to dynamically populate a picklist field in the Partners module using values stored in another custom module. I have two modules: 1. Partners Module Field: Partner_Type_Pick Field Type: Picklist 2. Partners_Type Module
    • Add zoho calendar to google calendar

      Hi I keep seeing instructions on how to sync Zoho CRM calendar with google calendar but no instructions on how to view Zoho calendar in my google calendar.
    • Zoho Community Digest : Jan 2026 | Part 1

      Hello Everyone! Staying in the loop with Zoho's latest product updates and features across the vast Zoho Community Forums can be a real challenge. We get it. With over 50+ applications, each with its dedicated forum, it's easy to miss out on important
    • World date & time format

      Hello, Is there a timeline to get the worldwide used date and time format ? I mean not the american one... I mean day month year, and 24 hours clock. Regards
    • Nimble enhancements to WhatsApp for Business integration in Zoho CRM: Enjoy context and clarity in business messaging

      Dear Customers, We hope you're well! WhatsApp for business is a renowned business messaging platform that takes your business closer to your customers; it gives your business the power of personalized outreach. Using the WhatsApp for Business integration
    • Conditional layouts - support for multi-select picklists

      Hi, The documentation for conditional layouts says the following: "Layout Rules cannot be used on the following field types: Auto Number Lookup Multi Select Lookup User Lookup Formula File Upload Multi Line" I have a custom module with a multi-pick list
    • Dont want to list inactive items.

      If an item is made inactive, there is no point in showing it in the item list. Please provide an option to hide all inactive items in 'Preferences'. 
    • Actual vs Minimum

      Hi all, I am sure I am not the only one having this need. We are implementing billing on a 30-minute increment, with a minimum of 30 minutes per ticket. My question is, is there a way to create a formula or function to track both the minimum bill vs the
    • Client Script Not Working When Field is Set by Workflow

      Problem Context: I have implemented a client script in the Cases module that automatically assigns commands based on the value of the Priority field. The script functions correctly when the Priority field is manually set by a user through the form. Observed
    • Integration of CRM and Recruit

      hi team, Is it possible to sync deals <> job openings from only 1 pipeline? My configuration of CRM has pipeline for each business unit, so I will have all data in the CRM system. body leasing and recruitment is one BU (hence 1 pipeline) - can I sync
    • {Action Required} Re-authenticate your Google Accounts to Continue Data Sync

      Hello Users! To align with Google’s latest updates on how apps access files in Google Drive, we’ve enhanced our integration to comply with the updated security and privacy standards, ensuring safer and more reliable access to your data. With this update,
    • integrating Zoho CRM vendors with Zoho projects

      In most of our projects we collaborate with our Vendors. Being able to integrate only Accounts and not Vendors from CRM, is a huge limitation for our perspective and needs. We would really love to see this feature in the CRM-Projects integration.
    • Zoho Creator Workshops 2026—Europe & UK | Coming to a city near you!

      Hello everyone! We're excited to announce the Zoho Creator Workshop Series 2026, coming to cities across Europe and the United Kingdom this year! Whether you're looking to explore the intermediate-to-advanced capabilities of Creator or you're a seasoned
    • Validation rule for Date field

      The condition settings for a Date field are are absolutlly usless. Conditions can only be set for a specific date, which is logically ineffective in most cases. When setting a condition for a Date field, users usually need to compare the value relative
    • Number 9 envelopes for invoice printing

      I email and print invoices. Being new to Zoho and coming from QB, we did both as we have a more traditional So in Zoho i want to do the same using Number 9 envelopes. These have both a return window and mail to windoow see attached image. Im just looking for best suggestions on how to get a ZOHO invoice to work, so I can mail my invoices...
    • Zoho Books/Square integration, using 2 Square 'locations' with new Books 'locations'?

      Hello! I saw some old threads about this but wasn't sure if there were any updates. Is there a way to integrate the Square locations feature with the Books locations feature? As in, transactions from separate Books locations go to separate Square locations
    • Open Sans Font in Zoho Books is not Open Sans.

      Font choice in customising PDF Templates is very limited, we cannot upload custom fonts, and to make things worse, the font names are not accurate. I selected Open Sans, and thought the system was bugging, but no, Open Sans is not Open Sans. The real
    • Super Admin Logging in as another User

      How can a Super Admin login as another user. For example, I have a sales rep that is having issues with their Accounts and I want to view their Zoho Account with out having to do a GTM and sharing screens. Moderation Update (8th Aug 2025): We are working
    • Add Reporting feature to display variance/change columns when comparing periods

      When running reports to compare periods (for example, Profit and Loss comparing current year to previous), I would like to be able to display variance columns in both (a) amount or (b) percentage.
    • Payroll and BAS ( Australian tax report format )

      Hello , I am evaluating Zoho Books and I find the interface very intuitive and straight forward. My company is currently using Quickbooks Premier the Australian version. Before we can consider moving the service we would need to have the following addressed : 1.Payroll 2.BAS ( business activity statement ) for tax purposes 3.Some form of local backup and possible export of data to a widely accepted format. Regards Codrin Mitin
    • Invalid scope choice: Workdrive integration in CRM

      Bug: There is an invalid option in the permission choices for Workdrive integration in CRM. If the entry "WorkDrive.teamfolder.CREATE" is selected, it will return a message indicating invalid OAuth scope scope does not exist.
    • What's New - February 2026 | Zoho Backstage

      February 2026 brings a major new addition and a collection of enhancements across Zoho Backstage. We thought about writing a long introduction, but the updates in this release make a strong case on their own. So we’ll skip the buildup and dive straight
    • Next Page