Kaizen 230 - Smart Discount-Based Quote Approvals Using CRM Functions and Approval Process

Kaizen 230 - Smart Discount-Based Quote Approvals Using CRM Functions and Approval Process


Hello everyone!
Welcome back to the Kaizen series!
Discount approvals are a standard part of sales governance.
Most organizations need something like this:

Discount %
Required Action
< 10%
Auto-approve
10–19.99%
Sales Manager approval
≥ 20%
VP Sales approval

Zoho CRM already includes a powerful Approval Process feature capable of routing records, locking them, notifying approvers, and maintaining audit history.
So the natural question is "Isn’t the native Approval Process enough?". Often, yes. But when the discount logic depends on accurate percentage calculation across line items and header adjustments, we need a small architectural enhancement.

This Kaizen combines Functions(for decisions), Workflow Rules(for triggers), Approval Process(for governance), and Reporting Hierarchy(for routing) into a clean, scalable solution.

Understanding the native Approval Process

Before adding anything custom, it’s important to recognize what the Approval Process already does extremely well.
  1. Evaluates criteria based on field values
  2. Automatically submits records
  3. Locks records during review
  4. Routes to users, roles, or hierarchy levels
  5. Maintains approval history
  6. Sends notifications
It is a powerful governance engine.
However, it evaluates existing values and does not calculate new ones. That distinction matters in discount scenarios.

The missing piece: Reliable discount percentage

In Quotes:
  1. Discounts may be applied at line-item level
  2. Discounts may be applied at header level
  3. Grand Total reflects cumulative adjustments

There is no guaranteed native field that consistently represents
True Discount % = (Sub_Total - Grand_Total) / Sub_Total * 100

If approval rules rely directly on partial fields(like “Discount”), they may misrepresent the effective discount.

To ensure accuracy, we introduce a Function to calculate and store a reliable Discount Percentage.
We are not replacing the Approval Process, but preparing accurate data for it.

Here is the architectural flow with each component having a distinct responsibility. This makes the system sustainable.
Quote Saved --> Workflow triggers Function --> Function calculates Discount % --> Function sets Approval_Status --> Approval Process evaluates status --> Record submitted and locked

Let's go over this one step at a time.

Step 1: Create Custom Fields(Quotes Module)

Field
Type
Purpose
Discount_Percentage
Percent
Stores calculated discount
Approval_Status
Picklist
Controls approval trigger. Values:
  1. Auto Approved
  2. Pending Manager Approval
  3. Pending VP Approval
  4. Approved
  5. Rejected
Approval_LevelSingle LineDisplays routing level

Step 2: Write the CRM Function(Decision Layer)

This function calculates the effective discount and determines the approval level. This function becomes the decision engine.
void automation.Set_Quote_Approval_Level(String id)
{
quoteId = id.toLong();
quoteDetails = zoho.crm.getRecordById("Quotes",quoteId);
if(quoteDetails != null)
{
subTotal = ifnull(quoteDetails.get("Sub_Total"),0).toDecimal();
grandTotal = ifnull(quoteDetails.get("Grand_Total"),0).toDecimal();
discount = subTotal - grandTotal;
discountPercentage = 0.0;
if(subTotal > 0)
{
discountPercentage = discount / subTotal * 100;
}
approvalStatus = "";
approvalLevel = "";
if(discountPercentage < 10)
{
approvalStatus = "Auto Approved";
approvalLevel = "None - Auto Approved";
}
else if(discountPercentage < 20)
{
approvalStatus = "Pending Manager Approval";
approvalLevel = "Sales Manager";
}
else
{
approvalStatus = "Pending VP Approval";
approvalLevel = "VP Sales";
}
updateMap = Map();
updateMap.put("Discount_Percentage",discountPercentage.round(2));
updateMap.put("Approval_Status",approvalStatus);
updateMap.put("Approval_Level",approvalLevel);
updateResponse = zoho.crm.updateRecord("Quotes",quoteId,updateMap);
}
}

Step 3: Workflow(Trigger Layer)

Every time a quote is saved, we want the discount to be evaluated automatically.
Create the following Workflow Rule:
Module: Quotes
Trigger: On Create or Edit
Action: Execute Function
Map the Quote ID with the "id" argument in the function.


