Hello code enthusiasts!
Welcome to a fresh week of Kaizen! In this post, you will learn how to build a custom button widget to boost mass communication of your business using SMS notifications and pre-recorded calls within Zoho CRM.
Business Scenario
Timely communication with customers is crucial in any business to send important updates, reminders, and promotional messages.
Imagine you are managing a sales team, and your business regularly sends promotional offers to hundreds of customers. Typically, you would need to export customer details to a separate broadcasting system, create the messages, and send them manually.
Instead of manually making individual calls and messages about the offer, you can now leverage this custom button widget placed in the mass menu within Zoho CRM to send personalized SMS notifications or even recorded voice calls to your customers.
Creating a Custom Button Widget
Let us look at the steps to create a widget for the above-mentioned functionality.
1. Log in to your Zoho CRM, go to Setup>Customization>Modules and Fields and select your desired Module. For this demo, we will choose the Leads module.
2. In the Leads module, switch to the Buttons tab and click Create New Button.
3. Follow the steps outlined in
this help page and create a new button in the
Mass Action Menu with its action defined by a
widget.
4. A pop-up appears for you to choose either from the available local widgets or create a new widget.
5. Follow the steps provided in this
kaizen to create a new widget for this use case.
Code Logic for Mass Communication
6. Here is the code logic to send broadcast SMS notifications and pre-recorded calls to the selected leads.
- Build the widget HTML page with the following elements shown in the GIF for obtaining user input like phone fields, sms/voice call preference, and the message content.
For voice calls, the entered text message will be converted to speech using Twilio's services.
- The current module (Leads) and the selected record IDs are passed to the widget through the on PageLoad callback function.
- For the current module, we used the Zoho CRM Meta JS SDK to get fields that have phone data type in it. These fields are listed in the Phone Fields dropdown, allowing the user to select the desired phone numbers that Twilio should use to send SMS or make calls.
- The COQL API SDK helps fetch values from the selected Phone fields in the dropdown for the selected record IDs.
- Depending on the selected action SMS or Voice Call tab, the corresponding Twilio Message or Call API will be triggered for communication.
For this demo, we used the Twilio APIs for sending SMS and making pre-recorded calls, but you can use any cloud communication platform of your choice.
const context = { }; async function getPhoneNumbers() { const phoneFieldsDropdown = document.getElementById('phone-fields-dropdown'); const selectedValues = Array.from(phoneFieldsDropdown.options).filter(option => option.selected).map(option => option.value); if (!selectedValues.length) { return showAlert('error', 'Please select atleast one phone field'); } const ids = context.recordIds.map(x => `'${x}'`).join(', '); const select_query = `SELECT ${selectedValues.join(', ')} FROM ${context.module} WHERE id in (${ids})`; const {data} = await ZOHO.CRM.API.coql({select_query}); const phoneNumbers = []; data.forEach(x => { Object.keys(x).forEach(key => { if (key !== 'id' && x[key]) { phoneNumbers.push(x[key]); } }); }); return phoneNumbers; } ZOHO.embeddedApp.on("PageLoad", function (data) { // Get the current module name and selected record ids const {Entity, EntityId} = data; context.module = Entity; context.recordIds = EntityId; // Get the phone fields for current module ZOHO.CRM.META.getFields({Entity}).then( function (response) { const {fields} = response; const phoneFields = fields.filter(x => x.data_type === 'phone').map(x => ({value: x.api_name, label: x.display_label })); new Choices('#phone-fields-dropdown', { removeItemButton: true, choices: phoneFields, placeholder: true, placeholderValue: 'Select Phone Fields to be used' }); ZOHO.CRM.UI.Resize({height:"400", width:"700"}); }); // Initialize twilio credentials twilio.init("$YOUR_ACCOUNT_SID", "$YOUR_AUTH_TOKEN", "+YOUR_TWILIO_NUMBER"); }) ZOHO.embeddedApp.init(); |
Try It Out!
To try this out, a fully functional code sample is attached to this post. All you have to do is replace your Twilio credentials on line 185 and everything else is already setup for you.
- Select multiple records in the Leads module.
- Click Broadcast (custom widget button) to open a streamlined interface (we have used Twilio for this demo).
- Select the Phone Fields to which you need to send the message / pre-recorded call.
- Choose SMS or Voice Call in the tab based on your requirement.
- Enter your message and hit Send.
Ta-daa! The messages go out to all the selected records immediately. You can also use any other third-party cloud communication platform of your choice instead of Twilio.
Caution!
Since the Twilio Message and Call APIs are triggered from the UI, the Twilio authentication will be accessible to anyone with access to the Zoho CRM organization where this widget is deployed.
Recent Topics
Replace Lookup fields ID value with their actual name and adding inormation from subforms
Hi everyone, I wanted to see if someone smarter than me has managed to find any solutions to two problems we have. I will explain both below. To start we are syncing data from Zoho CRM to Zoho Analytics and I will use the Sales Order module when giving
Can a Zoho Sites page be embedded into another website (outside Zoho)
Hi All, We have a request from a client - they'd like to take one of our information pages created in Zoho Sites and embed it into their own website? I was told through an email with Zoho that this was possible >>Thank you for your patience regarding
Bug in allowing the user to buy out of stock items
Hi i want to allow the user to buy out of stock items, according to the commerce documentation if i disable Restrict "Out of stock" purchases it will, but it doesnt work, so i want to know if it had any relation with zoho inventory, and if theres any
Transition Criteria Appearing on Blueprint Transitions
On Monday, Sept. 8th, the Transition criteria started appearing on our Blueprints when users hover over a Transition button. See image. We contacted Zoho support because it's confusing our users (there's really no reason for them to see it), but we haven't
Zoho CRM Sales Targets for Individual Salespeople
Our organistion has salespeople that are allocated to different regions and have different annual sales targets as a result. I am building an CRM analytics dashboard for the sales team, which will display a target meter for the logged in salesperson.
All new Address Field in Zoho CRM: maintain structured and accurate address inputs
The address field will be available exclusively for IN DC users. We'll keep you updated on the DC-specific rollout soon. It's currently available for all new sign-ups and for existing Zoho CRM orgs which are in the Professional edition. Managing addresses
Transfer all Related Data to new Account Owner
Currently when I change the account Owner I only see the option to change only the open deals But I want the new account owner to take over all the related modules and all the deal stages Is it not possible right now? Am I missing something? Do I really
Can i connect 2 instagram accounts to 1 brand?
Can i connect 2 instagram accounts to 1 brand? Or Do i need to create 2 brands for that? also under what subscription package will this apply?
How to Calculate MTTR (Mean Time to Resolve)
We want to calculate MTTR (Mean Time to Resolve) in our Zoho Analytics report under Tickets. Currently, we are using the following fields: Ticket ID Ticket Created Time Ticket Closed Time Ticket On Hold Time We are planning to calculate MTTR (in days)
How to export project tasks, including the comments
Hi, how can I export the project tasks, whereby I can also see the comments associated to a specific task? The use-case is that often we use comments to discuss or update a task related ideas. I would like to export the tasks, where we can also see the
How to Install Zoho Workdrive Desktop Sync for Ubuntu?
Hi. I am newbie to Linux / Ubuntu. I downloaded a tar.gz file from Workdrive for installing the Workdrive Desktop Sync tool. Can someone give me step by step guide on how to install this on Ubuntu? I am using Ubuntu 19.04. Regards Senthil
Introducing Version-3 APIs - Explore New APIs & Enhancements
Happy to announce the release of Version 3 (V3) APIs with an easy to use interface, new APIs, and more examples to help you understand and access the APIs better. V3 APIs can be accessed through our new link, where you can explore our complete documentation,
Does Zoho Sheet Supports https://n8n.io ?
Does Zoho Sheet Supports https://n8n.io ? If not, can we take this as an idea and deploy in future please? Thanks
Bigin Android app update: User management
Hello everyone! In the most recent Bigin Android app update, we have brought in support for the 'Users and Controls' section. You can now manage the users in your organization within the mobile app. There are three tabs in the 'Users and Controls' section:
Share records with your customers and let them track their statuses in real time.
Greetings, I hope everyone is doing well! We're excited to introduce the external sharing feature for pipeline records. This new enhancement enables you to share pipeline records with your customers via a shareable link and thereby track the status of
Live webinar: Discover Zoho Show: A complete walkthrough
Hello everyone, We’re excited to invite you to our upcoming live webinar, Discover Zoho Show: A Complete Walkthrough. Whether you’re just getting started with Show or eager to explore advanced capabilities, this session will show you useful tips and features
Deal Stage component/widget/whatever it is... event
Deal Stages I am trying to access the event and value of this component. I can do it by changing the Stage field but users can also change a Deal Stage via this component and I need to be able to capture both values. Clicking on 'Verbal' for instance,
Create advanced slideshows with hybrid reports using Zoho Projects Plus
Are your quarterly meetings coming up? It’s time to pull up metrics, generate reports, and juggle between slides yet again. While this may be easier for smaller projects, large organizations that run multiple projects may experience the pressure when
Add an option to disable ZIA suggestions
Currently, ZIA in Zoho Inventory automatically provides suggestions, such as sending order confirmation emails. However, there is no way to disable this feature. In our case, orders are automatically created by customers, and we’ve built a custom workflow
Email Integration - Zoho CRM - OAuth and IMAP
Hello, We are attempting to integrate our Microsoft 365 email with Zoho CRM. We are using the documentation at Email Configuration for IMAP and POP3 (zoho.com) We use Microsoft 365 and per their recommendations (and requirements) for secure email we have
Formula field with IF statement based on picklist field and string output to copy/paste in multi-line field via function
Hello there, I am working on a formula field based on a 3-item picklist field (i.e. *empty value*, 'Progress payment', 'Letter of credit'). Depending on the picked item, the formula field shall give a specific multi-line string (say 'XXX' in case of 'Progress
CRM x WorkDrive: File storage for new CRM signups is now powered by WorkDrive
Availability Editions: All DCs: All Release plan: Released for new signups in all DCs. It will be enabled for existing users in a phased manner in the upcoming months. Help documentation: Documents in Zoho CRM Manage folders in Documents tab Manage files
Zoho CRMの流入元について
Zoho CRMとZoho formsを連携し、 formsで作成したフォームをサイトに埋め込み運用中です。 UTMパラメータの取得をformsを行い、Zoho CRMの見込み客タブにカスタム項目で反映される状況になっています。 広告に関してはUTMパラメータで取得できているため問題ないのですが、オーガニック流入でフォーム送信の場合も計測したいです。メールやGoogle、Yahoo、directなどの流入元のチャネルが反映されるようにしたいのですが、どのように設定したら良いでしょうか。 また、
Error While Sign in on Zoho Work Drive
Dear Team, I hope this email finds you well. I have recently created a Zoho account and started using it. But while I am trying to log in to Zoho work drive it won't log me in its crashing every time I try it. I have tried it on android app, phone browser
Choosing a portal option and the "Unified customer portal"?
I am trialling Zoho to replace various existing systems, one of which is a customer portal. Our portal allows clients to add and edit bookings, complete forms, manage their subscriptions and edit some CRM info. I am trying to understand how I might best
Elevate your CX delivery using CommandCenter 2.0: Simplified builder; seamless orchestration
Most businesses want to create memorable customer experiences—but they often find it hard to keep them smooth, especially as they grow. To achieve a state of flow across their processes, teams often stitch together a series of automations using Workflow
Unified Directory : How to Access ?
I signed in to Zoho One this morning and was met with the pop up about the upgraded directory (yay!) I watched the video and pressed "Get Started" ... and it took me back to the standard interface. How do I actually access the new portal/directory ?
Translation support expanded for Modules, Subforms and Related Lists
Hello Everyone! The translation feature enables organizations to translate certain values in their CRM interface into different languages. Previously, the only values that could be translated were picklist values and field names. However, we have extended
Unified task view
Possible to enable the unified task view in Trident, that is currently available in Mail?
Bigin, more powerful than ever on iOS 26, iPadOS 26, macOS Tahoe, and watchOS 26.
Hot on the heels of Apple’s latest OS updates, we’ve rolled out several enhancements and features designed to help you get the most from your Apple devices. Enjoy a refined user experience with smoother navigation and a more content-focused Liquid Glass
Importing data into Assets
So we have a module in Zoho CRM called customers equipments. It links to customers modules, accounts (if needed) and products. I made a sample export and created extra fields in zoho fsm assets module. The import fails. Could not find a matching parent
Allow instruction field in Job Sheets
Hello, I would like to know if it is possible to have an instruction field (multi line text) in a job sheet or if there is a workaround to be able to do it. Currently we are pretty limited in terms of fields in job sheets which makes it a bit of a struggle
Streamlining Work Order Automation with Zoho Projects, Writer & WorkDrive
Hello Community, Here is the first post in 'Integration & Automation' Series. Use Case :: Create, Merge, Sign & Store Documents in Zoho WorkDrive. Scenario :: You have a standard Work Order template created in Zoho Writer. When a task status is chosen
The dimensions of multilingual power
Hola, saludos de Zoho Desk. Bonjour, salutations de Zoho Desk. Hallo, Grüße von Zoho Desk. Ciao, saluti da Zoho Desk. Olá, saudações da Zoho Desk. வணக்கம், Zoho Desk இலிருந்து வாழ்த்துகள். 你好,来自 Zoho Desk 的问候。 مرحباً، تحيات من Zoho Desk. नमस्ते, Zoho
Multi-line address lines
How can I enter and migrate the following 123 state street Suite 2 Into a contact address. For Salesforce imports, a CR between the information works. The ZOHO migration tool just ignores it. Plus, I can't seem to even enter it on the standard entry screen.
Accessing Zoho Forms
Hi all, We're having trouble giving me access to our company's Zoho Forms account. I can log in to a Forms account that I can see was set up a year ago, but can't see any shared forms. I can log into Zoho CRM and see our company information there without
Archiving Contacts
How do I archive a list of contacts, or individual contacts?
Cost of good field
Is there a way we can have cost of good sold as a field added to the back end of the invoicing procedure and available in reports?
How to add image to items list in Invoice or Estimate?
Hello! I have just started using Zoho Invoice to create estimates and, possibly to switch from our current CRM/ERP Vendor to Zoho. I have a small company that is installing CCTV systems and Alarm systems. My question is, can I add images of my "items" to item list in Zoho Invoice and Estimates and their description? I would like to show my clients the image of items in our estimates so they can decide if they like these items. And I tell you, often they choose more expensive products just because
Issue with the Permission to Zoho Form
I am getting an error by signing in to zoho form as it is stated that i don't have permission to access this is admin account
Next Page