Plug Sample #3: Zoho bookings integration plug for chatbots built with codeless bot builder
Appointment scheduling is an essential process for any business, and we have Zoho Bookings to do it hassle-free. You can further automate the process using AI-powered chatbots, which can save a lot of time and act as an excellent tool to increase engagement with your website visitors. You can build such chatbots without writing a single line of code using our Codeless bot builder that has a drag-and-drop user interface. However, you can make your no-code bot unleash its full potential using Plugs.
Plugs in the Codeless bot platform help you create customized actions and third-party integrations by writing minimal code. Let's learn how to add a Zoho bookings plug for scheduling appointments.
What can this plug incorporate?
The following plug can help you to incorporate an appointment scheduling option using Zoho bookings into your existing codeless bot flow.
How to Create this Plugs?
- In your SalesIQ Dashboard, navigate to Settings > Developers > Plugs > Click on Add.
- Provide your Plug a name, description, select the Platform as SalesIQ Scripts , and click on Create Plug.
- Click on Parameters , provide the following:
- Input Parameter 1 : name | Data Type : String
- Input Parameter 2 : email | Data Type : Email
- Input Parameter 3 : phone | Data Type : Phone
- Input Parameter 4 : datetime | Data Type : Date and Time
- Output Parameters : bookingid | Data Type : String
To know how to fetch the operator's available slot, click here
- Click on Connection at the left bottom. You will be redirected to the connection page.
- Click on Create connection at the top right corner. Under Default connection, select Zoho OAuth.
- Then, give your connection a name , connection link name and choose required scopes.
- Click on Create And Connect. Upon successful authentication, Zoho SalesIQ and Zoho Bookings will be connected. Note : The Connection Link Name will be used in scripts to invoke URL tasks.
- Copy, paste the below code and make the required changes.
- response = Map();
- name = "";
- phone = "";
- email = "";
- datetime = "";
- //Change your service_id and staff_id
- service_id = "4302354000000026055";
- staff_id = "4302354000000026017";
- name = session.get("name").get("value");
- email = session.get("email").get("value");
- phone_number = session.get("phone").get("value");
- phoneList = phone.toList(" ");
- phone = phoneList.get(1);
- datetime = session.get("datetime").get("value").get("date_time");
- //Changing the date and time format
- parsedDate = datetime.toDateTime();
- dateAndTimesList = datetime.toList("T");
- parsedDateList = parsedDate.toString().toList(" ");
- changed_format_datetime = parsedDateList.get(0) + " " + dateAndTimesList.get(1) + ":00";
- //create bookings API
- customerDetails = Map();
- // "zohobookings" - connection name
- create_booking = zoho.bookings.createAppointment(service_id,changed_format_datetime,customerDetails,staff_id,"Asia/Calcutta",true,"zohobookings");
- bookingid = create_booking.get("response").get("returnvalue").get("booking_id");
- response = Map();
- return response;
- Then, click Save , preview the plug and Publish it.
- Navigate to Settings > Bot > Add, provide the necessary information and select Codeless Bot as bot platform or open an existing bot.
- Select the Plugs under Action Block and select the required Plug (Only published plugs will be listed here)
- Provide the Plug inputs and outputs.
- In this case, name, email, phone, date & time are stored in bot context and used as Plug inputs.
- The plug executes and returns the booking ID as output which is stored in bot context (booking.id) for displaying it to the visitors.
- Click Save.
- If you have multiple services and staff, create similar plugs for each service and staff/operator and then associate them respectively in the codeless bot.
- For example, say you provide a service called Depression Therapy, Motivational Therapy and you have two staff for each therapy.
- Create plugs for each service id and staff id, and add them in the bots flow.
- Plug 1 - (Depression Therapy, Staff 1)
- Plug 2 - (Depression Therapy, Staff 2)
- Plug 3 - (Motivational Therapy, Staff 1)
- Plug 4 - (Motivational Therapy, Staff 2)
- Initially, display the services you provide to the visitors (In this case, depression and motivational therapy) using Button blocks.
- Once the visitors select the service, then provide the staff available (Staff 1 and 2) and then add the respective plug in the bot' flow to schedule bookings.
Zoho Pagesense Resources
Zoho SalesIQ Resources
Zoho TeamInbox Resources
Zoho DataPrep Resources
Zoho CRM Plus Resources
Zoho Books Resources
Zoho Subscriptions Resources
Zoho Desk Resources
Zoho Projects Resources
Zoho Sprints Resources
Zoho Creator Resources
Zoho WorkDrive Resources
Zoho Campaigns Resources
Zoho CRM Resources
Zoho Show Resources
Get Started. Write Away!
Writer is a powerful online word processor, designed for collaborative work.