Kaizen 175 - Leverage Settings Widget for Zoho CRM Extensions

Kaizen 175 - Leverage Settings Widget for Zoho CRM Extensions



Howdy, innovators!

Welcome back to a fresh week of Kaizen.

This week, we will delve into configuring a Settings widget in Zoho CRM for the effective functioning of extensions. It centralizes around key configurations that will be carried out to various integrations in an extension. A user-friendly settings widget enhances the usability and flexibility of your extensions. 

Why use a Settings Widget?

A Settings Widget plays a crucial role in making extensions user-friendly and adaptable to specific business needs. Following are a few key advantages of using the settings widget:
  • Seamless Setup Post-Installation: Users can configure critical parameters right after installing the extension.
  • Dynamic Customization: Users can revisit and modify configurations at any time, ensuring that the extension adapts to changing needs without re-installation or development
  • Improved User Experience: Allows the end-users to control how the extension interacts with their workflows and data.
  • Enhanced Control: Provides an overview and centralized control, making maintenance, troubleshooting, and updates simpler and faster.

Business Scenario: Notification Settings for Lead Import Extension

Let’s take a real-world use case to understand the value of this settings widget.

Imagine an organization named Zylker, using Zoho CRM along with a lead import extension. This extension pulls in leads from multiple sources like web forms, social media, or third-party marketing tools.

Requirement

Whenever a new lead enters a Zoho CRM organization through this extension, the sales team wants to receive an instant notification on a specific Zoho Cliq channel for that organization. This ensures they never miss a lead. 

Solution

By adding a Settings Widget to the extension, users can:

> Select a Preferred Zoho Cliq Channel: From the settings page, users can choose the channel where notifications should be sent.

> Modify the Channel Anytime: Based on team restructuring or communication preferences, users can revisit the settings and update the channel as needed.

With this setup, the settings widget becomes the control center, ensuring the efficient functioning of both the extension and the sales process. 

Building a Settings Extension Widget

Let us create a sample settings widget for the above business scenario. 

Create a Private Extension Widget

       1. Log into Zoho CRM, navigate to Setup > Marketplace > Extension Builder, and create a new extension by selecting Zoho CRM as the service.  

            

      2. The private extension that you have created will be listed in the Extensions page. Choose your extension and click the edit icon. 

            You will then be redirected to the Zoho Developer Console.
 
Dependency Configuration

Now, let us configure a couple of dependencies required for this use case in the developer console.  

Connectors 

To notify a Zoho Cliq channel, Connectors authorize the end user's Zoho Cliq account with the extension and grant access to the necessary data. Follow these steps to create a connector with the required APIs for the widget.

      3. In the console, navigate to Utilities > Connectors on the left-side menu.

      4. Click Create Connector and provide the required details using the guidance available on the Server-based Application help page.

           

      5. Use the generated Redirect URL to register your application in Zoho's API Console. After registration, enter the Client ID and Client Secret in the developer console.  

           

      6. Create Connector APIs for the following: 
  •  GET List of all Channels to fetch all the available channels from your Zoho Cliq Account.  



    The Authorization header is automatically added to all the Connector APIs. 
  • POST Message in Channel to notify the incoming leads in the channel. 



    You can include dynamic place holders in the URL, header, or request body using this format ${place_holder}.
      7. Once the APIs are configured, publish and associate the connector with the extension. 

            
          
           Refer to the Connectors help document to learn more. 

Variable 

Variables are required to store the admin's preferred channel details and retrieve them when a lead enters Zoho CRM through the extension. Upon installing the extension, this variable is automatically created in your Zoho CRM org. 

      8. Go to Build > Custom Properties and create a variable. 

         

Set the variable's permission to Hidden to prevent the CRM users from accessing/modifying the variable data from the Zoho CRM Variables page. This ensures that variables can only be configured through the extension.

For more information, refer to the Custom Variables help document

Idea
Tip

