Initiating a SalesIQ Zobot from a custom button on Zoho Sites

Initiating a SalesIQ Zobot from a custom button on Zoho Sites

I have created a Zobot set to initiate on a custom action called "Fast_Answers".  On Zoho Sites, I created a code snippet button and set it to on-click run the event called "Fast_Answers".  I installed the SalesIQ integration code into the Zoho Sites Page Header, and added the following JavaScript to run the custom function, but nothing happens when I click the button on Zoho Sites.   This is my first time trying to do this.   What am I missing or doing wrong??

<style>
  #chatButton {
    background-color: #FF6A00; /* Custom orange color */
    color: white;
    font-size: 14px;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 170px;
    text-align: center;
    display: block;
    margin: 0 auto;
  }

  #chatButton:hover {
    background-color: #E04E2A; /* Darker shade for hover effect */
  }
</style>

<button id="chatButton">Chat</button>

<script>
  // Define the custom function Fast_Answers
  function Fast_Answers() {
    alert("Fast_Answers function has been initiated!");

  }

  // Ensure the DOM is fully loaded before attaching the event listener
  document.addEventListener("DOMContentLoaded", function() {
    // Get the button element by its ID and add an event listener
    const chatButton = document.getElementById("chatButton");
    if (chatButton) {
      chatButton.addEventListener("click", Fast_Answers);
    }
  });
</script>

    Zoho Desk Resources

    • Desk Community Learning Series


    • Digest


    • Functions


    • Meetups


    • Kbase


    • Resources


    • Glossary


    • Desk Marketplace


    • MVP Corner


    • Word of the Day


      • Sticky Posts

      • How to Add Users to your Organization in ZohoMail?

        A better clarity so you can create other users to start using Zoho Mail. You can directly Add Users from the Control Panel to your Organization. You can invite users with the existing email address. If the person (user) already uses ZohoCRM, then you can import users from Zoho CRM. You can also import them using a .csv file. (if you are planning to add them in Bulk)  In this topic, We will be discussing on how to Add and Invite users only.  The Import options are self explanatory. ____________________________________________________________________________________________________________

      Zoho CRM Plus Resources

        Zoho Books Resources


          Zoho Subscriptions Resources

            Zoho Projects Resources


              Zoho Sprints Resources


                Zoho Orchestly Resources


                  Zoho Creator Resources


                    Zoho WorkDrive Resources



                      Zoho Campaigns Resources

                        Zoho CRM Resources

                        • CRM Community Learning Series

                          CRM Community Learning Series


                        • Tips

                          Tips

                        • Functions

                          Functions

                        • Meetups

                          Meetups

                        • Kbase

                          Kbase

                        • Resources

                          Resources

                        • Digest

                          Digest

                        • CRM Marketplace

                          CRM Marketplace

                        • MVP Corner

                          MVP Corner




                          Zoho Writer Writer

                          Get Started. Write Away!

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

                            Zoho CRM コンテンツ




                              ご検討中の方