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.



    • Recent Topics

    • How to know number of days between Deal Stages?

      Hi Team - how do I know the number of days between Deal Stages? I have a Deal blueprint and I want to know the number of days it takes the Deal to be on Stage 3 to Stage 8? I can't seem to create a report for that. Our Deals have 11 Stages and our Purchasing department is in charge of Stage 3 to Stage 8 and I want to know the number of days it takes for them to complete their stages?
    • How To Change Open Activities View in Canvas?

      Hi all, I want to have my open activities have this view, but I cannot see how to make it look this way in Canvas. Not only that, but there isn't a way to rearrange the Standard view in Canvas, either. What I want (this is in the Standard layout): What
    • Queries in Custom Related Lists

      Hello everyone, We hope you’re having a great day! A while ago, we introduced Queries in Zoho CRM to help you dynamically fetch data from CRM modules or even external sources—right within your CRM interface. Many of you have already used Queries with
    • Mass emails - Allow preview of which emails will receive the email based on the criteria

      Feature request. Please allow us to view and confirm the exact recipients of the mass emails based on the criteria we've chosen before sending. It can be quite sensitive if you send the mass email to some wrong accounts accidently, so it would be great
    • Customers not receiving emails

      So, a little backstory, we have been using Zoho Forms for the past eight years. And when we initially started, we would have email notifications be sent from inside Zoho Forms after a submission. We recently started using Zoho CRM as we wanted a better
    • Sum Total of various fields in child module and add value to parent module field

      Hi! Having trouble with a custom function, im trying to calculate the total of all the rent and sqm fields of our offices in Products module and have them transfer to the parent module Location. The API names are as below: Child module Products = "Products"
    • Automate your status with Cliq Schedulers

      Imagine enjoying your favorite homemade meal during a peaceful lunch break, when suddenly there's a PING! A notification pops up and ruins your moment of zen. Even worse, you might be in a vital product development sprint, only to be derailed by a "quick
    • Important! ZipRecruiter Sponsored Posting Plan Changes in Zoho Recruit

      Greetings, We’re reaching out to inform you about an important upcoming change to the ZipRecruiter Sponsored job board integration within Zoho Recruit. What’s Changing? Starting June 1, 2025, Zoho Recruit will be updated with ZipRecruiter's latest pricing
    • Generate Unique Customer ID for Each for All Contacts

      Generate Unique Customer ID for Each for All Contacts
    • Mails to Deals

      Hi everybody. We are using ZOHO CRM connected to ZOHO Mail and we have a big trouble, which our ZOHO partner is not able to solve. Zoho CRM automatically connects received emails to last edited live Deal of the same Contact. For us this logic is very
    • ICICI Bank integration

      Why the ICICI bank integration has been disabled? We opened the ICICI bank account only for integraton with Zoho. It is taking lot of time to do manual payments using file upload method. When will be the new ICICI bank integration enabled in India?
    • Google Drive

      How to add more modules in google drive as I don't want Zoho space? TIA
    • One notebook is on my Android phone app, but not on Web or PC app.

      This problem started in stages. At first my phone was occasionally failing to sync. Then I noticed two things added to my Phone App. One was an existing notebook had a new cover, and the other was a new Note Card with an odd text in it. These were only
    • Ajust quantities in another form based on subform, on form submission

      Hello, I have an Order form with a LineItems subform. The LineItems subform has many lookups that import data from various other forms. I want to deduct the quantity offered in one of those other form, called Offer. In another application I used the following
    • Workdrive connection in Zoho CRM not working

      Hi, in https://crm.zoho.com.au/crm/orgXXXXXX/settings/connections i have set up the connection for WorkDrive which is pretty much setting up the name and the scopes. But I get "WorkDrive API test response: {"errors":[{"id":"F7003","title":"Invalid OAuth
    • Best Way to Update Subscriber Preferences for an Existing List?

      We currently have a mailing list of over 43,000 contacts in Zoho Campaigns, and we’re looking to segment our list based on subscriber content preferences—things like Free Webinars, Local Training, Store Specials, and New Product Announcements. We’d like
    • Disappearing Mouse cursor in Zoho Mail / Windows 11 (Chrome + Edge)

      I'm seeing an issue when writing mails with the light theme with the mouse cursor being white and the document area also being white - making it nearly impossible to see the mouse cursor. I see the problem on Windows 11 under Chrome and Edge. (Yet to
    • What's New in Zoho Inventory | January - March 2025

      Hello users, We are back with exciting new enhancements in Zoho Inventory to make managing your inventory smoother than ever! Check out the latest features for the first quarter of 2025. Watch out for this space for even more updates. Email Insights for
    • Equivalent domains

      Need a settings feature for adding/modifying/deleting domains that use the same login service. The feature can also suggest some popular sites that use shared credentials to access domains under their control. For example: amazon.com and its local variations like amazon.in. For example: gmail.com and google.com. LastPass has this feature.
    • Learning how to customize templates via code and best practices

      Hi! Our developers team want to learn how to edit our template files safely. The last time we messed with these files our site went down for a day and we had to reconfigure it from scratch. What are the best practices to do this? How can we get a template
    • Inquiry: Integrating In-house Chatbot with Zoho Desk for Live Agent Support

      Hi Team, We are exploring the possibility of integrating our existing in-house chatbot with Zoho Desk to provide seamless escalation to live agents. Our requirement is as follows: within our chatbot interface, we want to offer users a "Talk to Agent"
    • I need to know the IP address of ZOHO CRM.

      The link below is the IP address for Analytics, do you have CRM's? https://help.zoho.com/portal/ja/kb/analytics/users-guide/import-connect-to-database/cloud-database/articles/zoho-analytics%E3%81%AEip%E3%82%A2%E3%83%89%E3%83%AC%E3%82%B9 I would like to
    • You are forced to store/manage custom functions redundantly | Any solutions?

      Hello there, you are forced to store code (custom functions) redundantly if you want to use the same functionality in multiple departments. I don't understand that you can't define global functions. When I make a change to a function I may have to do
    • Integrating Zoho CRM with Quickbooks Enterprise?

      Does anyone have any experience of integrating Zoho CRM with Quickbooks Enterprise?  The Zoho pages refer to the Quickbooks Premier edition, and I wanted to know if the same works with the Quickbooks Enterprise version.
    • in Desk - Why can't I find where to enable multi-branding?

      I'm looking at the knowledge base article & it says to go to settings / general / rebranding / multi-branding. But there's no multi-branding there!
    • Edit a previous reconciliation

      I realized that during my March bank reconciliation, I chose the wrong check to reconcile (they were for the same amount on the same date, I just chose the wrong check to reconcile). So now, the incorrect check is showing as un-reconciled. Is there any way I can edit a previous reconciliation (this is 7 months ago) so I can adjust the check that was reconciled? The amounts are exactly the same and it won't change my ending balance.
    • How to undo a reconciliation?

      I need to update the "Expense Account" field on a bunch of expenses that I've already reconciled.  However, the system will not allow this field the be changed since it is reconciled.  I haven't found a way to remove the reconciliation status for the
    • Edit Reconciled Transactions

      I realize transaction amounts and certain accounts cannot be edited easily once reconciled, but when I audit my operational transactions quarterly and at the end of the year sometimes I need to change the expense account for a few transactions. To do
    • Zoho support Can not send invitation email to portal user

      I try to use Zoho support but have a problem. I don't know why. - When a customer sign up at the portal user they don't receive the invitation email. - When I go to contact manu, choose 1 user and click invite --> they don't receive the invitation email.
    • How to Send Automatic Warning Email After 3 Late Arrivals in Zoho People?

      I’m looking to set up an automation in Zoho People where a warning message is automatically sent to employees who have 3 or more late arrivals within a specific time period (like the past 30 days). Here’s what I’m trying to achieve: Monitor employee check-in
    • Quick Create needs Client Script support

      As per the title. We need client scripts to apply at a Quick Create level. We enforce logic on the form to ensure data quality, automate field values, etc. However, all this is lost when a user attempts a "Quick Create". It is disappointing because, from
    • remove()function to remove characters

      Hi there, I'm trying to use the remove function to remove characters from a variable. I have a Lead source that comes in as [Google] or [Facebook] etc. in Flow I need te to remove the square bracket. Tried a function that looks something like this: string
    • Sharing files without download option

      Hi Team     We want to share folders and subfolder which has files(doc, .PPT , excel and PDF) in zoho Docs. When we share the directory to a member in the organization or external to the organization There are able to download. How do we prevent users from download. Regards Krishna V.K
    • 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
    • Basic Lookup Field Update Function

      Hi! So I have no idea what I'm doing in Deluge but I need to get a custom function to run On Create or Edit that sets the value of a Lookup Field based on the contents of another field. Seems simple enough, but I have looked through dozens of other similar
    • Weekly Tips: Schedule Your Emails with Zoho Mail

      As a business, it is recommended to consider the best time to send an email, taking into account the recipient's time-zone or their work hours to have your email on top of their inbox. Sending an email when your recipient is most likely to check their
    • Data Source Request : More Zoho Marketing Automation and Zoho Pagesense

      I'm currently trying to replicate the reports shown in ZMA for stats over time for individual forms. The reports exist only in ZMA, but I want to use in wider company presentations and can't find the relevant data in Analytics : Example I also note that
    • Zoho Mail - support email

      Hi I sent an email to support more than 48 hours ago and still have not heard back! What's up? How long am I supposed to wait for a replay? Thanks
    • ME SALE ESTE ERROR: No fue posible enviar el mensaje;Motivo:554 5.1.8 Email Outgoing Blocked

      Ayuda!! Me sale este error al intentar enviar mensajes desde mi correo electronico de Zoho! Tampoco recibo correos pues cuando me envia rebotan. Ayuda, Me urge enviar unos correo importantes!! Quedo atenta MAGDA HERNANDEZ +5731120888408
    • Syntax for <criteria> field in zoho.crm.searchRecords() function when the value to check against is a variable?

      I want to search for records in the Tasks module whereby the value of a field (called field1) matches the value stored in a variable in the Deluge script (called variable1). From the sample code in https://www.zoho.com/deluge/help/crm/search-records.html,
    • Next Page