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.
    • 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
    • Recent Topics

    • update linked contacts when update happens in account

      Hi, I have a custom field called Licence in the Accounts module. When someone buys a licence, I’d like to update a custom field in the related Contacts. How can I achieve this? I noticed that workflows triggered on Accounts only allow me to update fields
    • Problem Management Module

      I am looking for a Problem Management module within Zoho Desk. I saw in some training videos that this is available, and some even provided an annual price for it. I want an official confirmation on whether this is indeed available. This is not a particularly
    • Deluge sendmail in Zoho Desk schedule can't send email from a verified email address

      I am trying to add a scheduled action with ZDesk using a Deluge function that sends a weekly email to specific ticket client contacts I've already verified the email address for use in ZDesk, but sendmail won't allow it in its "from:" clause. I've attached
    • Unable to explore desk.zoho.com

      Greetings, I have an account with zoho which already has a survey subscription. I would like to explore desk.zoho.com, but when I visit it while logged in (https://desk.zoho.com/agent?action=CreatePortal) I just get a blank page. I have tried different
    • Offline support for mobile app

      Accessing your files and folders from your mobile devices is now quicker and simpler, thanks to the power of offline support. Whether on an Android or iOS device, you can use the Offline function to save files and folders, so you can review them even
    • Zoho Desk KB article embedded on another site.

      We embed KB articles from Zoho Desk on another site (our application). When opening the article in a new tab, there is no issue, but if we choose lightbox, we are getting an error "To protect your security, help.ourdomain.com will not allow Firefox to
    • Transitioning to API Credits in Zoho Desk

      At Zoho Desk, we’re always looking for ways to help keep your business operations running smoothly. This includes empowering teams that rely on APIs for essential integrations, functions and extensions. We’ve reimagined how API usage is measured to give
    • List of packaged components and if they are upgradable

      Hello, In reference to the article Components and Packaging in Zoho Vertical Studio, can you provide an overview of what these are. Can you also please provide a list of of components that are considered Packaged and also whether they are Upgradable?
    • Does Attari Messaging app have Bot option and APIB

      Hi, Does Attari also have Bot and API as we use in WhatsApp??
    • how to use validation rules in subform

      Is it possible to use validation rules for subforms? I tried the following code: entityMap = crmAPIRequest.toMap().get("record"); sum = 0; direct_billing = entityMap.get("direct_billing_details"); response = Map(); for each i in direct_billing { if(i.get("type")
    • How to add application logo

      I'm creating an application which i do not want it to show my organization logo so i have changed the setting but i cannot find where to upload/select the logo i wish to use for my application. I have seen something online about using Deluge and writing
    • Introducing Keyboard Shortcuts for Zoho CRM

      Dear Customers, We're happy to introduce keyboard shortcuts for Zoho CRM features! Until now, you might have been navigating to modules manually using the mouse, and at times, it could be tedious, especially when you had to search for specific modules
    • Empowered Custom Views: Cross-Module Criteria Now Supported in Zoho CRM

      Hello everyone, We’re excited to introduce cross-module criteria support in custom views! Custom views provide personalized perspectives on your data and that you can save for future use. You can share these views with all users or specific individuals
    • Send Automated WhatsApp Messages and Leverage the Improved WhatsApp Templates

      Greetings, I hope all of you are doing well. We're excited to announce a major upgrade to Bigin's WhatsApp integration that brings more flexibility, interactivity, and automation to your customer messaging. WhatsApp message automation You can now use
    • Verifying Zoho Mail Functionality After Switching DNS from Cloudflare to Hosting Provider

      I initially configured my domain's (https://roblaxmod.com/) email with Zoho Mail while using Cloudflare to manage my DNS records (MX, SPF, etc.). All services were working correctly. Recently, I have removed my site from Cloudflare and switched my domain's
    • Zoho Analytics Regex Support

      When can we expect full regex support in Zoho Analytics SQL such as REGEXP_REPLACE? Sometimes I need to clean the data and using regex functions is the easiest way to achieve this.
    • Change of Blog Author

      Hi, I am creating the blog post on behalf of my colleague. When I publish the post, it is showing my name as author of the post which is not intended and needs to be changed to my colleague's name. How can I change the name of the author in the blogs?? Thanks, Ramanan
    • Show Attachments in the customer portal

      Hi, is it possible to show the Attachments list in the portal for the particular module? Bests.
    • Does Zoho Docs have a Line Number function ?

      Hi, when collaborating with coding tasks, I need an online real time share document that shows line numbers. Does Zoho's docs offer this feature ? If yes, how can I show them ? Regards, Frank
    • Please make it easier to Pause syncing

      right now it takes 3 clicks to get there. sounds silly, but can you make it just 2 clicks to get it done instead? thats how dropbox does it, 2 clicks to pause instead of 3.
    • Feature Request - Insert URL Links in Folders

      I would love to see the ability to create simple URL links with titles in WorkDrive. or perhaps a WorkDrive extension to allow it. Example use case: A team is working on a project and there is project folder in WordDrive. The team uses LucidChart to create
    • Organization Emails in Email History

      How can I make received Org Emails to show up here?
    • Converting Sales Order to Invoice via API; Problem with decimal places tax

      We are having problems converting a Sales Order to an Invoice via API Call. The cause of the issue is, that the Tax value in a Sales Order is sometimes calculated with up to 16 decimal places (e.g. 0.8730000000000001). The max decimal places allowed in
    • how to differentiate if whatsapp comes from certain landing page?

      I create a Zobot in SalesIQ to create a Whatsapp bot to capture the lead. I have 2 landing pages, one is SEO optimized and the other want is optimized for leads comes from Google Ads. I want to know from which landing page this lead came through WhatsApp
    • Upload API

      I'm trying to use the Upload API to upload some images and attach them to comments (https://desk.zoho.com/DeskAPIDocument#Uploads#Uploads_Uploadfile) - however I can only ever get a 401 or bad request back. I'm using an OAuth token with the Desk.tickets.ALL
    • How to sync from Zoho Projects into an existing Sprint in Zoho Sprints?

      Hi I have managed to integrate Zoho Projects with Zoho Sprints and I can see that the integration works as a project was created in Zoho Sprints. But, what I would like to do is to sync into an existing Zoho Sprints project. Is there a way to make that
    • How to record company set up fees?

      Hi all, We are starting out our company in Australia and would appreciate any help with setting up Books accounts. We paid an accountant to do company registration, TFN, company constitution, etc. I heard these all can be recorded as Incorporation Costs, which is an intangible asset account, and amortised over 5 years. Is this the correct way to do it under the current Australian tax regulations? How and when exactly should I record the initial entry and each year's amortasation in Books? Generally
    • How to create a drop down menu in Zoho Sheets

      I am trying to find out, how do I create a drop down option in Zoho sheet. I tried Data--> Data Validation --> Criteria --> Text  --> Contains. But that is not working, is there any other way to do it.  Thanks in Advance.
    • Show Payment terms in Estimates

      Hi,  we are trying to set up that estimates automatically relates payment terms for the payment terms we introduced on Edit contact (Field Payment terms).  How can it be done? Our aim is to avoid problems on payment terms introduced and do not need to introduce it manually on each client (for the moment we are introducing this information on Terms and Conditions.  Kind Regards, 
    • Rich-text fields in Zoho CRM

      Hello everyone, We're thrilled to announce an important enhancement that will significantly enhance the readability and formatting capabilities of your information: rich text options for multi-line fields. With this update, you can now enjoy a more versatile
    • How can I calculate the physical stock available for sale?

      Hey Zoho Team,  I've tried to calculate the physical stock on hand in various ways - but always receive a mismatch between what's displayed in Zoho Inventory & analytics.  Can you please let me know how the physical stock available for sale is calculated?
    • When dispatched to crew, assigning lead missing

      Hello, For the past two or three weeks, whenever an officer assigns Service Appointment to a team, the lead person is missing from the assigned service list. Therefore, we have to reschedule the SA and then the lead person becomes visible in the assigned
    • Create Lead Button in Zoho CRM Dashboard

      Right now to create Leads in the CRM our team is going into the Lead module, selecting the "Create Lead" button, then building out the lead. Is there anyway to add the "Create Lead" button or some sort of short cut to the Zoho CRM Dashboard to cut out
    • open word file in zoho writer desktop version

      "How can I open a Microsoft Word (.doc or .docx) file in Zoho Writer if I only have the file saved on my computer and Zoho Writer doesn't appear as an option when I try 'Open with'? Is there a way to directly open the .doc file in Zoho Writer?"
    • Generate leads from instagram

      hello i have question. If connect instagram using zoho social, it is possible to get lead from instagram? example if someone send me direct message or comment on my post and then they generate to lead
    • I want to transfer the project created in this account to another account

      Dear Sir I want to transfer the project created in one account to another account
    • 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
    • Weekly Tips : Customize your Compose for a smoother workflow

      You are someone who sends a lot of emails, but half the sections in the composer just get in your way — like fields you never use or sections that clutter the space. You find yourself always hunting for the same few formatting tools, and the layout just
    • Zoho Slowness - Workarounds

      Hi all, We've been having intermittent slowness and Zoho just asks for same stuff each time but never fix it. It usually just goes away on it's own after a couple weeks. Given that speed is a very important thing for companies to be able to keep up with
    • Custom Bulk Select Button

      Zoho CRM offers the ability to select multiple records and invoke a Custom Button This functionality is missing from Recruit Currently we can only add buttons in the detail page and list But we cannot select Multiple Records and invoke a function with
    • Next Page