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
Sticky Posts
Qualify Potential Leads Automatically with SalesIQ Chatbots
Your website may have a lot of visitors every day, but are you struggling to identify your potential leads? You may not know who your ideal leads are just by looking at a website visitor, right? To qualify a lead, you need to know their needs, interests,
OpenAI Alert! Plug Sample #11 - Next-generation chatbots, Zobot + ChatGPT Assistant
Hi Everyone! We have great news for all AI enthusiasts and ChatGPT users! The much anticipated Zobot integration with ChatGPT Assistant is now available with Plugs. OpenAI has introduced 'ChatGPT Assistants' to customize GPT models as per your requirement.
Get live insights on business performance with the SalesIQ TV App - Now available for Apple and Android TVs!
Hello everyone! Let's start with a question - What do you think is the key to a thriving business? Yes, I hear you. It's all about the customers. Success in business often starts with understanding customer needs. But wouldn't you agree that achieving
Deprecation of Google Drive and Sheets connections in Scripts (Deluge)
Hello Everyone, We have an important update for those using the Script (Deluge) platform to build chatbots, widgets, and forms. Google has alerted us about sensitive scopes within the Google Drive and Google Sheets default connections in Deluge. As a
Plug Sample #10 - Simplify Ticket Management (Zoho Desk) with Chatbots
Hi everyone! We're here with another simple yet effective plug for your chatbot to integrate with Zoho Desk. When a customer reports an issue/request during chat, it's logged as a ticket on Desk. When they return for updates, you end up searching through