Custom Functions | Help - Zoho Bookings

Custom Functions

Super admins and Admins can view and edit this information. Managers can only view this information. Staff will not have access to this information.

Custom functions help with automating actions that require procedural logic and that cannot be executed using default actions. For example, to send email or SMS notifications, we can use the Notifications feature, which is available by default. But let's say we need to create an invoice in Zoho Invoice as soon as an appointment is booked. Manually performing this task for every appointment is tedious, so we can automate it using Custom Functions by writing simple scripts in Deluge, Zoho's scripting language.  
 
Deluge has a predefined syntax for every action you want to perform. From running loops to using conditional statements, from integrating with other Zoho Services to making API calls to other external services and much more, Deluge covers it all.
 
Custom Functions can be triggered when an appointment is:
  1. Booked
  2. Rescheduled
  3. Canceled
  4. Marked as Completed
  5. Marked as No Show 
Useful information about the appointment is stored as key-value pairs in a map variable named "bookingInfo". This information is readily available for use while writing scripts using Custom Functions. The key can be used to retrieve a particular value. Learn about the applicable key-value pairs here.
 
To configure Custom Functions:
  1. Click the Manage Business  icon in the top right corner, then click Workspaces.



  2. Click the required workspace and choose Custom Functions.



  3. Click Configure next to the event for which the function must be triggered.



  4. In the Deluge editor that opens, write the required script.

  5. Click Save.
Scripts can also be executed instantly by clicking Execute.



Custom Functions will be triggered only for events that have been enabled by checking the relevant boxes.



Table displaying the fields along with the information they store

 

Field Name

Deluge Name (to be used in scripting)

Information stored

Booking ID

booking_id

ID of the appointment

Workspace ID

workspace_id

ID of the workspace in which the service exists

Workspace Name

workspace_name

Name of the workspace in which the service exists

Staff ID

staff_id

ID of the concerning staff

Staff Name

staff_name

Name of the concerning staff

Staff Email

staff_email

Email address of the staff

Staff Contact Number

staff_contact_number

Contact number of the staff

Co-Hosts

co-hosts

List of staff email addresses assigned for the collective booking appointment

Service ID

service_id

ID of the concerning service

Service Name

service_name

Name of the concerning service

Service Description

service_description

Description of the concerning service

Resource Name

resource_name

Name of the concerning resource

Resource ID

resource_id

ID of the concerning resource

Resource Description

resource_description

Description of the concerning resource

Customer Email

customer_email

Email address of the concerning customer

Customer Name

customer_name

Name of the concerning customer

Customer First Name

customer_first_name

First name of the concerning customer

Customer Last Name

customer_last_name

Last name of the concerning customer

Customer Contact Number

customer_contact_no

Phone number of the concerning customer

Customer Booking Time Zone

customer_booking_time_zone

Time zone applicable to the customer

Customer Booking Start Time

customer_booking_start_time

 

Appointment start time

 

(applicable only to appointments raised by the customer)

 

Customer More Info

customer_more_info

Values of custom fields added to registration form

Booking Start Time

start_time

Appointment start time in customer's time zone

Booking End Time

end_time

Appointment end time in customer's time zone

Booking ISO Start Time

iso_start_time

Appointment start time in ISO format

Booking ISO End Time

iso_end_time

Appointment end time in ISO format

Duration

duration

Duration of the appointment

Cost

cost

Total amount for the appointment

Cost Paid

cost_paid

Amount paid so far for the appointment

Due Amount

due

Balance amount to be paid by the customer

Booked On

booked_on

Date on which the appointment was booked

Booking Status

status

Status of the booking

Booking Type

booking_type

Type of the service

Booking Summary URL

summary_url

Link to the booking summary

Notes

notes

Notes given by staff/customer for the appointment's last action (Add/Reschedule/Cancel)

Time zone

time_zone

Time Zone of the business

Currency

currency

Currency in which the business sets the pricing

Assist info

assist_info

Assist session link

Meeting info

meeting_info

Meeting start link or join link

Meeting Joinlink

join_link

Meeting join link

 

The fields are stored as keys, along with their values in a predefined map variable named "bookingInfo". To fetch a required key, use the Deluge get function. For example, to fetch the booking ID and store it in a variable named "bookingID", use the following snippet: 
  1. bookingID = bookingInfo.get("booking_id");
