Custom Functions in Zoho Bookings

Estimated reading: 2 minutes 57 views

Introduction

Custom Functions in Zoho Bookings allow you to automate complex actions that go beyond the default capabilities. While standard features like email or SMS notifications are built-in, actions such as generating an invoice in Zoho Invoice when an appointment is booked can be automated using Custom Functions. These functions are created using Deluge, Zoho’s scripting language, and they let you run logic, call APIs, and integrate with other Zoho or third-party services.

Access to Custom Functions is controlled by user roles:

  • Super Admins and Admins: Can view and edit.
  • Managers: Can view only.
  • Staff: No access

Step-by-Step Instructions

When are Custom Functions Triggered?

Custom Functions can be executed automatically when an appointment is:

  • Booked
  • Rescheduled
  • Canceled
  • Marked as Completed
  • Marked as No Show

How to Configure Custom Functions

  1. Go to Manage Business
    Click the Manage Business icon at the top right of your screen.
  2. Select Workspace
    Choose the workspace where you want to configure the function.

3.Navigate to Custom Functions
Click on Custom Functions under the selected workspace.

4.Choose the Trigger Event
Click Configure next to the event you want the function to run on (e.g., “Booked”).

5.Write the Script
In the Deluge editor that opens, write your logic using the bookingInfo map variable. You can retrieve values using the get() function.
Example:

6.bookingID = bookingInfo.get(“booking_id”);

7.Save the Function
Click Save to activate your custom function. You can also test it immediately using the Execute button.

8.Enable the Trigger
Ensure the event checkbox is selected so the function will run when that event occurs.

Tips

    • Use bookingInfo map: All appointment-related information is stored in this variable as key-value pairs.
    • Reference Field Names Properly: Use the exact Deluge key names like “customer_name” or “start_time” to avoid errors.
    • Test Before Using in Production: Use the Execute option for testing your script with sample data.
    • Role-Based Access: Remember that only Admins and Super Admins can edit; Managers can only view.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Learn how we helped 100 top brands gain success