OpenAI Alert - Plug Sample #6: Reach maximum potential with SalesIQ Zobot and ChatGPT Integration

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 for multiple purposes. ChatGPT is an AI-powered chatbot that can understand natural language and respond to queries in real-time. On the other hand, we already know that SalesIQ's Zobot is an excellent tool to automate customer engagement which helps businesses to engage with their customers and perform actions based on unique business needs. By integrating ChatGPT and SalesIQ's Zobot, businesses can create a seamless customer service experience that is not only efficient but also productive.

Notes
Note:
  • SalesIQ offers native integration with OpenAI, supporting several ChatGPT models, including Assistant, under the ChatGPT card.
  • In this post, we’ll explore how to integrate various ChatGPT models with SalesIQ’s Zobot (Codeless Bot Builder) using Plugs for advanced customizations.
  • If you're looking for a ChatGPT Assistant Plug sample for deeper customizations, click here.

What can this plug do?
  • First plug helps to integrate the GPT model - text-davinci-003 with Zobot using your OpenAI's API key.
  • Second plug helps to integrate the GPT- model 3.5-turbo with Zobot using your OpenAI's API key.
  • Get a response from GPT for any text inputs such as questions/issues from the visitor.
Note : Remember that this script cannot train the GPT models according to your business resource. 

How to create the ChatGPT Plug?

Step 1 - Get API keys from the Open AI
  • Navigate to the OpenAI developer section.
  • Click " Log in " on the top right corner to log in with your account. 
  • If you belong to multiple organization, select your organization. 
  • Finally, click on " Create new secret key " to generate an API key for your account. 


Step 2 - Create the Plug
  • 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 and provide the following
    • Input Parameter: question | Data Type: String
    • Output Parameter: answer | Data Type: String

  • Copy and paste the below script (text-davinci-003 model or gpt-3.5-turbo) and replace the token with your API key.
Plug script to integrate with GPT - text-davinci-003 model
  1. if(session.containsKey("question"))
  2. {
  3. question = session.get("question").get("value");
  4. }
  5. token = "Bearer sk-oxxxxxxxxxxxxxxxxxxxxxxxxxxxxxK";
  6. //replace the token with your API key | token = "Bearer <your API key>";
  7. header = Map();
  8. header.put("Authorization",token);
  9. header.put("Content-Type","application/json");
  10. chatgpt = Collection();
  11. chatgpt = {"model":"text-davinci-003","prompt":question,"temperature":0.9,"max_tokens":250,"top_p":1,"frequency_penalty":0.0,"presence_penalty":0.6,"stop":{" Human:"," AI:"}};
  12. params = Map();
  13. params.put(chatgpt);
  14. response = invokeurl
  15. [
  16. url :" https://api.openai.com/v1/completions"
  17. type :POST
  18. parameters:params.toString()
  19. headers:header
  20. ];
  21. info response;
  22. answer = response.get("choices").getJSON("text");
  23. info answer;
  24. response = Map();
  25. response.put("answer",answer);
  26. return response;
Plug script to integrate with GPT - gpt-3.5-turbo model
  1. if(session.containsKey("question"))
  2. {
  3. question = session.get("question").get("value");
  4. }
  5. token = "Bearer sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx2";
  6. //replace the token with your API key | token = "Bearer <your API key>";
  7. header = Map();
  8. header.put("Authorization",token);
  9. header.put("Content-Type","application/json");
  10. chatgpt = Collection();
  11. chatgpt = {"model":"gpt-3.5-turbo","messages":{{"role":"user","content":question}},"temperature":0.9,"max_tokens":250,"top_p":1,"frequency_penalty":0.0,"presence_penalty":0.6,"stop":{" Human:"," AI:"}};
  12. params = Map();
  13. params.put(chatgpt);
  14. response = invokeurl
  15. [
  16. url :"https://api.openai.com/v1/chat/completions"
  17. type :POST
  18. parameters:params.toString()
  19. headers:header
  20. ];
  21. info response;
  22. answer = response.get("choices").getJSON("message").get("content");
  23. info answer;
  24. response = Map();
  25. response.put("answer",answer);
  26. return response;
  • Click on Save to save the plug. 
  • Test the plug by giving any input.

  • The API response from GPT () will be as below.

  • Finally, click on Publish .
