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

      • Can't rename groups on Mac desktop app

        I'm working on an up-to-date Mac with a freshly downloaded Notebook app. I'm trying to rename a group within a notebook. Here I have, left to right, a note, a group, and a note. I select the group. On the top left, I select Action. On the dropdown, "Rename"
      • Zoho Forms - Feature Request - Year Field

        Hi Zoho Forms Team, You currently have the following date and time fields: Date Time Date and Time Year and Month It would be useful if you could include a "Year" field For example a recent application I completed said "What year was your house built?"
      • I need help to take Reports for tickets moved between departments.

        Hi, I need help to take Reports for tickets moved between different departments. Pls guide Shyam
      • Export to excel stored amounts as text instead of numbers or accounting

        Good Afternoon, We have a quarterly billing report that we generate from our Requests. It exports to excel. However if we need to add a formula (something as simple as a sum of the column), it doesn't read the dollar amounts because the export stores
      • Increase Round Robin Scheduler Frequency in Zoho Desk

        Dear Zoho Desk Team, We hope this message finds you well. We would like to request an enhancement to the Round Robin Scheduler in Zoho Desk to better address ticket assignment efficiency. Current Behavior At present, the Round Robin Scheduler operates
      • Automation #6 - Prevent Re-opening of Closed Tickets

        This is a monthly series where we pick some common use cases that have been either discussed or most asked about in our community and explain how they can be achieved using one of the automation capabilities in Zoho Desk. Typically when a customer submits
      • Zoho Desk EU slow/unresponsive

        Has anyone else got issues with ZohoDesk today in the EU? It takes an age to come back and if you do start typing something and try and send or save it looks like it times out. We are also getting this pic. ot I can't see anything on https://status.zoho.eu/
      • EU DC Partial Outage Resolved: A Detailed RCA

        Incident Summary Due to an overload on one of the nodes in the EU DC for Zoho Desk, the system was unable to handle the heavy load, causing a slowdown in requests and resulting in a partial outage for customers with data residing in that node. On May
      • Use Zoho Creator as a source for merge templates in Zoho Writer

        Hello all! We're excited to share that we've enhanced Zoho Creator's integration with Zoho Writer to make this combination even more powerful. You can now use Zoho Creator as a data source for mail merge templates in Zoho Writer. Making more data from
      • Perfomance Management - Zoho People

        Hi team, I am looking for performance management data such as KRA, goals, feedback, appraisals, etc., in Zoho Analytics. However, I am unable to find these metrics while editing the setup. Could you please confirm whether these fields are available in
      • Deprecation of the Zoho OAuth connector

        Hello everyone, At Zoho, we continuously evaluate our integrations to ensure they meet the highest standards of security, reliability, and compliance. As part of these ongoing efforts, we've made the decision to deprecate the Zoho OAuth default connector
      • Good news! Calendar in Zoho CRM gets a face lift

        Dear Customers, We are delighted to unveil the revamped calendar UI in Zoho CRM. With a complete visual overhaul aligned with CRM for Everyone, the calendar now offers a more intuitive and flexible scheduling experience. What’s new? Distinguish activities
      • Zoho - Please explain difference between Thread view and Conversation view on Ticket

        I have reviewed the help document here but am still not clear on the difference between the two views. As an example, I just had a back and forth on a ticket: - Customer emails support email. - I email back from Desk. - Customer responds back. - I email back from Desk. On the upper left drop down box on the ticket Zoho Desk now says this is "4 Threads" and "4 Conversations" . How is that 4 threads?? By my count it is 1 thread and 4 conversations (assuming by "conversation" Zoho means number of total
      • Mobile phone version not working well

        I am working on the Zoho Site Builder. In the preview the desktop version looks okay, but in the mobile phone preview many words are cut off in the weirdest (wrong) way. How can I fix that?
      • Zoho Mail iOS app update: Display recipient's nickname on contact suggestion

        Hello everyone! In the most recent version(v3.3.1) of the Zoho Mail iOS app update we have brought in support to display recipient's nickname in contacts suggestion. Please update the app to the latest version directly from the App Store or using the
      • Digest Février - Un résumé de ce qui s'est passé le mois dernier sur Community

        Bonjour chers utilisateurs, Le 26 février, nous avons organisé notre première session Ask the Expert de 2026. Nous sommes heureux de partager que ce fut une session très interactive, avec de nombreuses questions intéressantes posées par nos clients. Si
      • Zoho CRM Case Notes - Share to Customer

        Hi team does anyone know the Api to set a note, against a case, to shared with customer? i cant seem to find it  cheers 
      • Zoho Forms - Feature Request - Past Into Scanning/OCR Field

        Hi Zoho Forms Team, You recently introduced the OCR/Scanning field which I have found great use for with one client who receives work orders as a screenshot from one customer. I want to raise a feature request here which would make that field even more
      • Synching changes to Stripe when changes are made in Zoho Billing

        We have a situation where we have merged customers in Zoho BIlling and then found out later that the payment in Stripe was not updated and still associated with the old customer record. The card gets updated and billed, but that payment is still associated
      • Send out follow-up email in the same thread (threaded conversations in individual emails) from Zoho CRM

        Hi, I'm new to Zoho. I'm trying to send individual emails to my leads one by one. And I'll send out follow up email if I don't hear back from them later. However, instead of sending a new email, I want to reply in the same email thread so that the recipients
      • Depositing funds to account

        Hello, I have been using Quickbooks for many years but am considering moving to Zoho Books so I am currently running through various workflows and am working on the Invoicing aspect. In QB, the process is to create an invoice, receive payment and then
      • Is Zoho Sites still actively being developed?

        Hello, Is Zoho Sites still actively being developed as part of the Zoho ecosystem? I noticed that the What's New page (https://www.zoho.com/sites/whats-new.html) does not show any updates since Q1 2025. We were considering migrating our website from Squarespace
      • FSM integration with Books

        Hi, I have spent a few months working with FSM and have come across a critical gap in the functionality, which I find almost shocking....either that, or I am an idiot. The lack of bi-directional sync between Books and FSM on Sales Orders/ Work Orders
      • web to lead

        Can anyone help me how to create web to lead from zoho marketing automation
      • Introducing Workqueue: your all-in-one view to manage daily work

        Hello all, We’re excited to introduce a major productivity boost to your CRM experience: Workqueue, a dynamic, all-in-one workspace that brings every important sales activity, approval, and follow-up right to your fingertips. What is Workqueue? Sales
      • UI issue with Organize Tabs

        When looking at the organize Tabs window (bellow) you can see that some tabs are grayed out. there is also a "Add Module/Web Tab" button. When looking at this screen it's clear that the grayed out tabs can not be removed from the portal user's screen
      • I created a signup form in Zoho Marketing Automation with the correct field mapping, but the data is not being reflected under Leads in Zoho CRM.

        web to lead from zoho marketing automation
      • Pasted Images not being embedded in custom mail

        Hi, I'm making a custom report by email based on commentaries. I have the email ready, all working great except for images that are being pasted in the commentaries. Zoho deals with them as temp images and so it requires authentication to view them, something
      • 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
      • Inactive License for free account.

        I recently upgraded my Cliq subscription not my team (on the free version), are unable to login to their accounts. The error message received is Inactive License Looks like you have not been covered under the current free plan of users. Please contact
      • Deluge scripts

        Why is there not a search function to make it easier to find the script of interest when modifications are required.
      • Zoho Sheet for Desktop

        Does Zoho plans to develop a Desktop version of Sheet that installs on the computer like was done with Writer?
      • Zoho Books (and other Finance Suite Apps) - Clickable Item Name on Invoices and Reports

        Hi Zoho Books team, It would be really helpful if the Item Name on Reports were clicable to take me to the item. The same on Invoices, often I am looking at an invoice and I want to look at the deails of a product. A link here would be helpful to jump
      • Zoho Books - Payment Gateway - Revolut

        Hi Books Team, My feature request if to include the popular platform Revolut as a payment collection option on invoices in Zoho Books. Please upvote if you are also looking for this option.
      • Searching for an item from within an invoice should show any item containing the string, not just those that begin with the string.

        Hello, I've found myself becoming increasingly frustrated with the limited line-item seach when adding new items to an invoice. The problem is that the characters being typed are only being matched from the beginning of the item name.  This might be usable
      • How to Rank Tables by Row Count in Descending Order

        I am trying to understand the consume of lines that grow up so fast in the last week. Is there any way to create a pivot table or query to get TABLE NAME LINES in descending order?
      • Dealing With One-Time Customers on Zoho Books

        Hello there! I am trying to figure out a way to handle One-Time customers without having to create multiple accounts for every single one on Zoho Books. I understand that I can create a placeholder account called "Walk-In Customer", for example, but I
      • Marking a meeting 'done'.

        I would like to somehow mark a meeting 'done' and placed under the contact's page rather than deleting it and having no record of it. Am I missing a button that does this?
      • Feature Request: Render Markdown (.md) files in Zoho Cliq

        Hi, We regularly share Markdown (.md) files in Zoho Cliq. However, when we open these files in Cliq, the content does not render as Markdown—it displays as plain text. This forces us to copy/paste the content into an external Markdown viewer to read it
      • CRM Percent custom fields: When will it show the % symbol and behave like %?

        1. Actually Percent custom fields fail to show the % symbol. 2. When in formulas Percent fields work like number: 100 x 5% = 5 ideal world 100 x 5% = 500 what happens actually 3. When importing Percent fields the % symbol has to be removed and the data
      • Next Page