Plug Samples #12: Verify Customer Mobile Numbers with OTP to Avoid Spam Entries

Plug Samples #12: Verify Customer Mobile Numbers with OTP to Avoid Spam Entries

Hi Everyone!

Verifying customer information is critical in business to filter out junk data and spammers. Whether it’s lead generation, appointment booking, or any other operation, ensuring quality data is essential for driving meaningful outcomes. A verified mobile number stands out as a dependable source of high-quality data. When automating processes with chatbots, you can enhance data quality by adding mobile number verification through OTP (One-Time Password)

We’ve developed a plug script that verifies customer mobile numbers using OTP (One-Time Password) integrated with Twilio. You can add this to your Codeless bot builder to make your bot smarter, your processes smoother, and your data more reliable.

Overview of verifying the mobile number with OTP:

We need two Plugs:
  • Plug 1 - Generate & send OTP to the mobile number:
  • Plug 2 - Verify the OTP 
Plug 1- Generate & send OTP to the mobile number:
  • Open SalesIQ, navigate to Settings > Developers > Plugs > Add.
  • Give a name, description for the plug. Select the Platform as Scripts, and click on Create Plug. 
  • The first step in building the plug is defining the parameters. Click on the parameters on top and declare the following. 
Input Parameter 
  • Name : phone | Type : Phone
Output Parameter 
  • Name : status | Type : String
  • Name : otp | Type : Number
Copy the code below and paste it into your plug builder. Then, make the following changes
  • In line #8, replace your account_sid (Navigate to the Twilio >  Select your account > Account info > copy the Account SID)
  • In line #12, the auth token (Navigate to the Twilio > Select your account > Account info > copy the Live/Test credential)
  • In line #19, replace your Twilio phone number. 
  1. response = Map();
  2. phone = session.get("phone").get("value").remove(" ");
  3. //Generate OTP
  4. otp = randomNumber(1000,9999);
  5. //Message body
  6. body = "Your OTP for Zylker is " + otp;
  7. //Navigate to your Twilio profile > Account > API Keys & Tokens > copy the Account SID 
  8. account_sid = "ACa988e5ee589d4c827439d1";
  9. url = "https://api.twilio.com/2010-04-01/Accounts/" + account_sid + "/Messages.json";
  10. //To get auth token, Navigate to your Twilio profile > Account > API Keys & Tokens > copy the Account SID and Auth token. 
  11. //auth = "<Account SID>:<Auth token>"
  12. auth = account_sid + ":e67e8be6805u8jc717cbd6a6a0";
  13. auth_encoded = zoho.encryption.base64Encode(auth);
  14. headers = Map();
  15. headers.put("Authorization","Basic " + auth_encoded);
  16. params = Map();
  17. params.put("To",phone);
  18. //Replace your Twilio number 
  19. params.put("From","+14173879299");
  20. params.put("Body",body);
  21. response = postUrl(url,params,headers);
  22. status = response.get("status");
  23. if(status == "delivery_unknown" || status == "undelivered" || status == "failed")
  24. {
  25. sms = "failed";
  26. }
  27. else
  28. {
  29. sms = "success";
  30. }
  31. info response;
  32. response.put("status",sms);
  33. response.put("otp",otp);
  34. return response;
Then, click Save, preview the plug, and Publish it.

Plug 2 - Verify the OTP 
  • Open SalesIQ, navigate to Settings > Developers > Plugs > Add.
  • Give a name, description for the plug. Select the Platform as Scripts, and click on Create Plug.
  • Click on parameters and declear the following.  


Input Parameter 
  • Name : systemotp | Type : Number
  • Name : visitorotp | Type : Number
Output Parameter 
  • Name : otpstatus | Type : String
Copy the code below and paste it into your plug builder
  1. response = Map();
  2. systemotp = session.get("systemotp").get("value");
  3. visitorotp = session.get("visitorotp").get("value");
  4. if(systemotp == visitorotp)
  5. {
  6. otp_status = "OTP verification successful";
  7. }
  8. response = Map();
  9. response.put("otpstatus",otp_status);
  10. return response;