In your Zoho CRM, go to Setup > Security Control > Profiles and restrict permissions for your extension to prevent unauthorized access to the settings page.

Building a Connected App 

      9. In the console, go to Utilities > Connected Apps on the left-side menu.

      10. Follow the steps provided in this kaizen to create a new Zoho CRM widget for this use case. 

Code Logic for the Settings Panel
  • Create a drop-down field called Select Cliq Channel to the settings panel. This dropdown should dynamically list the channels from your Zoho Cliq account by invoking the GET Cliq Channels API. Follow the given Invoke Connector method to execute Connector APIs.           
 // Initialize Zoho Embed SDK
        ZOHO.embeddedApp.on("PageLoad", function () {
            fetchCliqChannels();
        });

        ZOHO.embeddedApp.init();

        // Fetch Cliq channels
        async function fetchCliqChannels() {
            const channelDropdown = document.getElementById("cliqChannel");
            try {
                console.log("Fetching channels from Zoho Cliq...");
                const req_data = {
                    "parameters": {}
                };
                const response = await ZOHO.CRM.CONNECTOR.invokeAPI("leadgeneration.zohocliq.listofallchannels", req_data);
                console.log("Response from Zoho Cliq:", response);
                const parsedResponse = JSON.parse(response.response);
                const channels = parsedResponse.channels;
                if (channels && Array.isArray(channels)) {
                    channelDropdown.innerHTML = channels.map(channel => `<option value="${channel.unique_name}">${channel.name}</option>`).join('');
                } else {
                    throw new Error("Invalid response structure");
                }
            } catch (error) {
                console.error("Error fetching channels:", error);
                if (error.code === '403') {
                    console.error("Authorization Exception: Please check your API permissions and authentication.");
                }
                channelDropdown.innerHTML = '<option value="">Failed to load channels</option>';
            }
        }

  • Add a Save Configuration button that stores the selected channel name and channel ID in the variable created earlier. To save the selected data into the variable, use the invokeAPI() function, with the namespace as crm.set
 // Save configuration
        async function saveConfiguration(event) {
            event.preventDefault();
            const channelDropdown = document.getElementById("cliqChannel");
            const selectedChannelUniqueName = channelDropdown.value;
            const selectedChannelName = channelDropdown.options[channelDropdown.selectedIndex].text;

            if (!selectedChannelUniqueName) {
                alert("Please select a channel.");
                return;
            }

            const settings = {
                unique_name: selectedChannelUniqueName,
                name: selectedChannelName
            };

            const data = {
                "apiname": "leadgeneration__Cliq_Channel",
                "value": JSON.stringify(settings)
            };

            try {
                const response = await ZOHO.CRM.CONNECTOR.invokeAPI("crm.set", data);
                console.log("Updated settings:", response);
                document.getElementById("setupStatus").innerText = "Configuration saved successfully!";
            } catch (error) {
                console.error("Error saving configuration:", error);
                document.getElementById("setupStatus").innerText = "Failed to save configuration.";
            }
        }

  • When a lead enters Zoho CRM through the extension, it should trigger a function that:Retrieves the saved channel details:  
                  > Retrieves the saved channel details: Uses the Get Organization Variable JS SDK to call the Zoho CRM GET Variable API to fetch the saved channel details.
                        
                     

                  > Notifies the channel: Sends a message to the retrieved channel using the Post Message API

Info
Info

-> A complete working code sample for the use case is attached at the end of this post for your reference.  

-> The test function for triggering notifications is also included in the attachment. You can use the same snippet in your extension to initiate the notification process.

-> Ensure to replace the unique names of your Connector APIs and Variable.

      11. Fill in the details of the application as shown in this image and upload the widget ZIP file packed using the Zoho CLI command. 

             

      12. Click Save.  

Configure the Settings Widget

      13. Navigate to Build > Settings Widget in the left menu.  

      14. Provide a Name and the Resource Path of your widget.   

      15. Click Save.

             
Info
The Settings Widget for Extension is available upon request. Contact support@zohocrmplatform.com to enable it for your account. 

