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. In this post, let's discuss how to integrate ChatGPT with SalesIQ's Zobot ( Codeless bot builder ) using Plugs.

Here is a sample plug to Integrate Zobot with ChatGPT Assistant

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







    • Recent Topics

    • Revamped Print in Zoho Sheet—customized for paper

      The latest enhancements to Zoho Sheet's Print settings allows you to print a worksheet or a selected range, with customizations that make the data comprehensible, even on paper.   Customize header and footer Make your spreadsheets meaningful with a relevant header and footer. You can now choose to display the file name, sheet name, current page number, total pages, date, and time as the header and footer in your print view. Besides the predefined elements, you can also give a custom text for header/footer.
    • Adding Bluesky channel

      Hello, Is Bluesky (AT protocol) soon added on Social ? Bluesky is being developped and is now open to anyone (no more invitation) Thank you
    • How Can i put a form in Zobot

      Hi,how can i integrate a form which has a multiple options to choose from.the form should be opened or displayed by zobot after it meets a requirement in the conversation. Thanks in advance !
    • Unified customer portal login

      As I'm a Zoho One subscriber I can provide my customers with portal access to many of the Zoho apps. However, the customer must have a separate login for each app, which may be difficult for them to manage and frustrating as all they understand is that
    • message on click of button

      Hi, i added insert task on 'Quick view' below  'Action'  of report just below 'Delete' button,  so i am trying to add a message on click of button that, "This item is now added into Pending Request" like this .... So, how can i achieve this ; because
    • Is it possible to disable Chat Waiting Time, or to make it indefinite?

      We have used many online chat services over the years. However, Zoho's SalesIQ appears to be the only one we've tried that has a mandatory time limit where we must respond to new customer queries. We are a small business so we have no dedicated staff
    • Is Drawing feature supported in zoho Sheets?

      Is there any option to draw arrows and some basic shapes such as circle , rectangle etc in zoho sheets? if so, can someone help me find it 
    • Access CRM Variables from Formula field

      Is it possible to use a CRM variable (defined in Developer Space -> CRM Variables) in a formula field for calculations ?
    • Client Script: $Client.refresh({ triggerOnLoad: true }); not triggering onLoad Client Scripts

      Hey friends! I'm trying to store a temporary var, refresh the page for the user, then check that temporary var and do some actions. Theoretically using the title's code: $Client.refresh({ triggerOnLoad: true }); should refresh the page and trigger on
    • Super Admin login to delete certain folders and passwords and clearing the trash folder, they are still appearing on my dashboard

      Hi Zoho Team, I need help with an issue I've encountered. Despite using the Super Admin login to delete certain folders and passwords and clearing the trash folder, they are still appearing on my dashboard. I would like to understand why this is happening
    • Pulling Specific Products from Sales Orders in Books to a CRM Record

      We currently process orders directly through our website (woocommerce) as well as through manual sales orders in zoho books. When an order comes through the website, all of the individual products from that order show up in the CRM record of that customer.
    • Automatically add a retainer to every estimate

      Hi all, I've been trying to find a way to automatically add a retainer at a set % to every estimate we create and send. So far I haven't been successful, does anyone know of a way to do this? Thanks,
    • Clear String field based on the value of other field

      Hello everyone, We would like to be able to clear a string field (delete whatever has been written and make it empty) when another field (picklist) is changed to a specific value. While I can empty other types of fields, I noticed that I can't do this
    • Custom Deal Name in Lead Conversion Mapping

      I know there are ways to change the name of a Deal after conversion using a custom function, so no need to repost that information. I would like to see the CRM Improved with Deal Name Customisation and I think the Lead Conversion Mapping page would be
    • Within the Basic KPI component in Analytics, it is impossible to set "next" day range as a filter

      Hi there, I am currently setting up a deal dashboard for the Sales team. While it is possible to filter deal records to show records that were created LAST X days only, it looks like a NEXT X days Closing date filter is not available. Would it be possible
    • Invoice status on write-off is "Paid" - how do I change this to "Written off"

      HI guys, I want to write off a couple of outstanding invoices, but when I do this, the status of the invoices shows as "Paid". Clearly this is not the case and I need to be able to see that they are written off in the customer's history. Is there a way
    • For each loop with available time slots

      I am very new to Deluge, and this question was unable to be answered by Zoho Creator tech support upon request. Task at hand: I have a Form with 4 fields: - Date Start - Date End - Dropdown: Time Start: contains time slots (12:00PM, 12:15PM, etc) - Dropdown:
    • Can we have Backorder Management ?

      Can we have Backorder Management ?
    • Converting Amazon Sales Order to Invoice

      Hi there, We need  advice on the Amazon integration with Zoho Inventory. Now, we want to convert all the Sales orders synced from Amazon to Invoices. We want also to include and record the Amazon fees associated with the sales (Amazon fees, FBA fees, Cost of Advertising etc.) However, Sales order only captures the sales proceeds (Gross Sales) in Zoho Inventory. Does anyone currently work with Amazon and can suggest how to correctly process the sales and Amazon payments through Zoho Inventory and
    • Zoho Inventory | Can't uncheck/turn off Advance Tracking

      Hi, I wanted to know if there's a way to turn off Advanced Tracking (such as Serial Number or Batch Tracking) for an item in Zoho Inventory. I’ve read that you might need to delete associated transactions and clear the opening stock to disable these features.
    • Landed Cost application to Vendor Bills from dropship Purchase Orders

      When trying to apply a Landed Cost to a Vendor Bill generated from a dropship Purchase Order, the Landed Cost pop-up window generates a message that "Landed Cost cannot be applied to Bills from dropship Purchase Orders" when trying to save the landed
    • 2 serial numbers for 1 item (Mac address and Serial number)

      There is a way to track 2 serial number type for 1 Item. Ex: Some electronic devices have a MAC address and a serial number. I need to track those 2 numbers
    • Zoho Projects Roadshow, USA - 2024

      Dear Users, We are happy to announce the Zoho Projects Roadshows 2024 in USA. This is an excellent opportunity to learn more about Zoho Projects and gain in-depth knowledge of the advanced features. Our team will also discuss industry specific solutions
    • [Zoho Writer Webinar] Tips on collaboration control in Writer

      Hi Zoho Writer users, We're excited to announce the Zoho Writer webinar for the month of October 2023: Tips on collaboration control in Writer. This webinar will help you understand the various features available in Writer to control collaboration. We'll
    • [Zoho Writer Webinar] Working with tables in Zoho Writer

      Hi Zoho Writer users, We're excited to announce the Zoho Writer webinar for the month of September 2023: Working with tables. This webinar will help you understand the various ways you can use tables to meet your specific needs. The webinar will take
    • [Zoho Writer Webinar] Customize Writer to suit your business process

      Hi Zoho Writer users, We're excited to announce the Zoho Writer webinar for the month of August 2023: Customize Writer to suit your business process. This webinar will cover the various ways to customize Writer to streamline business processes and improve
    • Is there a way to print the dashboard?

      I would like the capability of printing the dashboard - is that possible?
    • Workflows for Timesheet

      Good day, Any way to have timesheet as triggers? I looked into Zoho Flow and into Zoho Project automation but no where can I have timesheet as a trigger. Basically, I would like to trigger something upon timesheet approval. Right now, the only way to
    • Linkedin - Recruiter System Connect

      Hi there! Does anyone here know how to connect Zoho Recruit to Linkedin Recruiter via Recruiter System Connect?
    • [Webinar] A recap of Zoho Writer in 2024

      Hi Zoho Writer users, We're excited to announce Zoho Writer's webinar for December 2024: A recap of Zoho Writer in 2024. This webinar will provide a recap of the features, enhancements, and integrations released in 2024 to enhance your productivity. There
    • Learn how to automate IT asset and incident management with Zoho Writer

      Hi Zoho Writer users, We're excited to announce the Zoho Writer webinar for November 2024: Learn how to use Zoho Writer's fillable forms for IT asset and incident management. This webinar will focus on how Zoho Writer can help you automate your organization's
    • [Webinar] Learn how Zoho Writer can streamline your finance and admin operations

      Hi Zoho Writer users, We're excited to announce the Zoho Writer webinar for October 2024: Streamlining finance and admin operations with Zoho Writer. This webinar will focus on how Zoho Writer can help you generate payslips and automate claim processes.
    • [Zoho Writer Webinar] Learn how Zoho Writer can enhance the productivity of sales teams

      Hi Zoho Writer users, We're excited to announce the Zoho Writer webinar for August 2024: Streamlining sales operations with Zoho Writer. This webinar will focus on how Zoho Writer can help you create sales documents and automate sales routines. There
    • [Zoho Writer Webinar] Learn how to simplify your HR operations: Part 2

      Hi Zoho Writer users, We're excited to announce the Zoho Writer webinar for July 2024: Learn how Zoho Writer can simplify your HR operations: Part 2. This webinar will focus on how Zoho Writer can help HR teams streamline and automate their entire hiring
    • [Zoho Writer Webinar] Learn how to simplify your day-to-day HR operations

      Hi Zoho Writer users, We're excited to announce the Zoho Writer webinar for June 2024: Learn how Zoho Writer can simplify your day-to-day HR operations. This webinar will focus on how to automate your entire hiring process and generate various types of
    • [Zoho Writer Webinar] Use formulas and conditions in Zoho Writer's document automation

      Hi Zoho Writer users, We're excited to announce the Zoho Writer webinar for May 2024: Learn how to use formulas and conditions in Zoho Writer. This webinar will focus on how to use formulas and conditions when automating document generation in Zoho Writer.
    • [Zoho Writer Webinar] Personalize Zoho Writer to suit your needs

      Hi Zoho Writer users, We're excited to announce the Zoho Writer webinar for April 2024: Learn how to personalize Zoho Writer to suit your needs. This webinar will focus on how to easily customize Writer's features at the user and organization level for
    • How to refresh/update module fields in

      Hi, I created a Workspace for CRM years ago. Since that time I've updated the layouts in several modules in CRM but Zoho Analytics displays the previous state fields only. How to refresh the module fields to reflect the actual state in Analytics? BR
    • Data update/pull from a specific field or module

      Hi Team, Currently, if I need a data from a newly added field on a product like Zoho CRM, I need to refresh the whole module to get the new field. This is taking much time for the data to be visible. If the data pull/refresh can be granularized to fetch
    • Lookup field in User module cannot look up to custom modules!

      Hi there, Expense has been great so far but it's sad to see that a simple thing such as allowing a lookup to custom modules from the Users module is not yet implemented. Hope to see this in the next release. Do you have any plan for that?
    • Next Page