Then, click Save, preview the plug and Publish it. 
NotesNote : Only published Plugs will be listed in Codeless Bot Builder. 

How to add Plugs to the Codeless bot builder?

Collect the Visitor's Phone Number
  • Use the Phone Card to get the visitor's phone number.

Generate and Send OTP
  • Configure Plug 1 to generate and send a unique OTP to the visitor:
  • Under Action Cards, select the Plugs Card and choose Plug 1.
  • Choose Phone as the input (context variable).
  • Get the OTP and its status as outputs, saving them in the bot context as system_otp and otp_status, respectively.
  • Click Save to store the configuration.

Check OTP Delivery Status
  • Add a Criteria Router Card to verify if the OTP was successfully sent:
  • In the Plug Success Flow, add a Criteria Router Card.
  • Create a rule: For a flow OTP sending failed flow by setting the context variable otp_status returning "failed" (OTP failed).
  • The Not Matched Flow represents successful OTP delivery to the visitor.

Handle OTP Input from Visitor
  • In the Not Matched Flow of the Criteria Router:
  • Use a Visitor Fields Card to collect the OTP entered by the visitor.
  • Save the visitor's input in a context variable (visitor_otp).

Verify OTP
  • Use Plug 2 to compare the generated OTP (system_otp) and the visitor-provided OTP (visitor_otp):
  • Provide both OTPs as inputs to Plug 2.
  • Assign a variable to save the verification result.