Packaging, Publishing and Deploying 

      16. Go to Package > Publish on the left-side menu and publish the extension.   

      17. The review process for listing an extension in the Marketplace will take from three weeks to one month

            For the demo, we will proceed with deploying the extension using the private plugin deployment link.

            

      18. Now, replace the URL of your Zoho CRM page with the deployment link from the Developer Console and approve the extension installation.  

Try it Out! 

Once installed: 

A pop-up will appear, prompting you to authorize Zoho Cliq for the required configurations. 

If you do not already have a Zoho Cliq account, you can sign up directly from the pop-up and proceed with the authorization.


> After authorization, you will be redirected to the Settings widget page, where you can select and save your preferred Cliq channel.

> If you need to update the settings later, you can find them on the Installed Extensions page under the respective extension.

 

Notes
Note

The demo videos above use a testing function to notify the channel. You can deploy it anywhere in your extension to trigger a notification whenever a lead enters a Zoho CRM organization through the extension.

Find the function in the attachments at the end of this post.

Similar Scenarios

  • Sales Territory Management: An extension that auto-assigns incoming leads to sales reps can use a settings widget to allow managers to define territories and sales rep mappings dynamically.
  • Custom Field Mapping: For extensions that sync data between Zoho CRM and external systems, a settings widget can let users map CRM fields to external system fields.
  • Automated Email Preferences: In email automation extensions, the settings widget can allow users to specify email templates, recipients, or trigger conditions for follow-ups and campaigns.
Adding a Settings Widget to your Zoho CRM Extensions not only enhances user experience but also boosts the flexibility and efficiency of your extension. Whether it is notifying sales teams or customizing field mappings, a well-designed settings page is a game-changer for your extensions. 

Explore the Widget section in our Kaizen collection to try out various widget types and discover their unique use cases. 

If you have any queries or a topic to be discussed reach out to us at support@zohocrm.com or drop your comment below. 

Until next time, keep innovating!

Cheers! 

----------------------------------------------------------------------------------------------------------------------------------------

Related Reading

  1. Zoho CRM Widget - An Overview, Installation and Creation, Mobile Compatibility, Telephony Widget Extension, and other Kaizens.
  2. Widget SDKs - An Overview, Invoke Connector and Get Organization Variable.
  3. Zoho Developer Console - An Overview, Creating Extensions, Building Connected Apps, and A Quick Start Guide.
  4. Zoho Extensions - Custom Variables and Connectors
  5. Zoho Cliq - GET List of Channels and POST Message in Channel.
  6. Zoho Marketplace - An Overview
----------------------------------------------------------------------------------------------------------------------------------------

