Kaizen 201 - Webhooks, Functions, and Schedules

Kaizen 201 - Webhooks, Functions, and Schedules


Hello everyone!
Welcome back to another post in the Kaizen series!

We are incredibly grateful for all the feedback we received, and as promised, we will answer all the queries in this Kaizen series.

Last week, in our 200th post, we addressed one of the requests for a detailed guide on Token generation using the Python SDK.

This week, as requested by a user, we will do a detailed comparison between Webhooks, Functions, and Schedules.

Let's dive right in!

In modern CRM automation and business workflows, three key mechanisms stand out for executing custom logic and integrations—Webhooks, Functions, and Schedules. While these might seem similar at first glance, each serves distinct purposes and offers unique advantages depending on your use case.

Understanding when and how to use each approach is crucial for building efficient, scalable, and maintainable automation systems. This Kaizen post will help you navigate these choices with practical use cases and clear guidelines.
Let's see what each of these features means.


1. Webhooks

Event-driven external communication

Webhooks are HTTP callbacks that automatically trigger when specific events occur in your CRM system. Think of them as "reverse APIs" where instead of your app polling for changes, the system pushes notifications to your external endpoints.

Key Characteristics

  • Trigger: Can be triggered by workflows, approvals, and real-time event-based(record creation, updates, deletions).
  • Execution: External to the CRM platform. Send HTTP POST/GET requests to an external URL.
  • Response time: Near-instantaneous.
  • Reliability: Dependent on external endpoint's availability.

When should you use Webhooks?

  • Send simple, real-time notifications to external systems.
  • These are lightweight notifications where you just want to inform external systems that something happened in your CRM, but do not expect a response.
  • Trigger immediate actions in the external app.
  • When data changes happen in your CRM, you can use webhooks to inform the external system of the same and trigger specific actions in the external system.
  • Live notification and alerts.
  • Webhooks can send live notifications and alerts when an important event occurs in CRM. You can use multiple channels like SMS, emails, push notifications, etc., to notify of the event.

Examples

  • Notifying an external system when a lead is converted.
  • Triggering payment processing when invoice status changes.
  • Sending SMS immediately when a high-priority lead is created.

2. Functions

Server-side custom logic

Functions in Zoho CRM are custom code snippets written in Deluge scripting language to execute your custom business logic.

Key Characteristics

  • Trigger: Can be triggered by various events or called directly through APIs, workflows, or button actions.
  • Execution: Internal to the CRM platform as they run on Zoho CRM servers.
  • Response time: Fast.
  • Reliability: High, with in-built error handling mechanisms.
  • Support full Deluge scripting.
  • Can call external APIs and handle responses.

When should you use Functions?

  • Complex business logic that requires access to CRM data
    • Involves complex decision-making processes to compare and analyze data from multiple modules of your CRM or other service. Functions work great here as they can access data via APIs easily.
  • Data validation and transformation
    • You can check for data correctness to align with your business rules and convert them to the right format to use them as necessary at various places. Functions are ideal as they can validate against existing CRM data and apply complex transformation logic in real-time.
  • Custom workflow actions
    • You can orchestrate functions to perform multi-step processes across modules that standard workflow actions cannot perform.

Examples

  • Validating data against business rules before saving.
  • Implement approval workflows with multiple stakeholders.
  • Triggering complex multi-module workflows like converting a lead to a contact and account, triggering workflow rules for the new account, adding a follow-up task to the converted lead, and adding it to marketing campaigns.

3. Schedules

Time-Based Automation

Schedules in Zoho CRM are functions that are executed automatically at specific intervals of time. They are perfect for batch processing, data synchronization, regular clean up, and sending routine reminders.

Key Characteristics

  • Trigger: Time-based schedules like a cron job.
  • Execution: Internal to the CRM platform.
  • Response time: Depends on the schedule frequency.
  • Reliability: High, with automatic retry mechanisms.
  • Support full Deluge scripting.
  • Supports OAuth-based API calls and data fetching from internal or external systems.