Step 4: Approval Process(Governance Layer)

Rule 1 - Manager Approval when Discount% is 10 to 19.99
Approval_Status = "Pending Manager Approval" --> Route to Sales Manager(via hierarchy)

Rule 2 - VP Sales Approval when Discount% >= 20
Approval_Status = "Pending VP Approval" --> Route to VP Sales(via hierarchy)
When this process is triggered, CRM:
  1. Submits the record for approval
  2. Locks it
  3. Sends notification
  4. Tracks approval history

The outcome


Why is this layered approach strong?

This design works well because each component in the system has a clearly defined responsibility. The CRM Function acts as the decision layer. It performs the discount calculation, determines the appropriate approval level, and updates the control fields. This ensures that the logic behind the approval requirement is accurate and intentional.

The workflow serves as the trigger layer. Its only job is to execute the function whenever a quote is created or edited. It does not contain business logic; it simply initiates the evaluation process at the right time.

The approval process becomes the governance layer. Once the function sets the appropriate status, the approval engine evaluates the criteria, submits the record, locks it, routes it to the correct approver, and maintains the approval history. This is where enforcement happens.

Finally, the reporting hierarchy determines who the approver is. Instead of hard-coding specific users, the system dynamically identifies the appropriate manager or second-level supervisor based on the role structure. This keeps the design scalable and adaptable to organizational changes.

By separating calculation, triggering, enforcement, and routing into distinct layers, the solution remains clean, maintainable, and easy to extend. The Approval Process continues to do what it does best—govern and enforce—while the Function ensures that the decision it evaluates is accurate and business-driven.

Summary

Zoho CRM’s native Approval Process is powerful and reliable.
When business logic depends on calculated values, like true discount percentage, introducing a function strengthens the design by ensuring accurate, consistent decision-making.
Used together, Functions and Approval Process create:
  1. Intelligent routing
  2. Accurate governance
  3. Clean audit trails
  4. Scalable architecture
That combination is what makes this solution robust.

We hope you liked this post. We'll see you next week with another interesting one!
Write to us at support@zohocrm.com or let us know your feedback in the comments section of this post.

Cheers!



