Plug Sample #3: Part 2 - Fetch the operators' available slots in Zoho Bookings.
In
earlier post
we covered how to design a Codeless bot to schedule an appointment/meeting on Zoho Booking using Plugs. In this post we will learn how to create a plug to fetch the operator's available timings on the visitor's preferred date in Zoho Bookings. Therefore, when scheduling a meeting, the bot initially asks for a preferred date from the visitor and then displays the operator's available slots during that particular day. This helps your organization to manage your operator's schedules and eliminates the clash of bookings/meetings.
What can this plug do?
-
Gets the visitor's preferred date.
-
Display the agent's
available slots
(Zoho Bookings) on the preferred date.
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
1. Input Parameter 1 :
date
| Data Type :
Date
2. Output Parameters :
slots
| Data Type :
Number list
Create a connection with Zoho bookings.
-
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 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();
-
date = "";
-
date = session.get("date").get("value");
-
unixDate = date.toDate();
-
slots = List();
-
//Zoho Booking "Available Deluge task"
-
//Ref -
https://www.zoho.com/deluge/help/bookings/get-available-slots.html
-
//Replace your staff ID and service ID
-
available_slots = zoho.bookings.getAvailableSlots(4302354000000026055,4302354000000026017,date,"zohobookings");
-
slots_collect = available_slots.get("response").get("returnvalue").get("data");
-
for each slot in slots_collect
-
{
-
unixSlot = unixDate + " " + slot + ":00";
-
slots.add(unixSlot.unixEpoch("Asia/Calcutta"));
-
response.put("slots",slots);
-
info slots;
-
}
-
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 choose the required Plug (Only published plugs will be listed here)
-
Provide the Plug
inputs
and
outputs
.
-
In this case, the preferred date from the visitor is collected from the calendar block and stored in bot context (date.option) -
Plug input.
-
Once the plug is executed, it will return the available slots as
output
which is stored in bot context (slot.option).
-
Then use
Slots block
to display the available slots to the visitors. Provide the bot context as slots (plug output).
Related Links:
Regards,
Sasidar Thandapani
Deliver unforgettable customer experiences
Deliver unforgettable customer experiences
New to Zoho Marketing Plus?
Everything you need to run your marketing
New to Zoho Marketing Plus?
Everything you need to run your marketing
Zoho Desk Resources
-
Desk Community Learning Series
-
-
-
-
-
-
-
-
-
Sticky Posts
OpenAI Alert - Plug Sample #6: Reach maximum potential with SalesIQ Zobot and ChatGPT Integration
In recent times, AI-powered tools have seen a remarkable surge in usage due to their exceptional capacity to enhance overall performance across diverse industries and sectors. One such tool is ChatGPT which businesses have started to use predominantly
Plug Sample #5 - Read and write values/data in a Google sheet with Zobot
We all know google sheets are one of the widely used spreadsheet software. It helps us to make data-driven decisions. When connecting the Zobot with sheets, the bot can display values/data from a spreadsheet, like the available stock details (Item price,
Speak Your Customers' Language: SalesIQ's chatbots now support 30 languages 🤖
We're unveiling some major upgrades to our chatbot that are set to revolutionize your experience! Now SalesIQ support 30 languages for both Zobot and Answer bot. By speaking your customers' language, you can enhance engagement, improve customer satisfaction,
Attention Deluge Developers: Important Update Regarding "Send Email Deluge Task"
Hi Deluge Users, We hope this message finds you well. We would like to inform you about a recent update on the Send emails deluge task. If you are using this deluge task (SalesIQ Scripts) for your Zobot, widgets, or form controllers to send emails, please
Hide Zoho SalesIQ chat widget outside operating regions to optimize engagements
Have you ever found yourself in a situation where you're receiving chat requests from locations where your business isn't operational? Having to set routing rules or manually delete chats from your logs can be tedious and time-consuming, hampering your
Zoho TeamInbox Resources
Zoho DataPrep Resources
Zoho CRM Plus Resources
Zoho Books Resources
Zoho Subscriptions Resources
Zoho Projects Resources
Zoho Sprints Resources
Qntrl Resources
Zoho Creator Resources
Zoho WorkDrive Resources
Zoho Campaigns Resources
Zoho CRM Resources
Zoho Show Resources
Writer Get Started. Write Away!
Writer is a powerful online word processor, designed for collaborative work.