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






                                                • Desk Community Learning Series


                                                • Digest


                                                • Functions


                                                • Meetups


                                                • Kbase


                                                • Resources


                                                • Glossary


                                                • Desk Marketplace


                                                • MVP Corner


                                                • Word of the Day


                                                • Ask the Experts



                                                          • 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

                                                                                                          • Issue with Save & Share Link – Works for Others but Not Creator

                                                                                                            I’ve enabled the "Save and Share" feature in Zoho Forms, and it works correctly for all users accessing the public link—except for me (the form creator). Issue Details: When I save and share the link, recipients see a “no permission” error. The form is
                                                                                                          • Save the pdf report from a registration form in a Folder

                                                                                                            Through Zoho Forms I created a registration form with quite a lot of rules to handle different variables (TEAM types, payment in installments, etc.), and the result is pretty good. The automatic PDF that is sent to the respondent upon submission is already
                                                                                                          • zoho forms integration to zoho work drive

                                                                                                            Scenario: A user fills out a Zoho Form, entering details such as email, mobile number, and other required information, and uploads supporting documents like PAN, Aadhaar, etc. Upon submission, the data is available in Zoho Forms Reports. Requirement:
                                                                                                          • Zoho Forms to Zoho CRM Integration failed - can I restart it?

                                                                                                            The integration of Zoho Form to Zoho CRM has failed. Is there a way for me to restart it for the impacted entry?
                                                                                                          • insert an equation, but in document, it shows an image not available.

                                                                                                            I'm new to Zoho writer and used Zoho writer in desktop app version . When I inserted an equation, I got an image not available sign. Any help is appreciated. Thanks, Charles
                                                                                                          • Zoho Desk Android app update - Swipe action customization

                                                                                                            Hello everyone! We have brought in support for the swipe action customization in latest version(v2.9.13) of the Zoho Desk Android app update, enabling you to configure left and right swipe gestures on tickets to carry out the actions swiftly without opening
                                                                                                          • Import KB template OR Export template for zoho desk?

                                                                                                            Greetings. Can you tell me if there is a way to get an EXPORT of my KB articles? OR is there a template you supply for importing KB articles into my zoho desk? I am looking for a method of understanding what fields can be imported, and what their possible
                                                                                                          • XML format to import knowledgebase into Zoho Desk

                                                                                                            Hi, We just started to use Zoho Desk and want to import our knowledgebase from our old support system (Freshdesk) to Zoho Desk. Can anyone give us information about the format of xml file to import? There is no explanation on the related page.
                                                                                                          • Zoho Desk integration with Power BI

                                                                                                            Hi, I want to be able to create a Power BI report which has live updates of ticket data from zoho desk, is this possile at all? Thanks Jack
                                                                                                          • Arranging Ticket Templates

                                                                                                            Is there any way to arrange our ticket templates? It doesn't look very organised when it's just arranged according to when they were created. We want the list to look more organised, by arranging/grouping them by topics, or even just by alphabetical
                                                                                                          • What they mean with "Portal"?

                                                                                                            I just downloaded this app to take my personal notes on digital art studio because it seemed to me the most comfortable app to do it, I use it very often, what do they mean by “no activity on your portal”? I have about 1 year of work here and I don't
                                                                                                          • Inactive User Auto Response

                                                                                                            We use Zoho One, and we have a couple employees that are no longer with us, but people are still attempting to email them. I'd like an autoresponder to let them no the person is no longer here, and how they can reach us going forward. I saw a similar
                                                                                                          • favorites no longer listed

                                                                                                            Hello, I can no longer navigate to my Favorites from the pulldown at the top of my grid view (see attached screenshot). I wasn't able to find it anywhere! Please help me display my Favorites. Thank you!
                                                                                                          • Notecards Disappeared

                                                                                                            Got a new phone. Downloaded and signed in Zoho Notebook. Not finding the Note cards. Just Empty Note books. Frustrating.
                                                                                                          • Table Errors

                                                                                                            Hello, I'm new to Zoho Notebook and using it on several Mac/Apple devices. My question is regarding tables: Why do they become broken, and how to fix the error without retyping all my data? (Please see the screenshot attached.)
                                                                                                          • Online Calculator with Zoho Forms?

                                                                                                            I'd like to build a custom calculator on my website. Zoho Forms seems to offer all the fields for basic calculations performed live without pressing any "Calculate" buttons. Unfortunately, there is still that "Submit" button at the bottom. There is nothing
                                                                                                          • Zoho Tables instead of Zoho Creator Spreadsheet reports <3

                                                                                                            That would make my day for sure. Zoho Creator is create, but miss data entering as AirTable/Spreadsheet can. Seeing Zoho putting effort in this makes me think maybe one day we could see a similar interface for Zoho Creator spreadsheet reports. B.
                                                                                                          • Zoho Sheet - Desktop App or Offline

                                                                                                            Since Zoho Docs is now available as a desktop app and offline, when is a realistic ETA for Sheet to have the same functionality?I am surprised this was not laucned at the same time as Docs.
                                                                                                          • Notebook Stack

                                                                                                            Hi Everyone I Hope you´re fine, I´m sorry if this idea was posted before (I made a search but I haven´t find anything related). So, Having the possibility of stacking notebooks would be an interesting way to order notebooks that correspond to the same
                                                                                                          • Writing on sketch cards is bugged when zoomed in

                                                                                                            When zoomed in, it writes a noticeable distance above or to the side of where you're actually trying to write. The further you're zoomed in, the more noticeable it is. Zooming is also entirely absent on the desktop version.
                                                                                                          • Swipe between notes on iPhone

                                                                                                            It'd be convenient if I could move from one note to the next in a notebook simply by swiping left to right.
                                                                                                          • Sales IQ chat is not working in signed android apk

                                                                                                            I have integrated ZOHO sales IQ support chat and i have followed each step and its working fine in my development build but when i create signed APK for it. Chat does not work in it and showing awaiting for detail. I previously asked the same query but
                                                                                                          • COQL order by COUNT not working

                                                                                                            Dear community, I am trying to get a list of deal amounts per planner working on it and sorted to get see who has the least amount of deals. For some reason, I am unable to use sort by in combination with a COUNT. My original code was: query = "select
                                                                                                          • I want to duplicate a report and name it something else

                                                                                                            Hi, I have created a report, and now want to reproduce it and call it something else. so that I will end up with TWO separate reports with different titles. Please tell me how do I copy / reproduce a report please
                                                                                                          • Zoho CRM: Sales Rep Professional Certification Program on Coursera

                                                                                                            We are happy to share that we have published the Zoho Sales Representative Professional Certificate in partnership with Coursera, a leading platform for online learning and career development that offers access to courses and degrees from leading universities
                                                                                                          • OS X Notebook quits immediately upon launch

                                                                                                            NoteBook for OS X (Sequoia, but also under Sonoma) always quits immediately upon launch (so I cannot use the "Attach user log" option). I've restarted my MacBook but the problem persists. If it helps, attached is a diagnostic report from Library>Log
                                                                                                          • Can External users upload files or images to WorkDrive?

                                                                                                            I want to know if it is possible for someone externally through a link and PW be able to upload files and images onto WorkDrive?
                                                                                                          • Multi-line fields character limits

                                                                                                            Is there a way to set the character limit higher on multi-line fields so that we are not losing information pasted into the field? When the text is entered or pasted, there is no error to say that the text is too large. After saving and going back to view most of the text is gone.   Also, when viewing the resume, the text is not wrapped in the multi line fields and can t be read without scrolling across the page.
                                                                                                          • Taz bot not working — What should I do to resolve this issue?

                                                                                                            I am experiencing issues with the Taz bot in Zoho Cliq—not receiving responses or it does not seem to work as expected. Could you please explain why the Taz bot might not be functioning and what steps I should take to resolve this issue? Thank you!
                                                                                                          • OneNote Migration

                                                                                                            I am trying to migrate two notebooks from OneNote. For five days now I have had no notification that migration has completed and the migration page show 50% complete - one notebook completed one not finished. It just stays like this. I am unable to cancel
                                                                                                          • Set various time slot reminders for task and event

                                                                                                            Hi I would like known if there is possibility to set various time reminders for a task or event like we have the possibility to do in google calendar or google task. For example I'am creating an event or task and I want to be alerted before 30min and
                                                                                                          • Zoho Calendar not functioning---cannot edit, add attendees, etc.

                                                                                                            Hello, My calendar is acting strange. I'm using Chrome as my browser and pop ups are not blocked (the calendar worked fine yesterday). When creating an event, I'm not able to "edit" the event and add attendees, etc. The link is non-responsive. I cannot
                                                                                                          • Unable to send message; Reason:554 5.1.8 Email Outgoing Blocked

                                                                                                            Hi, I sent few emails and got this: Unable to send message; Reason:554 5.1.8 Email Outgoing Blocked And now I have few days since I cant send any email. Is there something wrong I did? Also can someone fix this please
                                                                                                          • Spilt Axis for stacked column and line graph

                                                                                                            Each month around this time I prepare a business review deck. One of the biggest annoyances I have with Zoho, also happens to be something that most other platforms have provided for a long time now, and that is being able to create a chart with stacked
                                                                                                          • Pin a note on top

                                                                                                            Dear Zoho Notebook Team, Please highly consider adding ability to pin a note on top and arrange pinned notes. I have a lot of notes that I want to pin important ones on top and this feature is missing badly. Thank you.
                                                                                                          • Windows 11 app ver 2.2.8

                                                                                                            I have been trialing Zoho Notes syncing between my PC and iphone. No problems with iphone but the Windows 64 bit app ver 2.2.8 was very buggy and would lock up completely, needing a Control Alt Delete etc to close it down. It seemed to be connected to
                                                                                                          • Deluge Script: Onboarding → Access Form

                                                                                                            Hello everyone, Edit: Sorry, I think I put this topic in the wrong section. I’ve recently run into an issue that’s been giving me a bit of a headache for the past few weeks. Context: This is my first time using Deluge to create a script, but it’s not
                                                                                                          • Windows Device Authentication

                                                                                                            We have recently started using ManageEngine, and my boss saw a device management feature in the Zoho One directory. We thought it would either help give us more intergration into Zoho one through bringing ManageEngine services through Zoho one. Or, it
                                                                                                          • How can I change spell check language?

                                                                                                            I cannot find the way to change spell check language. My "display language" is English, and I want to have the same one for Spell Check, but it is Russian!!! How can I change it? In one of your explanations you mentioned that I have to choose it from
                                                                                                          • Mail is so slow - doesn't even work!

                                                                                                            Mail has been getting slower and slower - and today it's not even pulling up emails in either Inbox or Unread. This is beyond frustrating since email is a big part of business. Sent a request through the useless help portal - no response. Called the useless
                                                                                                          • Next Page