==========================================================================




    • 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

      • Rename Service Report

        Some of our customers are requesting the name of the service report PDF to be in a specific format, for example, instead of REP-001.PDF some are requesting to include their name like customername.pdf. is that possible?
      • Smarter holiday planning with yearly-specific Holiday Lists

        Hello everyone! Managing holidays and business hours is now easier and more efficient. Holiday Lists now support holidays that fall on different dates every year, while business hours now supports more than one holiday list. This helps businesses manage
      • AI Search and Record Retrieval Inside Zoho Creator – Is This Possible?

        Is it possible to integrate an AI assistant into Zoho Creator that can intelligently search, retrieve, and analyze records within the application’s forms and reports? Can AI access and query existing Creator data securely using Deluge or APIs to provide
      • Scheduled AU Data Center Database Version Upgrade for Zoho Forms

        Dear Zoho Forms' users, We would like to update you on a scheduled AU Data Center database version upgrade for Zoho Forms. Find the schedule below: Migration window: Sunday, 22nd February 2026 12.00 AM to 12.30 AM AEDT This migration is a part of our
      • Cannot get code to work with v2.mergeAndStore!

        Please can someone help me pass subform items into a repeating mail merge table row using v2.mergeAndStore? I have a mail merge template created in Writer and stored in Workdrive. This template is referenced by a custom CRM function which merges all of
      • Hotmail is blocking the zoho mail IP

        Greetings, Since last Tuesday (5 days ago today) I wrote to Zoho support and I still haven't received a single response (Ticket ID: 2056917). Is this how you treat people who pay for your email service? I am making this public so that those who want to
      • Zoho Bookings and Survey Integration through Flow

        I am trying to set up flows where once an appointment is marked as completed in Zoho Bookings, the applicable survey form would be sent to the customer. Problem is, I cannot customise flows wherein if Consultation A is completed, Survey Form A would be
      • Zoho CRM Community Digest - December 2025 | Part 2

        Hello Everyone! During the final weeks of December, Zoho CRM introduced updates that not only enhanced product capabilities but also offered deeper guidance through Kaizen posts. This section highlights what was released and shared in the last two weeks
      • CRUD actions for Resources via API

        Hello, is it possible to perform CRUD actions through the API for Resources? We want to create a sync from Zoho CRM Car record to Bookings resources to create availabilities for Car bookings. For Test drives, not only the sales person needs to be available,
      • Kaizen #186 : Client Script Support for Subforms

        Hello everyone! Welcome back to another exciting Kaizen post on Client Script! In this edition, we’re taking a closer look at Client Script Support for Subforms with the help of the following scenario. " Zylker, a manufacturing company, uses the "Orders"
      • Unable to Assign Multiple Categories to a Single Product in Zoho Commerce

        Hello Zoho Commerce Support Team, I am facing an issue while assigning categories to products in Zoho Commerce. I want to assign multiple categories to a single product, but in the Item edit page, the Category field allows selecting only one category
      • オンライン勉強会のお知らせ Zoho ワークアウト (2/19 参加無料)

        ユーザーの皆さま、こんにちは。コミュニティチームの中野です。 2月開催のZoho ワークアウトについてお知らせします。 今回はZoomにて、オンライン開催します。 ▶︎参加登録はこちら(無料) https://us02web.zoom.us/meeting/register/6AyVUxp6QDmMQiDGXGkxPA ━━━━━━━━━━━━━━━━━━━━━━━━ Zoho ワークアウトとは? Zoho ユーザー同士で交流しながら、サービスに関する疑問や不明点の解消を目指すイベント「Zoho
      • doubts about customer happiness in zoho desk

        Good afternoon, Desk community. The reason for my message is that I have a question regarding the customer satisfaction surveys we can ask our clients to rate our service. I know that in Desk, you can activate Customer Happiness to send a survey to the
      • COQL API in JS Widget only pulling 200 records

        Hello! We've been building a custom homepage widget using the Zoho JS SDK, and it seems that this https://help.zwidgets.com/help/latest/ZOHO.CRM.API.html#.coql only allows 200 records. I thought the limit was 2000 for COQL queries, but am I mistaken?
      • Standard Description Field - Can I change label or add dd tooltip

        Is there a way fo you guys to allow the customer to change the label name for the description field in the customer portal when submitting tickets. Or at least allow us to add a tooltip to clarify what description we need from them. I know I can create my own separate multi line description field but if I do that, it doesn't have the nice toolbar with Bold, Italic, Underline, color, font, indent, etc. Can you please allow us to add a tooltip to the zoho standard description field?
      • Introducing parent-child ticketing in Zoho Desk [Early access]

        Hello Zoho Desk users! We have introduced the parent-child ticketing system to help customer service teams ensure efficient resolution of issues involving multiple, related tickets. You can now combine repetitive and interconnected tickets into parent-child
      • Ability to CC on a mass email

        Ability to CC someone on a mass email.
      • Different Task Layouts for Subtasks

        I was wondering how it would be possible for a subtask to have a different task layout to the parent task.
      • Compensation | Salary Packages - Hourly Wage Needed

        The US Bureau of Labor Statistics says 55.7% of all workers in the US are paid by the hour. I don't know how that compares to the rest of the world, but I would think that this alone would justify the need for having an hourly-based salary package option.
      • Customizing Helpcenter texts

        I’m customizing the Zoho Desk Help Center and I’d like to change the wording of the standard widgets – for example, the text in the “Submit Ticket” banner that appears in the footer, or other built-in widget labels and messages. So far, I haven’t found
      • Ability to Edit Ticket Subject when Splitting a Ticket

        Often someone will make an additional or new request within an existing ticket that requires we split the ticket. The annoying part is that the new ticket maintains the subject of the original ticket after the split so when the new ticket email notification
      • Automatically Update Form Attachment Service with Newly added Fields

        Hi, When I have a Form Setup and connected to a 3rd Party Service such as OneDrive for Form Attachments, when I later add a new Upload Field I have to remove and redo the entire 3rd Party Setup from scratch. This needs to be improved, such as when new
      • 🚀 WorkDrive 6.0 (Phase 1): Empowering Teams with Content Intelligence, Automation, Accessibility, and Control

        Hello, everyone! WorkDrive continues to evolve from a robust file management solution into an intelligent, secure, and connected content collaboration platform for modern businesses. Our goal remains unchanged: to simplify teamwork, strengthen data security,
      • Reopen ticket on specific date/time

        Is there a way that we can close a ticket and setup a reopen of that ticket on a specific date and time? (without using the "on hold" ticket option)
      • [Important announcement] Zoho Writer will mandate DKIM configuration for automation users

        Hi all, Effective Dec. 31, 2024, configuring DKIM for From addresses will be mandatory to send emails via Zoho Writer. DKIM configuration allows recipient email servers to identify your emails as valid and not spam. Emails sent from domains without DKIM
      • Column letter from number

        Hello, I am trying to select a cell and i have the column number. How do i do this or is there a way of getting the letter from the number? Thank you
      • API credit COQL COUNT

        The docs describe API credits in COQL from the LIMIT perspective: https://www.zoho.com/crm/developer/docs/api/v8/COQL-Overview.html When using aggregate functions such as `COUNT` or `SUM`, is that billed as 1 API credit?
      • Weekly Tips : Save Time with Saved Search

        Let's assume your work requires you to regularly check emails from important clients that have attachments and were sent within a specific time period. Instead of entering the same conditions every time—like sender, date range, and attachments included—you
      • Remove 'This is an automated mail from Zoho Sign' in footer

        Hi there, Is it possible to remove or change the text under the e-mail templates? I can't figure out how to do that: Would love to hear from you. Kind regards, Tristan
      • Organize and manage PDFs with Zoho PDF Editor's dashboard

        Hello users, Zoho PDF Editor's dashboard is a one-stop place to upload, sort, share PDF files, and more. This article will explore the various capabilities that Zoho PDF Editor's dashboard offers. A few highlights of Zoho PDF Editor's dashboard: Upload
      • Custom function return type

        Hi, How do I create a custom deluge function in Zoho CRM that returns a string? e.g. Setup->Workflow->Custom Functions->Configure->Write own During create or edit of the function I don't see a way to change the default 'void' to anything else. Adding
      • Passing Info from Function to Client Script

        Hello, I have recently started making use of client script for buttons, allowing me to give the user information or warnings before they proceed. This is great. However, I have never quite managed to pass back any extra information from the function to
      • Drag 'n' Drop Fields to a Sub-Form and "Move Field To" Option

        Hi, I would like to be able to move fields from the Main Page to a Sub-Form or from a Sub-Form to either the Main Page or another Sub-Form. Today if you change the design you have to delete and recreate every field, not just move them. Would be nice to
      • Zoho Payroll for Canada

        Is anyone else having problems getting setup for Canada?
      • Passing the CRM

        Hi, I am hoping someone can help. I have a zoho form that has a CRM lookup field. I was hoping to send this to my publicly to clients via a text message and the form then attaches the signed form back to the custom module. This work absolutely fine when
      • One Contact with Multiple Accounts with Portal enabled

        I have a contact that manages different accounts, so he needs to see the invoices of all the companies he manage in Portal but I found it not possible.. any idea? I tried to set different customers with the same email contact with the portal enabled and
      • User Automation: User based workflow rules & webhooks

        User management is an undeniable part of project management and requires adequate monitoring. As teams grow and projects multiply, manual coordination for updating users & permissions becomes difficult and can give way to errors. User automation in Zoho
      • Disable Zoho Contacts

        We don't want to use this app... How can we disable it?
      • Default Ticket View - Table?

        Guys, We mostly use the table view to queue tickets. Maybe I am missing it - but how can I set that view as 'default" for all our agents? Thanks JV
      • Zoho One IS BUGGY

        Here are some things that just don't work: - Disabling applications from certain Spaces - Adding users (probably only for me) - Renaming applications in Zoho One Portal (fixed by now) - Reordering applications in Spaces When I try to reorder: It feels
      • Next Page