When should you use Schedules?

  • Batch data processing
    • Instead of processing records one at a time as they are created or updated, you can batch them all in groups to be processed later, say after business hours. This is not only efficient but also does not impact system performance during peak hours.
  • Synchronize data
    • You can run a schedule to compare data between your CRM and external system and regularly update them to have up-to-date information on both systems.
  • Periodic reporting and analytics of your data
    • Create reports, update dashboards, and analytics like weekly sales performance, at set intervals to ensure your teams and stakeholders have the right data.
  • Maintenance and housekeeping
    • These are the usual behind-the-scenes tasks like archiving old data, deleting temporary files, etc., once a week to keep your CRM system running smoothly.

Examples

  • Daily data backup and archival
  • Weekly sales performance reports
  • Monthly lead scoring recalculation
  • Quarterly data cleanup and deduplication
  • Sync product data in CRM with an external ERP system every eight hours.
Here is a comparison table to help you decide which feature to use.

Feature
Webhooks
Functions
Schedules
Trigger
On CRM events(real-time)
On CRM events/manually
On a schedule(time-based)
Custom Logic
No(send data only)
Yes(custom script in Deluge)
Yes(deluge, time-driven logic)
External Calls
Limited(webhook only)
Extensive(APIs, CRM modules)
Extensive APIs, CRM modules)
Data Manipulation
No
Yes
Yes
Best For
Simple push notifications
Complex workflow automation
Recurring tasks
Examples
Notifying ERP, sending SMS
Auto-updating field, triggering emails
Daily follow-up, weekly performance report

Best Practices

  • Keep it simple. When you need a quick, no-frills integration, go with webhooks first.
  • Put your smarts in one place. Use functions whenever you need custom business rules or to tie together different parts of your CRM.
  • Schedule wisely. If you have regular batch jobs or routine tasks, set them to run on a schedule, ideally during off-peak hours so your team's daily operations are not slowed down by behind-the-scenes processes.
  • Watch and learn. Build in error logging and notifications for both functions and scheduled jobs, so you can catch and fix problems before they snowball.
  • Stay efficient. Remember that functions and scheduled scripts count against your API and execution limits. So, write lean code and keep an eye on your usage.

Begin by pinpointing your unique needs, weigh the pros and cons of each option, and be open to mixing methods when necessary. True automation success depends on solid error handling, ongoing monitoring, and regular upkeep.
We hope you found this post useful. Let us know if you have questions in the comments or drop us an email at support@zohocrm.com.

Cheers!

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