How to incorporate plugs in the Codeless bot builder?
  • Navigate to Settings > Bot > Add , provide the necessary information, and select Codeless Bot as a bot platform or open an existing bot.
  • Select the Plugs under Action Cards and select the required plug (Only published plugs will be listed here).
  • Provide the bot context variables for the plug input (question) and output (answer).

  • In this case, the "visitor.question" is the visitor's input (maybe a question/issue) that is stored in the bot context by the visitor fields card.

  • The plug executes and returns the answer from the GPT response as output (answer) which has to be stored in bot context (gptResponse) for displaying it to the visitors.
  • Click Save. 
  • Then using any input/response cards, display the answer. Type % to list all the dynamic and context variables. 


Heads up:
  • Use a single choice card to display the answer and provide two follow-up actions such as "I've another question" for the visitor to ask another question and "End chat" to end the conversation. 

  • Save the visitor's choice in a bot context and using criteria router , route the flow respectively. 



Cheers, 
Sasidar Thandapani







    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

                                                                                                          • I can't use zoho in my personal computer

                                                                                                            Facing error on monitor Oops! An error occurred
                                                                                                          • My Zoho Account Not Working, Suddenly its stoped

                                                                                                            Hello Team, our company email account is not working, we are not receiving email. Website: www.urgentdubaivisaonline.com Email: social@urgentdubaivisaonline.com
                                                                                                          • MX verification

                                                                                                            Dear All I face a difficulties to verify MX records in my domain alfagrouptrading.sk it is since two days. records are correct and I am waiting for 48 hour I send email shown in the error message with no reply.in addition, it supposed to be propagated
                                                                                                          • I'm not receiving emails.

                                                                                                            Hello. I'm having an issue in which I am able to send emails using my zoho mail, but I seem to be unable to receive them. please help.
                                                                                                          • Change zoho email address

                                                                                                            I am displeased with the email address I created. It's too long.
                                                                                                          • Departments Limit

                                                                                                            There is a limit of departments that i can have on zoho desk?
                                                                                                          • CRM for Everyone - More Actions Option to Create Record

                                                                                                            Please consider the option create a new record for the relevant record from the More Actions menu. I know there is an "Add New" icon further down the menu to create a record for any module, but this just seems more intuitive and could reduce the need
                                                                                                          • CRM For Everyone - Bring Back Settings Tile View

                                                                                                            I've been using CRM for Everyone since it was in early access and I just can't stand the single list settings menu down the left-hand side. It takes so much longer to find the setting I need. Please give users the option to make the old sytle tile view
                                                                                                          • Unified WhatsApp Number Management in Zoho Desk and SalesIQ

                                                                                                            Dear Zoho Desk Support Team, We are currently utilizing both Zoho Desk and Zoho SalesIQ for our customer support operations. While both platforms offer WhatsApp integration, we are facing challenges due to the requirement of separate WhatsApp numbers
                                                                                                          • Mass Update of Lookup Fields not possible

                                                                                                            Hello List I've created a custom field for Leads and Contacts 'Current Campaign'. This is very Handy as I can filter leads and then related them to a campaign. Everything ready, but then I realized that mass update doesn't work for lookup fields... a
                                                                                                          • Time Limited Coupon or Expiring Link in Workflows

                                                                                                            I would like to see a feature where I can include a time limited link in Workflow Campaigns. For example: I could link to a sales page with a discount and set the link to expire after 24h. The link would be generated by Campaigns for each campaign sent
                                                                                                          • How to create a form using both contact and account fields?

                                                                                                            I am sending a prefilled form from CRM with fields mapped, to update records in CRM. If I link the CRM field to the Contacts module, the Account Name field doesn't come up as an option in CRM. If I added it under Related Fields, my understanding it would
                                                                                                          • Boost your Zoho Desk's performance by archiving tickets!

                                                                                                            The longer your help desk operations are, the more likely it is to accumulate tickets that are no longer relevant. For example, ticket records from a year ago are typically less relevant than currently open tickets. Such old tickets may eventually lead
                                                                                                          • Are Zoho Help Center Email Notifications Customisable?

                                                                                                            Hi, I would like to find out if the Zoho Help Center email notifications can be customised to add our own styling and branding? These are the notifications that get sent when a client adds a new topic, adds a comment, signs up to the help center, etc?
                                                                                                          • Increase size of description editor when creating new ticket

                                                                                                            Please can you consider making the description editor in the create new ticket form a resizeable area as by default, it is very small and there appears to be no way to increase the size of it.
                                                                                                          • Wizard Form

                                                                                                            I would like the option to create a wizard that works when you create a record and contacts that are already in the CRM captured with a web 2 lead form (field data inserted in to the wizard).  Having the option to create up to 3/4 segments per screen
                                                                                                          • Two-Way Sync Zoho CRM Custom Module with Zoho FSM Company Addresses

                                                                                                            Business fact: Many companies don't just have one location. They have multiple locations (some have many), with addresses we need to know for service, deliveries, etc. We have created a custom "Sites" module in Zoho CRM to store an Account/Company's addresses
                                                                                                          • Sharing and Converting Custom Reports Across Departments in Zoho Desk

                                                                                                            Hello, We initially started using Zoho Desk with a single department (Department "A"), which included multiple teams. Nearly a year later, we identified several limitations that led us to create three additional departments ("B", "C", and "D") with replicated
                                                                                                          • Dynamic Dashboard for CRM Flyout/Widget

                                                                                                            Hello, Apologies if this has been answered before—it's possible I'm just not searching the community with the right terms. I'm trying to create a dashboard in Zoho Analytics that pulls together reports from several datasets (e.g., CRM Deals, Books Invoices,
                                                                                                          • Mapping a new Ticket in Zoho Desk to an Account or Deal in Zoho CRM manually

                                                                                                            Is there any way for me to map an existing ticket in Zoho desk to an account or Deal within Zoho CRM? Sometimes people use different email to put in a ticket than the one that we have in the CRM, but it's still the same person. We would like to be able
                                                                                                          • Does Thrive work with Zoho Billing (Subscriptions)?

                                                                                                            I would like to use Thrive with Zoho Billing Subscriptions but don't see a way to do so. Can someone point me in the right direction? Thank you
                                                                                                          • Zoho Sprints mobile app(Android and iOS) v2.0

                                                                                                            Hello everyone! We’re thrilled to announce that Zoho Sprints Mobile app2.0 is now live. With the newest version of the Zoho Sprints mobile app, we hope to provide a fresh, faster, and intuitive experience for managing your sprints on the go! Whether you're
                                                                                                          • Subform dynamic fields on Edit, Load of Main form.

                                                                                                            Main Form: Time_Entry Sub Form (separate form): Time_Entries Time_Entries.Time_Entry_No is lookup to - Time_Entry.Time_Sheet_ID (auto number). I would like to disable some of the subform fields upon load (when edited) of the Time_Entry main form. What
                                                                                                          • Add "Ask Zia" Functionality for Report Creation in Zoho Desk

                                                                                                            Hi, How are you? We’ve noticed that Zoho CRM offers a very useful feature called "Ask Zia", which allows users to enter natural language prompts to generate reports quickly and easily using Zia's AI capabilities. Currently, Zoho Desk does not support
                                                                                                          • View Answer Bot conversations?

                                                                                                            We are trialing Zia and are experimenting with Answer Bot on our knowledge base. So far so good! Management asks me if it is possible to view Answer Bot conversations, the purpose being to look over its shoulder and confirm that it is working as des
                                                                                                          • Delivery note from order or from offer

                                                                                                            Hello, in our company and in a lot of companies in Italy, the standard workflow is (in order): 1) Offer 2) Customer order 3) Delivery note. We can have also more delivery notes in one month. 4) Invoice at the end of the month from delivery note (so only
                                                                                                          • Sesiones 1:1 en Zoholics España 2025

                                                                                                            Una de las experiencias más valoradas por los asistentes a Zoholics son las sesiones 1:1 con nuestros expertos técnicos. Este 2025, las traemos de vuelta con aún más fuerza: cada entrada a Zoholics España 2025 incluye una sesión individual gratuita de
                                                                                                          • VOIP integration

                                                                                                            I emailed this question to rishi but never got a response. I notice when I mouse over phone number it has a link to launch into SKYPE. We dont use SKYPE we use Xlite SIP client. Is it possible to change that link to launch our client API? If so how? If not any plans to make that VOIP integration customizable?
                                                                                                          • "The email sending domain must have an active and functional website so that we can proceed with the review."

                                                                                                            I've requested the approval of my account, and got the following response back: "The email sending domain must have an active and functional website so that we can proceed with the review." This is absolutely false. The website I have provided has been
                                                                                                          • Gestion de suivi des expéditions

                                                                                                            Le suivi des expéditions est un élément indispensable à une gestion réussie de la chaîne d'approvisionnement. Aussi bien le fournisseur que le client peuvent bénéficier de la transparence et de la responsabilité apportées par le système ; ce dernier fournit
                                                                                                          • Proposal for Creating a Unique "Address" Entity in Zoho FSM

                                                                                                            The "Address" entity is one of the most critical components for a service-oriented company. While homeowners may change and servicing companies may vary, the address itself remains constant. This constancy is essential for subsequent services, as it provides
                                                                                                          • Is there a way to set Document Owner/Sender via the API

                                                                                                            When sending requests for zoho sign, it would seem zoho uses the id of the person that created the zoho api cred to determine the owner_id, is there a way to set a default for this?
                                                                                                          • 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 mentioned in this KB article http://crmkbase.zoho.com/what-is-the-difference-between-record-modified-time-and-record-last-activity-time
                                                                                                          • Integrate QuickBooks with Bigin and streamline your sales and accounting!

                                                                                                            If your business relies on Bigin for customer management and QuickBooks for accounting and invoicing, this new integration is here to make your operations more efficient. By connecting these two platforms, you can now manage your CRM and financial processes
                                                                                                          • Upload File via email

                                                                                                            Will there be an option to upload a file via email?
                                                                                                          • Footer: Zoho make a big downgrad with new footer option

                                                                                                            Every post about the new footer function is negative and all say: its a big downgrade. The idea behind this new function was: Make it more simple. Great, now its faster and more simple to add an footer. But nobody from zoho team think about the more bigger
                                                                                                          • Office 365 is marking us as "bulk"

                                                                                                            All of a sudden (like a couple of days ago) all of our customers who are on Office 365 are getting our mails in their junk email. This is not the case with Gmail or other random mail servers, nor between us. We got a 10/10 score on mail-tester.com. Also,
                                                                                                          • How to use milestones and task lists effectively

                                                                                                            I am trying to use Zoho Projects for my development process. My goal is to manage project status and provide reports to the customer. I am developing an app (2 apps to be precise: 1 for Android and 1 for iOS) I originally thought my milestones would be: 1. Analysis and Design 2, Android Development 3. iOS Development 4. Web Console Development 5. Quality Control 6. Deployment But then I needed a tasklist before I created a task so it was sort of duplicated with tasklists being a superfluos duplicate
                                                                                                          • Please add custom sort in Windows ver. of Notebook!

                                                                                                            Dear Zoho, I love the custom sort (drag and order notes) in the Android version of Notebook, but when I sync onto the Notebook on Windows, the note orders all get messed up because it doesn't support custom sorting yet. This makes it impossible to do
                                                                                                          • Pivot Table - Zoho Analytics

                                                                                                            I'm creating a Profit and Loss chart in Zoho Analytics using the Pivot Chart feature. While Net Profit can be calculated using the total value, I also need to calculate and display the Gross Profit/Loss directly within the chart. To do this, I need to
                                                                                                          • Next Page

                                                                                                          OSZAR »