Next Steps Based on OTP Verification
  • If OTP verification succeeds: Proceed with the next flow.
  • If OTP verification fails: Prompt the visitor to re-enter the OTP and repeat the verification process using the button card.



    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





                                                          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

                                                                                            Get Started. Write Away!

                                                                                            Writer is a powerful online word processor, designed for collaborative work.

                                                                                              Zoho CRM コンテンツ






                                                                                                Nederlandse Hulpbronnen


                                                                                                    ご検討中の方




                                                                                                          • Recent Topics

                                                                                                          • Recurring Events Not Appearing in "My Events" and therefore not syncing with Google Apps

                                                                                                            We use the Google Sync functionality for our events, and it appears to have been working fine except: I've created a set of recurring events that I noticed were missing from my Google Apps calendar. Upon further research, it appears this is occurring
                                                                                                          • Dissociate account from contact

                                                                                                            Hello, When I make the call through the API to "Dissociate account from contact" using, /api/v1/contacts/**integer**/accounts/**integer**/dissociate I get this response back, 422Unprocessable Entity (WebDAV) (RFC 4918) { "errorCode": "INVALID_DATA", "message":
                                                                                                          • Zoho Desk and Zoho People Integration - is it possible in order to alert whether an agent is available

                                                                                                            Hi, We use Zoho People for our employees to log absence (Paid Time Off etc). I was wondering if it was possible that this information can be shared in to Zoho Desk, so that when allocating a ticket to an agent, if they are on leave there is an onscreen
                                                                                                          • Add Save button to Expense form

                                                                                                            A save button would be very helpful on the expense form. Currently there is a Save and Close button. When we want to itemize an expense, this option would be very helpful. For example, if we have a hotel expense that also has room service, which is a
                                                                                                          • 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
                                                                                                          • Call transcrition working for ringcentral?

                                                                                                            I don't see anything about what telephony providers can be used. The Zoho support person A said that RingCentral isn't supported. Zoho support person B said that it works, just make sure the call recording link works. Excellent instructions here: Call
                                                                                                          • How to Send Email from within a custom module (with or without an email template)

                                                                                                            It is possible to send an email from the Deals module. However, I can't find a way to send an email from any of our custom modules. I have tried adding an email field to the modules (even though we don't really want one or need it there). That doesn't
                                                                                                          • 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
                                                                                                          • Zoho Inventory - Managing Items With Multiple Suppliers

                                                                                                            Hi community, I'm working on a project at the moment for a car parts wholesale business. Each Item (part) has its own original manufacturer part number (sometimes more than one part number for the same item). When purchasing parts from 3rd party suppliers,
                                                                                                          • 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
                                                                                                          • Zoho Creator customer portal limitation | Zoho One

                                                                                                            I'm asking you all for any feedback as to the logic or reasoning behind drastically limiting portal users when Zoho already meters based on number of records. I'm a single-seat, Zoho One Enterprise license holder. If my portal users are going to add records, wouldn't that increase revenue for Zoho as that is how Creator is monetized? Why limit my customer portal to only THREE external users when more users would equate to more records being entered into the database?!? (See help ticket reply below.)
                                                                                                          • Super Admin Logging in as another User

                                                                                                            How can a Super Admin login as another user. For example, I have a sales rep that is having issues with their Accounts and I want to view their Zoho Account with out having to do a GTM and sharing screens. Moderation Update (8th Aug 2025): We are working
                                                                                                          • Bug tracking

                                                                                                            Hi, does anyone know how to track errors during picking or packing? This way I can keep track and see how to improve and prevent errors in this area.
                                                                                                          • Retainer invoice in Zoho Finance modlue

                                                                                                            Hello, Is there a way of creating retainer invoices in the Zoho Finance module? If not can I request this is considered for future updates please.
                                                                                                          • Is it really true that I can't set the default 'deposit to' account in 2025?

                                                                                                            I've been using Books for 7 years and the default account has never been a problem. I usually manually reconcile invoices and have never had a thought about which account. It has always been my account. However, I recently noticed that for the past 4
                                                                                                          • How do I see the total leads during a certain period?

                                                                                                            I understand I can get the count of leads and potentials but the total number of leads in a certain period should be equal to Leads+potentials because when we convert a lead it gets moved to potentials and no longer exists there. is there a way i could
                                                                                                          • Unable to Add Asset to Work Order Due to Different Contact and Company

                                                                                                            Hello Zoho Team, I’m facing an issue in our environment related to asset linking in Work Orders. Here’s the situation: When our engineers go for field activities, they initially create the Work Order using the salesperson’s contact details. After completing
                                                                                                          • Where is the Global Search field?

                                                                                                            I am looking for an alternative to SF.com. Zoho CRM seems to be work fine, and be customizable in terms of the fields and reports. But there's one big thing missing and it's going to prevent us from using it: there's no global search box at the top of
                                                                                                          • API 500 Error

                                                                                                            Hello amazing ZOHO Projects Community, I get this message. How can we solve this? { "error": { "status_code": "500", "method": "GET", "instance": "/api/v3/portal/2010147XXXX/projects/2679160000003XXXX/timesheet", "title": "INTERNAL_SERVER_ERROR", "error_type":
                                                                                                          • Send Whatsapp message from Whatsapp template with custom variables

                                                                                                            Hi, I'm trying to do some basic integration for sending WhatsApp messages from Zoho CRM using Zoho Desk whatsapp templates. When creating new whatsapp template in Zoho Desk we can choose ticket related fields as variables but it's not clear how to use
                                                                                                          • In place field editing for candidates

                                                                                                            Wondering about any insight/best practices for efficiently updating candidate records while reviewing them in a Job Opening pipeline. We can do in-field editing (e.g. update job title or City) only when we have the full candidate record open, however
                                                                                                          • Audio/video quality issues with Zoho Meeting – Any roadmap for improvement?

                                                                                                            Hi Zoho Team, We’ve been using Zoho Meeting for both internal and external meetings, and unfortunately, the experience has been consistently poor. The video and audio quality are so unreliable that it often renders meetings ineffective—especially with
                                                                                                          • Default tax type for mileage?

                                                                                                            Where we are, mileage includes a government tax. Is there any way to set a default tax for the Personal Car Mileage category of expense? (Or any other way?)
                                                                                                          • Analytics Portal

                                                                                                            I have the "standard plan" and want to explore the portal option; I activated the 15-day trial but do not see the pricing for the add-on. How can I get the price under "Upgrade add-ons." Thanks Rudy
                                                                                                          • The Social Wall: October 2025

                                                                                                            Hello everyone, As we head toward the end of the year, we’re bringing you a few updates to help give your social media efforts a strong finish. This month, we’re rolling out new enhancements across both the web and mobile app. Post Preview Have you ever
                                                                                                          • Show price book list price

                                                                                                            When using price books, once you add products to the price book in the Products related list you can display the Unit price which is the default list price; however, there is no option to show the price book list price. To see the price book list price
                                                                                                          • Zoho CRM - Scheduled Reports Which Contain Chart

                                                                                                            Hi Zoho CRM Team, I'm requesting that the Report Export and Scheduling feature be enhanced to include a chart, if one has been created on a report. At the moment I have a report which shows Sales This Week by Deal Owner and a pie chart at the top of the
                                                                                                          • Cliq File Upload

                                                                                                            While uploading large file like 500MB, it takes time, that fines. But if you resize window or move window in other screen, that uploading disappears. After upload complete & sent it will be visible
                                                                                                          • Resizing a Record Template Background Inage

                                                                                                            Hi everyone, I have an issue which I can't seem to resolve: Basically, I'm designing a record template in certificate form. I've specified A5 landscape. I've set my background image the same dimensions with total pixels at 443,520. Whatever I try, when
                                                                                                          • Analytics : How to share to an external client ?

                                                                                                            We have a use case where a client wants a portal so that several of his users can view dashboards that we have created for them in Zoho Analytics. They are not part of our company or Zoho One account. The clients want the ability to have user specific,
                                                                                                          • How to copy value from a single line field into a picklist field within a module's subform?

                                                                                                            Hello there, I have a single line field in a module's subform. I would like the value in the field to automatically update a picklist field within the same subform (both have items with the same names). Is this possible via function? Unfortunately, workflows
                                                                                                          • Zia Actions: AI-powered Workflow Automation for Faster and Smarter Execution

                                                                                                            Hello everyone, Workflows got a notch better with AI-based actions. Actions such as field extraction, prediction, auto reply, and content generation facilitate quick execution with improved speed and accuracy. Zia can intercept useful details in newly
                                                                                                          • Constant color of a legend value

                                                                                                            It would be nice if we can set a constant color/pattern to a value when creating a chart. We would often use the same value in different graph options and I always have to copy the color that we've set to a certain value from a previous graph to make
                                                                                                          • What's New in Zoho POS - October 2025

                                                                                                            Hello everyone, Welcome to Zoho POS's monthly updates, where we share our latest feature updates, releases, changes, and more. Let’s take a look at how October went. Process returns for refunds, exchanges, or offer store credit Returns and exchanges can
                                                                                                          • Loan and purchase

                                                                                                            My husband is lending me mobey to buy a vehicle intersst free ... I need to know how to record the cash receipt and how I pay it back... the money is for a vehicle do I just post the invoice for that as I normally would usung the loan money to pay for
                                                                                                          • Zoho Connect Module in Zoho Trident

                                                                                                            Hi I really like where Zoho Trident is going. Having Mail and Cliq in one place is especially powerful. However, Zoho Connect really needs to be included to make this a true communication and collaboration hub. I would like to request that Zoho Connect
                                                                                                          • Zoho FSM API Delete Record

                                                                                                            Hi FSM Team, It would be great if you could delete a record via API. Thank you,
                                                                                                          • Feature enhancement: Highlight rows based on a cell value

                                                                                                            Hello Sheet users, We're excited to announce a new feature enhacement, shaped directly by your valuable feedback! As you might know, conditional formatting is a great tool for anyone dealing with large data sets. Previously, if you’ve ever wanted to draw
                                                                                                          • File Field Validation

                                                                                                            Hello all, We are tracking our customer NDA agreements in our CRM and have created 2 fields to do so, an execution date field and a file upload field. I want to create a validation rule to ensure that when the execution date field is populated that the
                                                                                                          • 100 record view limitation

                                                                                                            I have just migrated from another CRM and am starting in ZOHOcrm with over 5000 contacts. It seems that my searches and sorts are limited to 100 live records....or am I missing something. This seems to be very limiting...in a lot of scenarios (mass email,
                                                                                                          • Next Page