Let the Zobot dynamically display slots and fix appointments using Zoho Calendar!

Let the Zobot dynamically display slots and fix appointments using Zoho Calendar!


Calendars are a huge element in any business - be it small scale or big scale, an industry has requests and appointments coming in all around the year. If you own a business, you will know that a substantial amount of time gets wasted in scheduling. Staff get tied up manually with something as simple as setting up an appointment when they could be doing something more valuable.  Imagine if a bot could handle all the mundane stuff so that your staff is free to do more significant work? We have come up with one such Zobot that displays slots available on your Zoho Calendar dynamically and helps you block slots that don't clash with each other.  

Bot Requirements: 

  • A Zoho Calendar connection

How does this Zobot work? 

  • The Zobot triggers a welcome message when visitors land on the website.
  • It asks for the visitor's name and email address and then displays the list of slots available on your calendar. In case there are any previously blocked slots, the Zobot does not display those.

  1. response = Map();
  2. //Number of dates to display
  3. dateLimits = {"1","2","3","4","5","6","7","8","9","10"};
  4. //Static timeslots that will be initiatlly available for all days
  5. staticTimeSlots = {"10:00","12:00","15:00","17:00"};
  6. //Dates to exclude from the slots
  7. datesToExclude = {"02-04-2019"};
  8. //Days to exclude from the slots
  9. daysToExclude = {"Sunday","Saturday"};
  10. daynumbertowords = {"1":"Sunday","2":"Monday","3":"Tuesday","4":"Wednesday","5":"Thursday","6":"Friday","7":"Saturday"};
  11. monthWordToNumber = {"Jan":"01","Feb":"02","Mar":"03","Apr":"04","May":"05","Jun":"06","Jul":"07","Aug":"08","Sep":"09","Oct":"10","Nov":"11","Dec":"12"};
  12. cal = invokeurl
  13. [
  14. url :" https://www.zohoapis.com/crm/v2/Events "
  15. type :GET
  16. headers:{"Content-Type":"application/json"}
  17. connection:"zcal"
  18. ];
  19. filledSlots = {};
  20. for each  event in cal.get("items")
  21. {
  22. start = event.get("start");
  23. dateformat = start.get("dateTime").toList("T");
  24. dateunits = dateformat.get("0").toList("-");
  25. revampeddateformat = dateunits.get("2") + "-" + dateunits.get("1") + "-" + dateunits.get("0");
  26. revampeddatetimeformat = revampeddateformat + "T" + dateformat.get("1");
  27. datetime = revampeddatetimeformat.toList("+");
  28. filledSlots.insert(datetime.get("0"));
  29. }
  30. dateList = {};
  31. maxdatelimit = dateLimits.largest();
  32. for each  datelimit in dateLimits
  33. {
  34. nextdate = zoho.currentdate.addDay(datelimit);
  35. datesplit = nextdate.toList('-');
  36. scheduleDate = datesplit.get("0") + "-" + monthWordToNumber.get(datesplit.get("1")) + "-" + datesplit.get("2");
  37. dayInNumbers = scheduleDate.toDate().getDayOfWeek();
  38. dayInWords = daynumbertowords.get(dayInNumbers.toString());
  39. if(!daysToExclude.contains(dayInWords))
  40. {
  41. if(!datesToExclude.contains(scheduleDate))
  42. {
  43. dateList.insert(scheduleDate);
  44. }
  45. }
  46. }
  47. freeSlots = Map();
  48. for each  datelimit in dateList
  49. {
  50. dateSlotMap = {};
  51. for each  timeSlot in staticTimeSlots
  52. {
  53. scheduledDateTime = datelimit + "T" + timeSlot + ":00";
  54. if(!filledSlots.contains(scheduledDateTime))
  55. {
  56. dateSlotMap.insert(timeSlot);
  57. }
  58. if(!dateSlotMap.isEmpty())
  59. {
  60. freeSlots.put(datelimit,dateSlotMap);
  61. }
  62. }
  63. }
  • Following this, it saves the date on the Zoho Calendar when the visitor chooses a convenient slot.
  1. ' date = answers.get("slot_selected");
  2. meta = date.get("meta");
  3. displayslot = date.get("text").toList(" ");
  4. card_data = meta.get("card_data");
  5. slot = card_data.get("value").get("slot") + ":00";
  6. value = slot.toDateTime();
  7. display_time = value.toString("HH:mm");
  8. display_date = value.toString("dd-MM-yyy");
  9. _date = value.toString("dd-MM-yyy HH:mm:ss");
  10. info _date;
  11. timeString = {'StartDate':slot,"EndDate":slot,"sum":'Call with ' + name + "Email:" + email};
  12. apiresponse = zoho.calendar.createEvent("zillium.pboyle",timeString);
  • Finally, it sends a confirmation email to the visitor's email address with details about the appointment.

  1. sendmail
  2. [
  3. from :zoho.adminuserid
  4. to :" zillium.pboyle@gmail.com "
  5. subject :"Zoho SalesIQ | Demo Session"
  6. message :"<div>Dear Team,<br></div><div><br></div><div>Customer waiting for a time slot.<br></div><div><br></div><div>Name: " + name + "<br></div><div>Email address: " + email + "<br></div><div><br></div><div>Thanks,<br></div><div>Zylker Webmaster<br></div>"


Bot Flow:


                                                     
 

How to create this bot?

  • Navigate to Settings > Zobot > Create bot . Add a name, description, choose the website and preferred departments.
  • Set trigger criteria and enable business hours and operator handoff based on your requirements. 
  • Now, copy the code and paste it inside each of the three handlers- Trigger, Message and Context. 
  • Create a connection with your Zoho Calendar using Invoke URL. 
  • Save and Publish each handler separately and then publish the bot.  

Note:

Inside this Zobot, you can
  • Define the number of dates and dynamically display the list of slots available for appointments.    
  • Include static time slots for all days and also exclude dates that you do not want to display to visitors - like common holidays or organisation-specific holidays. Here, all Saturdays and Sundays are excluded to avoid meetings or appointments during weekends.  
  • Fix appointments and save them on your Zoho Calendar and also send a confirmation email to the visitor.
You can use the sample scripts attached if your use case is the same or you can use the functionality specific code snippets defined above based on your requirements.
To know more about the Zobot, please visit our  Resources Section

Regards,
Michelle.










    Access your files securely from anywhere









                          Zoho Developer Community




                                                • Desk Community Learning Series


                                                • Digest


                                                • Functions


                                                • Meetups


                                                • Kbase


                                                • Resources


                                                • Glossary


                                                • Desk Marketplace


                                                • MVP Corner


                                                • Word of the Day


                                                • Ask the Experts





                                                          Manage your brands on social media



                                                                Zoho TeamInbox Resources



                                                                    Zoho CRM Plus Resources

                                                                      Zoho Books Resources


                                                                        Zoho Subscriptions Resources

                                                                          Zoho Projects Resources


                                                                            Zoho Sprints Resources


                                                                              Qntrl Resources


                                                                                Zoho Creator Resources



                                                                                    Zoho CRM Resources

                                                                                    • CRM Community Learning Series

                                                                                      CRM Community Learning Series


                                                                                    • Kaizen

                                                                                      Kaizen

                                                                                    • Functions

                                                                                      Functions

                                                                                    • Meetups

                                                                                      Meetups

                                                                                    • Kbase

                                                                                      Kbase

                                                                                    • Resources

                                                                                      Resources

                                                                                    • Digest

                                                                                      Digest

                                                                                    • CRM Marketplace

                                                                                      CRM Marketplace

                                                                                    • MVP Corner

                                                                                      MVP Corner







                                                                                        Design. Discuss. Deliver.

                                                                                        Create visually engaging stories with Zoho Show.

                                                                                        Get Started Now


                                                                                          Zoho Show Resources


                                                                                            Zoho Writer Writer

                                                                                            Get Started. Write Away!

                                                                                            Writer is a powerful online word processor, designed for collaborative work.

                                                                                              Zoho CRM コンテンツ






                                                                                                Nederlandse Hulpbronnen


                                                                                                    ご検討中の方




                                                                                                          • Recent Topics

                                                                                                          • How do I create a time field?

                                                                                                            I want a field that only records time. I can only see how to create a date-time field. If I do that and enter a time, without a date, nothing is recorded. If I create a number or decimal field, I cannot use it in time calculations. All I want is a field
                                                                                                          • Alternating columns - How to reverse order on mobile - Responsive template

                                                                                                            Can the order of alternating columns be reversed on mobile so that image comes before the text? Example: Desktop Row 1 column Left (image) , column right (text) Row 2 column Left (text) , column right (image) Mobile Currently Row 1 Image over text Row
                                                                                                          • Let us view and export the full price books data from CRM

                                                                                                            I quote out of CRM, some of my clients have specialised pricing for specific products - therefore we use Price Books to manage these special prices. I can only see the breakdown of the products listed in the price book and the specialised pricing for
                                                                                                          • InvokeURL butchering JSON for OpenAI API calls

                                                                                                            My organization works with mostly educational institutions. We have a custom module called "Schools", which is the user-entered school name they put when using our service (which they enter along with their state and zip code). We want to map this to
                                                                                                          • CRM for email in Outlook: how to ignore addresses?

                                                                                                            We’re using the "Zoho CRM for email" add-in for Outlook. When opening an email, the add-in displays all email addresses from the message and allows me to add them to the CRM or shows if they’re already contacts. However, sometimes people listed in To
                                                                                                          • Custom order for Current Stage (Blueprint field)

                                                                                                            Hi! I suggest adding the option to set a custom order in reports for the Blueprint field ‘Current Stage’. Currently, these fields can only be sorted in ascending or descending order. Thanks!
                                                                                                          • CRM E-mail Sync from Outlook

                                                                                                            We are exploring Zoho as a possible new solution for our company. We are trying to understand further on how e-mail sync works. We use outlook. Our current CRM logs anytime we e-mail a customer so we can see in the CRM the message sent to the customer.
                                                                                                          • Run your help desk on your schedule

                                                                                                            In business, time is of the essence. This is especially true in a function like customer service, where KPIs such as response time and agent availability are the measures of success. Perhaps the most crucial consideration one needs to make about time is your hours of operation. These set expectations for your customer and for employees. To make communicating this information easier, we've revamped the way business hours and holiday lists work in Zoho Desk.   In order to accommodate teams that work
                                                                                                          • The Customer Happiness REST API is broken

                                                                                                            1. We are unable to extract the customerHappiness ( https://desk.zoho.com/DeskAPIDocument#CustomerHappiness#CustomerHappiness_ListallcustomerHappiness) object using the ticketNumber criteria. We keep getting HTTP 429 even when we limit to 60 calls per
                                                                                                          • Can the Product Image on the Quote Template be enlarged

                                                                                                            Hello, I am editing the Quote Template and added ${Products.Product Image} to the line item and the image comes up but it is very tiny. Is there anyway that you can resize this to be larger? Any help would be great! Thanks
                                                                                                          • Automatic Department and Employee Sync Between Zoho One and Zoho People

                                                                                                            Dear Zoho Support, I'm writing to propose a valuable feature request that would streamline data management and improve user experience within the Zoho ecosystem: automatic synchronization between departments and employees in Zoho One and Zoho People.
                                                                                                          • Zoho Expense and Chase Bank Visa credit cards - Direct Feed?

                                                                                                            Our company uses JP Morgan Chase Visa credit cards. We can't be the first to try and use a combination of Zoho Expense + Chase Bank + Visa Credit Cards --- anyone successful with this combination? 1. The direct feed automation isn't working. When I go
                                                                                                          • Impossibile inviare il messaggio;Motivo:554 5.1.8 Indirizzo del mittente bloccato

                                                                                                            " Impossibile inviare il messaggio;Motivo:554 5.1.8 Indirizzo del mittente bloccato" Hi need to send email, how can fix this? Thanks, Alice
                                                                                                          • Image inputed in Zoho Form were displayed to small in exported version

                                                                                                            Good evening, my name is athallah, i am a trainee in government office Right now, i use Zoho form to digitalize an airfield monitoring form. my problem is, the image were to small to displayed in exported version. it really bad for formal presentation
                                                                                                          • API. How do I get responses submitted to the form?

                                                                                                            Hi, I'm trying to retrieve a list of form responses via the API. I've created a Self Client application in API Console. What scoup should I enter? What are the endpoints? Is there documentation on this anywhere? I've wasted a lot of time searching. GPT
                                                                                                          • Question about Zoho CRM Professional plan users

                                                                                                            Hello! I have a question about the Zoho CRM Professional plan. Is the pricing charged per user or per organization? Are there any free users included in this plan, or do I need to pay for each additional user separately? Thank you!
                                                                                                          • Communicating with emojis

                                                                                                            On July 17, we celebrate World Emoji Day! We're a bit late 😐 sharing insights about this day. But we just couldn't let it pass without a mention 😊 because emojis have a meaningful connection with customer service 💬 🤝. We do not want to miss out on
                                                                                                          • Changing the Default Search Criteria for Finding Duplicates

                                                                                                            Hey everyone, is it possible to adjust the default search criteria for finding and merging duplicate records? Right now, CRM uses some (in my opinion nonsensical) fields as search criteria for duplicate records which do nothing except dilute the results.
                                                                                                          • Is it possible to create a word cloud chart in ZoHo Analystics?

                                                                                                            Hi there, I have a volume of transaction text that I would like to analyse using word cloud (or other approcah to detect and present word frequency in a dataset). For example, I have 50,000 records describing menu items in restaurants. I want to be able
                                                                                                          • Help integrating Aircall into Zoho CRM

                                                                                                            Hi all, We are need to get better AirCall integration into Zoho. We have configured in the Aircall dashboard but we have not done the Zoho side. We cannot see Zoho CRM information on incoming calls. And we calls and text's are not being logged. Specifically
                                                                                                          • Shopify Extension no longer working in CRM

                                                                                                            Zoho CRM and Extension are no longer working properly. We have used Shopify Basic for years. All of the sudden it stopped working, then started working again, and now no longer working again. There are several ways for Personal Information to sync from
                                                                                                          • How to keep track of bags, cans, drums of inventory?

                                                                                                            We buy and sell products that are packaged in bags 🛍️, cans🥫, drums🛢️, etc. with batch numbers. When we get a shipment of one of the products, how do we track we received (say) 10 cans each of 5L of a product and maybe we received 10 cans of another
                                                                                                          • Easy third party collaboration: Zoho Flow Integration

                                                                                                            Third-party integrations extend your project functionality with improved workflow, and data processing. With Zoho Flow integration you can include multiple third party actions into your project or task automation. Add Zoho Flow action in Workflow rules
                                                                                                          • Zoho Inventory - How to pay a supplier up front then receive multiple deliveries

                                                                                                            How do we manage situations where we pay a supplier up front, then the receive the products in increments? Example Workflow: Create Purchase Order > Receive Bill for full amount > Receive Items 2 or more deliveries. Currently, once a Bill is created against
                                                                                                          • Introducing Configure, Price, Quote (CPQ) in Zoho CRM | Public early access 2023

                                                                                                            Greetings Customers! We're excited to announce that the CPQ feature will soon be available in Zoho CRM and accessible to all accounts using the Professional, Enterprise, and Ultimate editions. We've opened this feature to select customers, and it'll be
                                                                                                          • how to edit the converted lead records?

                                                                                                            so I can fetch the converted leads records using API (COQL), using this endpoint https://www.zohoapis.com/crm/v5/coql and using COQL filter Converted__s=true for some reasons I need to change the value from a field in a converted lead record. When I try
                                                                                                          • Zoho Bookings <> CRM integration

                                                                                                            Hello Zoho community! We are enabling our Zoho Bookings <> CRM integration. What is the workflow if the integration detects that the contact already exists in the CRM? Does it create a duplicate record? Overwrite the record? Merge the record? (in this
                                                                                                          • Cannot reject empty expense report

                                                                                                            Hello, We are currently having issues with two empty expense reports where if we try to reject them, either manually or through the REST API, we get error 114016, which says some of the expenses have already been billed and must be removed. I'd appreciate
                                                                                                          • Use of Zia within Forms

                                                                                                            I have noticed that recently you have added Zia to help create forms from scratch. Would it be possible to add Zia functionality to free text fields for form submissions or if this is already on the roadmap an ETA for this please? We have a lot of field
                                                                                                          • Default in fields on Form B based on the user selection in Form A

                                                                                                            Hi Everyone, I have added an action button to a form report to bring up a new form based on user selection, see it indicated in red below: Then when the ne form loads, I want to default in some of the fields based on the record the user was selected on.
                                                                                                          • Auto-sync field of lookup value

                                                                                                            This feature has been requested many times in the discussion Field of Lookup Announcement and this post aims to track it separately. At the moment the value of a 'field of lookup' is a snapshot but once the parent lookup field is updated the values diverge.
                                                                                                          • Last activity time is acting like last modified time

                                                                                                            When i edit the description or any field in the potential, account, contact and lead, the Last Activity Time is being updated like the Modified Time. This is messing all workflows and reports and we are unable to track real last time of activities like
                                                                                                          • Enhancements to the formula field in Zoho CRM: Auto-refresh formulas with the "Now" function, stop formula executions based on criteria, and include formulas within formulas

                                                                                                            Dear Customers, We hope you're well! By their nature, modern businesses rely every day on computations, whether it's to calculate the price of a product, assess ROI, evaluate the lifetime value of a customer, or even determine the age of a record. With
                                                                                                          • HEX/RGB Color Input in Visual Editor

                                                                                                            Hello Zoho Pagesense Team, We hope you're doing well. We’d like to submit a feature request to improve the color selection options in the Pagesense popup editor. Current Limitation: Currently, to set text colors, users must move the color slider manually.
                                                                                                          • Add Comprehensive Accessibility Features to Zoho Writer

                                                                                                            Hello Zoho Writer Team, We hope you are doing well. We would like to submit a feature request to enhance Zoho Writer with a full set of accessibility tools, similar to the accessibility options already available in the Zoho Desk agent interface. 🚧 Current
                                                                                                          • CRM and Campaigns- tags not integrating?

                                                                                                            Hi! I am setting up an automation in zoho campaigns and it says the crm is integrated...but when I want to use a trigger of a certain tag I created for people in the crm to denote those who purchased, it doesnt have that tag available as an option in
                                                                                                          • Maximum limit of rows exceeded

                                                                                                            I am trying to add a row to a spreadsheets that has fewer than 60 rows. I keep getting an error message that says I have exceeded the maximum limit of 65,536 rows. Any ideas out there?
                                                                                                          • Can't change form's original name in URL

                                                                                                            Hi all, I have been duplicating + editing forms for jobs regarding the same department to maintain formatting + styling. The issue I've not run into is because I've duplicated it from an existing form, the URL doesn't seem to want to update with the new
                                                                                                          • 【参加無料】今年最後のZoho ユーザー交流会|東京・大阪・名古屋で開催! 活用事例&ユーザー同士の情報交換

                                                                                                            ユーザーの皆さま、こんにちは。コミュニティチームの中野です。 11月に東京、大阪、名古屋の3都市でZoho ユーザー交流会を開催します! 毎回ご好評いただいている本イベントでは、実際の Zohoユーザーによるリアルな活用事例の共有や 参加者同士でノウハウを交換し合うグループワークを予定しています。 「他社の活用を参考にしたい」「Zoho をもっと使いこなしたい」方にぴったりの場です。 初参加の方もぜひお気軽にご参加ください! ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー
                                                                                                          • Introducing parent-child ticketing in Zoho Desk [Early access]

                                                                                                            Hello Zoho Desk users! We have introduced the parent-child ticketing system to help customer service teams ensure efficient resolution of issues involving multiple, related tickets. You can now combine repetitive and interconnected tickets into parent-child
                                                                                                          • Next Page