Learn about Deluge here.
Note: The number of workspaces that can be added is governed by the subscription plan that users hold with Zoho Bookings.

    Access your files securely from anywhere

      Zoho CRM Training Programs

      Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

      Zoho CRM Training
        Redefine the way you work
        with Zoho Workplace

          Zoho DataPrep Personalized Demo

          If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

          Zoho CRM Training

            Create, share, and deliver

            beautiful slides from anywhere.

            Get Started Now


              Zoho Sign now offers specialized one-on-one training for both administrators and developers.

              BOOK A SESSION






                          Quick Links Workflow Automation Data Collection
                          Web Forms Enterprise Begin Data Collection
                          Interactive Forms Workplace Data Collection App
                          Offline Forms Customer Service Accessible Forms
                          Digital Forms Marketing Forms for Small Business
                          HTML Forms Education Forms for Enterprise
                          Contact Forms E-commerce Forms for any business
                          Lead Generation Forms Healthcare Forms for Startups
                          Wordpress Forms Customer onboarding Order Forms for Small Business
                          No Code Forms Construction RSVP tool for holidays
                          Free Forms Travel
                          Prefill Forms Non-Profit

                          Intake Forms Legal

                          Form Designer HR

                          Card Forms Food
                          Assign Forms Photography

                          Translate Forms Real Estate
                          Electronic Forms

                          Notification Emails for Forms Alternatives
                          Holiday Forms Google Forms alternative 
                          Form to PDF Jotform alternative





                                            You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.




                                                Manage your brands on social media

                                                  Zoho Desk Resources

                                                  • Desk Community Learning Series


                                                  • Digest


                                                  • Functions


                                                  • Meetups


                                                  • Kbase


                                                  • Resources


                                                  • Glossary


                                                  • Desk Marketplace


                                                  • MVP Corner


                                                  • Word of the Day


                                                    Zoho Marketing Automation

                                                      Zoho Sheet Resources

                                                       

                                                          Zoho Forms Resources


                                                            Secure your business
                                                            communication with Zoho Mail


                                                            Mail on the move with
                                                            Zoho Mail mobile application

                                                              Stay on top of your schedule
                                                              at all times


                                                              Carry your calendar with you
                                                              Anytime, anywhere




                                                                    Zoho Sign Resources

                                                                      Sign, Paperless!

                                                                      Sign and send business documents on the go!

                                                                      Get Started Now




                                                                              Zoho TeamInbox Resources



                                                                                      Zoho DataPrep Resources



                                                                                        Zoho DataPrep Demo

                                                                                        Get a personalized demo or POC

                                                                                        REGISTER NOW


                                                                                          Design. Discuss. Deliver.

                                                                                          Create visually engaging stories with Zoho Show.

                                                                                          Get Started Now









                                                                                                              • Related Articles

                                                                                                              • Custom Labels

                                                                                                                Super admins and admins can view and edit this information. Managers can only view this information. Staff members will not have access to this information.   Set personalized phrases for "Service", "Staff", and "Resource" using Custom Labels. For ...
                                                                                                              • Custom Domain

                                                                                                                Super admins and admins can view and edit this information. Managers can only view this information. Staff will not have access to this information. If you already own a domain for your business, you can attach the booking page to your domain. For ...
                                                                                                              • Quickstart guide

                                                                                                                Find the perfect time with your customers The fact that customer satisfaction is keystone to any business cannot be denied. With businesses increasingly becoming online, providing services to customer has only become more challenging. And also, with ...
                                                                                                              • Zoho CRM Integration

                                                                                                                Super admin and admins can access this integration. Managers and staff cannot access this integration By integrating Zoho Bookings with Zoho CRM, your business can seamlessly centralize customer information in your CRM. The customer details that are ...
                                                                                                              • Zoho Bookings for Zoho CRM plugin

                                                                                                                Users who have already installed the plugin, please do the below to get the latest changes 1. Update the plugin. 2. Revoke the access and reauthorize it. With the Zoho Bookings plugin, you can Schedule appointments with your Contacts and Leads in ...
                                                                                                                Wherever you are is as good as
                                                                                                                your workplace

                                                                                                                  Resources

                                                                                                                  Videos

                                                                                                                  Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                                                                                  eBooks

                                                                                                                  Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                                                                                  Webinars

                                                                                                                  Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                                                  CRM Tips

                                                                                                                  Make the most of Zoho CRM with these useful tips.



                                                                                                                    Zoho Show Resources