IdeaPrevious Kaizen post - Token generation in Python SDK
    • Sticky Posts

    • Kaizen #197: Frequently Asked Questions on GraphQL APIs

      🎊 Nearing 200th Kaizen Post – We want to hear from you! 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 #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.
    • Celebrating 200 posts of Kaizen! Share your ideas for the milestone post

      Hello Developers, We launched the Kaizen series in 2019 to share helpful content to support your Zoho CRM development journey. Staying true to its spirit—Kaizen Series: Continuous Improvement for Developer Experience—we've shared everything from FAQs
    • Kaizen #193: Creating different fields in Zoho CRM through API

      🎊 Nearing 200th Kaizen Post – We want to hear from you! 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.
    • Client Script | Update - Introducing Commands in Client Script!

      Have you ever wished you could trigger Client Script from contexts other than just the supported pages and events? Have you ever wanted to leverage the advantage of Client Script at your finger tip? Discover the power of Client Script - Commands! Commands
      • Recent Topics

      • Issue in Zoho People Regularization – Incorrect Hour Calculation

        I have noticed that when applying attendance regularization in Zoho People for previous dates, the total working hours are not calculated correctly. For example, even if the check-in is 10:00 AM and check-out is 6:00 PM, the system shows an incorrect
      • Issue with Hour Calculation in Zoho People Attendance Module

        I have noticed an issue in the attendance regularization feature of Zoho People. When trying to regularize past dates, the total working hours are not calculated correctly. For example, if I enter a check-in and check-out time for a previous day, the
      • Cliq Meeting Calls No Audio and Screen Share

        When in a Cliq channel meeting, the audio does not work at all on pc. When i use my phone as audio source, screen share on pc does not work. I have updated audio drivers but the strangest thing is that during a 1 on 1 call, it works well. Therefore the
      • Bug in Total Hour Calculation in Regularization for past dates

        There is a bug in Zoho People Regularization For example today is the date is 10 if I choose a previous Date like 9 and add the Check in and Check out time The total hours aren't calculated properly, in the example the check in time is 10:40 AM check
      • Work anniversary and birthdays on connect

        Hello, I like the idea of having employee's work anniversary and birthdays on the dashbaord. Do you have to have the employee complete this information themselves in connect settings, or does it pull from their directory settings? (ie. we use Zoho one
      • Field Dependency Not Working on Detail Page in Zoho Desk

        Hi Support Team, I’ve created field dependencies between two fields in Zoho Desk, and they are working correctly on the Create and Edit layouts. However, on the Detail page, the fields are not displaying according to the dependencies I’ve set — they appear
      • Alias Email Id already exists

        Hi I'm trying to create an alias : contact @ yoavarielevy.co.il but i get the message  Alias Email Id already exists I had an account with the same name but I deleted it. Can you help? Thanx Yoav
      • Why I am unable to configure Zoho Voice with my Zoho CRM account?

        I have installed Zoho Voice in my Zoho CRM, but as per the message there is some config needed in Zoho Voice interface. But when I click on the link given in the above message, I get an access denied page.
      • BANK FEED - MAYBANK , provider from YODLEE IS NOT WORKING

        As per topic, the provider YODLEE is not working for the BANK FEED. It have been reported since 2023 Q3, and second report on 2023 Q4. now almost end of 2024 Q1, and coming to 2024 Q2. Malaysia Bank Maybank is NOT working. can anyone check on this issue?
      • Customer Parent Account or Sub-Customer Account

        Some of clients as they have 50 to 300 branches, they required separate account statement with outlet name and number; which means we have to open new account for each branch individually. However, the main issue is that, when they make a payment, they
      • Feature Request: Ability to Set a Custom List View as Default for All Users

        Dear Zoho CRM Support Team, We would like to request a new feature in Zoho CRM regarding List Views. Currently, each user has to manually select or favorite a custom list view in order to make it their default. However, as administrators, we would like
      • Adding Multiple Products (Package) to a Quote

        I've searched the forums and found several people asking this question, but never found an answer. Is ti possible to add multiple products to a quote at once, like a package deal? This seems like a very basic function of a CRM that does quotes but I can't
      • Zoho Commerce in multiple languages

        When will you be able to offer Zoho Commerce in more languages? We sell in multiple markets and want to be able to offer a local version of our webshop. What does the roadmap look like?
      • 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.
      • Introducing Assemblies and Kits in Zoho Inventory

        Hello customers, We’re excited to share a major revamp to Zoho Inventory that brings both clarity and flexibility to your inventory management experience! Presenting Assemblies and Kits We’re thrilled to introduce Assemblies and Kits, which replaces the
      • How to create auto populate field based on custom module in Zoho CRM?

        Hello, i'm still new to Zoho CRM and work as administrator in my company. Currently, I'm configuring layout for Quotes Module. So, the idea is, I've created a read-only field in Quotes called "Spec". I want this field automatically filled with Specification
      • webinar registration confirmation are landing in SPMA folders

        I am trialing zoho webinar and do not have access to custom domains. When I test user registrations, they are working but the resulting confirmation email is landing in a spam folder. How can I avoid this?
      • Making digital signatures accessible to all: Introducing accessibility controls in Zoho Sign

        Hi there! At Zoho Sign, we are committed to building an inclusive digital experience for all our users. As part of our ongoing efforts to align with Web Content Accessibility Guidelines (WCAG), we’re updating the application with support that will go
      • Improved RingCentral Integration

        We’d like to request an enhancement to the current RingCentral integration with Zoho. RingCentral now automatically generates call transcripts and AI-based call summaries (AI Notes) for each call, which are extremely helpful for support and sales teams.
      • Need to extract date from datetime field

        I have a datetime field and need only the date part from it. I am unable to find a built-in function that would be <DateTime>.Date(). I don't think I want to go the string conversion route of converting the datetime to string and then parsing out values and create a date out of it. Any one out there has a better solution to this? Thanks in adavnce. Regards Moiz Tankiwala Smart Training & IT Solutions
      • Is there a way to set Document Owner/Sender via the API

        When sending requests for zoho sign, it would seem zoho uses the id of the person that created the zoho api cred to determine the owner_id, is there a way to set a default for this?
      • Transition Criteria Appearing on Blueprint Transitions

        On Monday, Sept. 8th, the Transition criteria started appearing on our Blueprints when users hover over a Transition button. See image. We contacted Zoho support because it's confusing our users (there's really no reason for them to see it), but we haven't
      • Delegates should be able to delete expenses

        I understand the data integrity of this request. It would be nice if there was a toggle switch in the Policy setting that would allow a delegate to delete expenses from their managers account. Some managers here never touch their expense reports, and
      • Add Save button to Expense form

        A save button would be very helpful on the expense form. Currently there is a Save and Close button. When we want to itemize an expense, this option would be very helpful. For example, if we have a hotel expense that also has room service, which is a
      • Multiple organizations under Zoho One

        Hello. I have a long and complicated question. I have a Zoho One account and want to set it up to serve the needs of 6 organizations under the same company. Some of the Zoho One users need to be able to work in more than 1 organization’s CRM and other
      • IMAP Server not responding.

        Trying to connect a phone via IMAP and getting "imap.zoho.com not responding." Is the server down, for maintenance or otherwise? I've tried this on two different devices and got the same error on both.
      • Using Zoho Desk to support ISMS process

        Hi, I am evaluating using Zoho Desk for security incident management. This seems to be aligned with Zoho Desk purpose as its just another type of incident. However in security incident management, ideally I can link incidents (tickets) with a risk from
      • Error AS101 when adding new email alias

        Hi, I am trying to add apple@(mydomain).com The error AS101 is shown while I try to add the alias.
      • Unbundle feature for composite items

        We receive composite items from our vendors and sell them either individually or create other composite items out of them. So, there is a lot of bundling and unbundling involved with our composite items. Previously, this feature was supported in form
      • Regarding the integration of Apollo.io with Zoho crm.

        I have been seeing for the last 3 months that your Apollo.io beta version is available in Zoho Flow, and this application has not gone live yet. We requested this 2 months ago, but you guys said that 'we are working on it,' and when we search on Google
      • Open filtered deals from campaign

        Do you think a feature like this would be feasible? Say you are seeing campaign "XYZ" in CRM. The campaign has a related list of deals. If you want to see the related deals in a deal view, you should navigate to the Deals module, open the campaign filter,
      • How do you print a refund check to customer?

        Maybe this is a dumb question, but how does anyone print a refund check to a customer? We cant find anywhere to either just print a check and pick a customer, or where to do so from a credit note.
      • MTD SA in the UK

        Hello ID 20106048857 The Inland Revenue have confirmed that this tax account is registered as Cash Basis In Settings>Profile I have set ‘Report Basis’ as “Cash" However, I see on Zoho on Settings>Taxes>Income Tax that the ‘Tax Basis’ is marked ‘Accrual'
      • Limiting search or dependencies with an asterisk "*".

        I have a form with several dependency fields with options still developing for each field. Since these options were developing and not yet ready to be a selection in the field, I placed a filter for the dropdown field. In this filter, I selected fields
      • workflow not working in subform

        I have the following code in a subform which works perfectly when i use the form alone but when i use the form as a subform within another main form it does not work. I have read something about using row but i just cant seem to figure out what to change
      • Fetch data from another table into a form field

        I have spent the day trying to work this out so i thought i would use the forum for the first time. I have two forms in the same application and when a user selects a customer name from a drop down field and would like the customer number field in the
      • Zoho Creator as LMS and Membership Solution

        My client is interested in using Zoho One apps to deploy their membership academy offer. Zoho Creator was an option that came up in my research: Here are the components of the program/offer: 1. Membership portal - individual login credentials for each
      • Zoho FSM API Delete Record

        Hi FSM Team, It would be great if you could delete a record via API. Thank you,
      • Record comment filter

        Hi - I have a calendar app that we use to track tasks. I have the calendar view set up so that the logged in user only sees the record if they are assigned to the task. BUT there are instances when someone is @ mentioned in the record when they are not
      • Group Tax in Service Line Items

        Hi FSM Team! I noticed that when you update a tax in the service line item the group tax is not showing up as an option. Let me know what can be done thank you!
      • Next Page