Idea
Previous Kaizen: Kaizen #174 - Client Script Commands | Kaizen Collection: Directory
Info
More enhancements in the COQL API are now live in Zoho CRM API Version 7. Check out the V7 Changelog for detailed information on these updates.

    Access your files securely from anywhere







                            Zoho Developer Community





                                                  Use cases

                                                  Make the most of Zoho Desk with the use cases.

                                                   
                                                    

                                                  eBooks

                                                  Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho Desk.

                                                   
                                                    

                                                  Videos

                                                  Watch comprehensive videos on features and other important topics that will help you master Zoho Desk.

                                                   
                                                    

                                                  Webinar

                                                  Sign up for our webinars and learn the Zoho Desk basics, from customization to automation and more

                                                   
                                                    
                                                  • Desk Community Learning Series


                                                  • Meetups


                                                  • Ask the Experts


                                                  • Kbase


                                                  • Resources


                                                  • Glossary


                                                  • Desk Marketplace


                                                  • MVP Corner




                                                            • Sticky Posts

                                                            • Kaizen #197: Frequently Asked Questions on GraphQL APIs

                                                              🎊 Nearing 200th Kaizen Post – We want to hear from you! Do you have any questions, suggestions, or topics you would like us to cover in future posts? Your insights and suggestions help us shape future content and make this series better for everyone.
                                                            • Kaizen #198: Using Client Script for Custom Validation in Blueprint

                                                              Nearing 200th Kaizen Post – 1 More to the Big Two-Oh-Oh! Do you have any questions, suggestions, or topics you would like us to cover in future posts? Your insights and suggestions help us shape future content and make this series better for everyone.
                                                            • Celebrating 200 posts of Kaizen! Share your ideas for the milestone post

                                                              Hello Developers, We launched the Kaizen series in 2019 to share helpful content to support your Zoho CRM development journey. Staying true to its spirit—Kaizen Series: Continuous Improvement for Developer Experience—we've shared everything from FAQs
                                                            • Kaizen #193: Creating different fields in Zoho CRM through API

                                                              🎊 Nearing 200th Kaizen Post – We want to hear from you! Do you have any questions, suggestions, or topics you would like us to cover in future posts? Your insights and suggestions help us shape future content and make this series better for everyone.
                                                            • Client Script | Update - Introducing Commands in Client Script!

                                                              Have you ever wished you could trigger Client Script from contexts other than just the supported pages and events? Have you ever wanted to leverage the advantage of Client Script at your finger tip? Discover the power of Client Script - Commands! Commands


                                                            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 to create a Service Agreement with Quarterly Estimate

                                                                                                              Hello, I'm not sure if this has been asked before so please don't get mad at me for asking. We're an NDIS provider in Australia so we need to draft a Service Agreement for our client. With the recent changes in the NDIS we're now required to also include
                                                                                                            • Change Currency symbol

                                                                                                              I would like to change the way our currency displays when printed on quotes, invoices and purchase orders. Currently, we have Australian Dollars AUD as our Home Currency. The only two symbol choices available for this currency are "AU $" or "AUD". I would
                                                                                                            • Python - code studio

                                                                                                              Hi, I see the code studio is "coming soon". We have some files that will require some more complex transformation, is this feature far off? It appears to have been released in Zoho Analytics already
                                                                                                            • Zoho Social - Post Footer Templates

                                                                                                              As a content creator I often want to include some information at the end of most posts. It would be great if there was an option to add pre-written footers, similar to the Hashtag Groups at the end of posts. For example, if there is an offer I'm running
                                                                                                            • Allow to pick color for project groups in Zoho Projects

                                                                                                              Hi Zoho Team, It would be really helpful if users could assign colors to project groups. This would make it easier to visually distinguish groups, improve navigation, and give a clearer overview when managing multiple projects. Thanks for considering
                                                                                                            • Zoho Books - Quotes to Sales Order Automation

                                                                                                              Hi Books team, In the Quote settings there is an option to convert a Quote to an Invoice upon acceptance, but there is not feature to convert a Quote to a Sales Order (see screenshot below) For users selling products through Zoho Inventory, the workflow
                                                                                                            • Can't find imported leads

                                                                                                              Hi There I have imported leads into the CRM via a .xls document, and the import is showing up as having been successful, however - when I try and locate the leads in the CRM system, I cannot find them.  1. There are no filters applied  2. They are not
                                                                                                            • Custom Button Disappearing in mobile view | Zoho CRM Canvas

                                                                                                              I'm working in Zoho CRM Canvas to create a custom view for our sales team. One of the features I'm adding is a custom button that opens the leads address in another tab. I've had no issue with this in the desktop view, but in the mobile view the button
                                                                                                            • The connected workflow is a great idea just needs Projects Integrations

                                                                                                              I just discovered the connected workflows in CRM and its a Great Idea i wish it was integrated with Zoho Projects I will explain our use case I am already trying to do something like connected workflow with zoho flow Our requirement was to Create a Task
                                                                                                            • Zoho Projects MCP Feedback

                                                                                                              I've started using the MCP connector with Zoho Projects, and the features that exist really do work quite well - I feel this is going to be a major update to the Zoho Ecosystem. In projects a major missing feature is the ability to manage, (especially
                                                                                                            • Function #10: Update item prices automatically based on the last transaction created

                                                                                                              In businesses, item prices are not always fixed and can fluctuate due to various factors. If you find yourself manually adjusting the item rates every time they change, we have the ideal time-saving solution for you. In today's post, we bring you custom
                                                                                                            • email template

                                                                                                              How do I create and save an email template
                                                                                                            • Enhancements in Portal User Group creation flow

                                                                                                              Hello everyone, Before introducing new Portal features, here are some changes to the UI of Portals page to improve the user experience. Some tabs and options have been repositioned so that users can better access the functionalities of the feature. From
                                                                                                            • Archiving Contacts

                                                                                                              How do I archive a list of contacts, or individual contacts?
                                                                                                            • How do I filter contacts by account parameters?

                                                                                                              Need to filter a contact view according to account parameter, eg account type. Without this filter users are overwhelmed with irrelevant contacts. Workaround is to create a custom 'Contact Type' field but this unbearable duplicity as the information already
                                                                                                            • Can I add Conditional merge tags on my Templates?

                                                                                                              Hi I was wondering if I can use Conditional Mail Merge tags inside my Email templates/Quotes etc within the CRM? In spanish and in our business we use gender and academic degree salutations , ie: Dr., Dra., Sr., Srta., so the beginning of an email / letter
                                                                                                            • email moderation issue when email is sent in the name of a mail group

                                                                                                              Symptom: an email that is sent by a mail group moderator in the name of a moderated mail group is held back for approval. Reproduction: Create a moderated mail group with members and moderators. Allow that mails can be sent in the name of the group (extended settings). Send an email to the group as a group moderator, but in the name of the group. This mail is held back for moderation which is unexpected. Expected: A mail sent by group moderator to a moderated group are not held back for moderation
                                                                                                            • blank page after login

                                                                                                              blank page after logging into my email account Thanks you
                                                                                                            • Introducing the revamped What's New page

                                                                                                              Hello everyone! We're happy to announce that Zoho Campaigns' What's New page has undergone a complete revamp. We've bid the old page adieu after a long time and have introduced a new, sleeker-looking page. Without further ado, let's dive into the main
                                                                                                            • Always display images from this sender – Is this feature available?

                                                                                                              In Zoho mail, I had my "Load external images" setting set to "Ask me", and that's fine. That's the setting I prefer. What's not fine though is I always need to tick "Display now" for each email I get, regardless if I've done that multiple times from several
                                                                                                            • Function #9: Copy attachments of Sales Order to Purchase Order on conversion

                                                                                                              This week, we have written a custom function that automatically copies the attachments uploaded for a sales order to the corresponding purchase order after you convert it. Here's how to configure it in your Zoho Books organization. Custom Function: Hit
                                                                                                            • Free webinar: Security that works: Building resilience for the AI-powered workforce

                                                                                                              Hello there, Did you know that more than 51% of organizations worldwide have experienced one or more security breaches, each costing over $1 million in losses or incident response? In today’s threat landscape, simply playing defense is no longer enough.
                                                                                                            • "Subject" or "Narration"in Customer Statement

                                                                                                              Dear Sir, While creating invoice, we are giving in "Subject" the purpose of invoice. For Example - "GST for the month of Aug 23", IT return FY 22-23", "Consultancy", Internal Audit for May 23". But this subject is not coming in Customer Statement. Only
                                                                                                            • Apply Vendor Credit Automatically

                                                                                                              Hello!!! Is there a way where in we can apply vendor credits automatically on the FIRST OUTSTANDING BILL of the vendor?? We have lots of VENDOR CREDITS ISSUES mostly!!! Applying it manually is a pain for us. Would be great if we have a way to apply the
                                                                                                            • Zoho Notebook Sync problem

                                                                                                              I'm facing a problem with syncing of notebook on android app. It's not syncing. Sometimes it syncs after a day or two.  I created some notes on web notebook but it's not syncing on mobile app. Please help!!!!
                                                                                                            • Retainer Invoice.

                                                                                                              Why ZOHO not have facilities to deduct partially advance payment from an invoice.
                                                                                                            • Apply Vendor Credits Automatically

                                                                                                              We are bulk importing Vendor credits in Zoho Books!!! Is there a way to apply vendor credits automatically to the first UNPAID bill of the Vendor?
                                                                                                            • Cant Save Gauge on Creator Page

                                                                                                              How to Save Gauge on Creator Page see movie https://vimeo.com/1116410860?share=copy#t=0
                                                                                                            • Apply Advance option not shown in report

                                                                                                              We are facing an issue in Zoho Expenses. While approving an Expense Report, the "Apply Advance" option is not appearing under the three dots (More Options). Details: Module: Expense Reports Issue: "Apply Advance" option not visible Status of Report: Awaiting
                                                                                                            • Auto Capitalize First Letter of Words

                                                                                                              Hi I am completely new to ZOHO and am trying to build a database. How can i make it when a address is entered into a form field like this: main st it automatically changes is to show: Main St Thank You
                                                                                                            • Follow-up emails via Workflow Automation not staying in the same thread

                                                                                                              Dear Zoho Support Team, I am currently using Workflow Automation in Zoho Campaigns to send follow-up emails. In my test case, I noticed the following behavior: All emails in the automation have the same subject line. If the follow-up email is sent within
                                                                                                            • Client Script refuses to set an initial value in Subform field

                                                                                                              I tried a very simple, 1 line client script to set a default value in a custom subform field when the "Add Row" button is clicked and the user is entering data. It does not work - can someone tell me why? ZDK documentation suggests this should be doable.
                                                                                                            • Formatting of Balance Sheet and Profit & Loss Reports

                                                                                                              The default format of the Balance Sheet and P&L Reports are based on the Account Types and then the individual accounts within the Chart of Accounts. These are then ordered alphabetically under these sub-headings and one is unable to re-order these or
                                                                                                            • Emails Are Not Being Delivered to My Inbox

                                                                                                              Hello Zoho Support Team, I am experiencing an issue with my Zoho Mail account. The most important problem is that emails are not being delivered to my inbox. Details: My Zoho Mail address: info@coreforcelife.com What happens: I am not receiving any incoming
                                                                                                            • Help Center IFrame Issue

                                                                                                              I have had a working Help Center on my website using an iframe for a while. But now for some reason the sign in page gets a refused to connect error. Can someone please help. If I go to the url manually it works correclty
                                                                                                            • Staff rules

                                                                                                              Hi! Do you people know what are the default staff rules when a new booking is created? We have two staff members in my team (me as the admin, and my employee). As we share the same services, I'm wondering how Zoho will pick the staff for new apointments.
                                                                                                            • Comment Templates

                                                                                                              Is it possible to add a template option for comments? We have some agents in the process who's responses require a pre-formatted layout. It would be incredibly handy to have a template for them where they can insert the template and then add their responses
                                                                                                            • [ZohoDesk] Improve Status View with a new editeble kanban view

                                                                                                              A kanban view with more information about the ticket and the contact who created the ticket would be valueble. I would like to edit the fields with the ones i like to see at one glance. Like in CRM where you can edit the canvas view, i would like to edit
                                                                                                            • Adding Markdown text using Zoho Desk API into the Knowledge Base

                                                                                                              Hi Zoho Community members, We currently maintain the documentation of out company in its website. This documentation is written in markdown text format and we would like to add it in Zoho Knowledge Base. Do you know if there is REST API functionality
                                                                                                            • An Exclusive Session for Zoho Desk Users: AI in Zoho Desk

                                                                                                              A Zoho Community Learning Initiative Hello everyone! This is an announcement for Zoho Desk users and anyone exploring Zoho Desk. With every nook and corner buzzing, "AI's here, AI's there," it's the right time for us to take a closer look at how the AI
                                                                                                            • Next Page