Welcome to Portal

?Unknown\pull-down

Welcome to Zoho Cares

Bienvenido a Soporte de Zoho

Search our knowledge base, ask the community or submit a request.

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.

Helpful?810
Updated: 1 year ago
Share :
2 comments

Hello!

How to fetch data from a specific workspace in Bookings to a specific module in CRM?

The integration I did fetches data from all my Bookings workspaces to the module I integrated it with in CRM. 

Help?

Hi,
Please note that to map appointment details of a specific workspace to a specific CRM module, you will currently have to use a custom function code as it cannot directly be implemented via the default integration.