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.
- response = Map();
- phone = session.get("phone").get("value").remove(" ");
- //Generate OTP
- otp = randomNumber(1000,9999);
- //Message body
- body = "Your OTP for Zylker is " + otp;
- //Navigate to your Twilio profile > Account > API Keys & Tokens > copy the Account SID
- account_sid = "ACa988e5ee589d4c827439d1";
- url = "https://api.twilio.com/2010-04-01/Accounts/" + account_sid + "/Messages.json";
- //To get auth token, Navigate to your Twilio profile > Account > API Keys & Tokens > copy the Account SID and Auth token.
- //auth = "<Account SID>:<Auth token>"
- auth = account_sid + ":e67e8be6805u8jc717cbd6a6a0";
- auth_encoded = zoho.encryption.base64Encode(auth);
- headers = Map();
- headers.put("Authorization","Basic " + auth_encoded);
- params = Map();
- params.put("To",phone);
- //Replace your Twilio number
- params.put("From","+14173879299");
- params.put("Body",body);
- response = postUrl(url,params,headers);
- status = response.get("status");
- if(status == "delivery_unknown" || status == "undelivered" || status == "failed")
- {
- sms = "failed";
- }
- else
- {
- sms = "success";
- }
- info response;
- response.put("status",sms);
- response.put("otp",otp);
- 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
- response = Map();
- systemotp = session.get("systemotp").get("value");
- visitorotp = session.get("visitorotp").get("value");
- if(systemotp == visitorotp)
- {
- otp_status = "OTP verification successful";
- }
- response = Map();
- response.put("otpstatus",otp_status);
- return response;
Then, click Save, preview the plug and Publish it.
Note : 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.
I hope this was helpful. Please feel free to comment if you have any questions. I'll be happy to help you.
Best regards
Sasidar | Zoho SalesIQ
Recent Topics
booking link that expires
I have a suggestion that is crucial. When i send booking URL to clients they keep the link and they book appointment whenever they want multiple times. You should give us the Booking URL feature. We should be able to send it and the user can use it only
Accessing Subform Data using getRecordByID
I am getting data from Zoho Creator using deluge zoho.creator.getRecordByID task, from another application. The report contains a subform, and that subform is in the detail view of the report. I do not appear to have any subform data in the JSON response,
Print record summary to pdf page breaks
Hello. I created a record summary and would like to export to pdf. Rich text fields or photos can get printed on 2 pages cutting them in half. Is there a way to add page breaks? Thanks.
The email address you have entered belongs to a different deployment/region.
Hi, I am trying to create the user - mprust@crombiecomputers.co.uk but keep getting the message below - The email address you have entered belongs to a different deployment/region. Please contact support@zohoaccounts.com for assistance. Look forward
Pre-fill TO and CC fields for Email Templates
This would be a game changer to be able to set either specific email addresses or merge fields based on deal role titles into email templates. Please pass this along to *hopefully* add to future features of Zoho CRM.
Leads and Deals Issue
Hi! Is Zoho having trouble today? I've been experiencing issues today. When I move a deal to closed/won, it previously would require a closing date but today the screen just went blur and the closing date did not pop up. And then under leads, I was trying
QR codes in templates
I'm excited about the new QR code generator. I have included a QR code that contains the record ID setting "${ID}" as input data. In the report detail it works perfectly but when printing it in a template the code is not shown.
How do I hide all leads from Standard users in my CRM ZOHO
I want to configure my crm zoho in such a way that standard users will only see leads owned or assigned to them. How do I go about doing this? I have tried all i could, but nothing...can anyone help me?
How to Implement Time-Based Filters in Zoho Workflows?
Hi everyone, I’m looking for a workaround to implement time-based filters in Zoho workflows. Specifically, I need a workflow to trigger only within certain hours (e.g., between 10:00 AM and 8:00 PM, Sunday to Friday). Currently, Zoho workflows execute
is there a better way to routinely export my project timesheets?
Hi there, I am somewhat happy with how Zoho books handles time. One thing that is missing is more user driven control over my data. I have a workflow where I constantly need to give customers feeds of work done. So I pick a project, and would ideally
Portal Default View
Hello! My company is about roll out portals for some users, but we were wondering if it was possible to set the Record Detail Page View to default to a custom view that we made. That way the information they need would be streamlined and easier to see.
Does zoho rest api support token exchange from microsoft entra id token
i want to get access token from the Microsoft user token in rest api. so it is possible to exchange microsoft user access token to zoho's access token or auth token ( token should be user specific not super admin).
Important: DKIM verification needed for unauthenticated email domains
Hi all, This post is to inform users who are currently using unauthenticated email domains as their sender email for their notifications. We have mandated DKIM verification for all domains used as sender email addresses for the outgoing emails by 01-Feb-2025
How do I define a weekend
I noticed the default for weekends does not seem to include Saturdays. How can i define weekends to include both Saturdays and Sundays? Thank you.
Zoho Sign Product updates - H2 2024
Hello! We have almost come to the end of 2024! Here's a list of features and enhancements that went live in the later half of the year. NOM 151 certification Witness signing Formula, conditional, and custom fields Zoho Sign's extension for Bigin by Zoho
Custom Status for Purchase Orders
Currently Zoho books has functionality to create custom statuses for Sales Orders. Can this be extended to include custom status for purchase orders as well? It was a great decision to add this functionality to sales orders. Our use case is for tracking
Remove Address from credit card payment
I would like to remove the need to add address when paying by credit card. I only want the customer to have to add their credit card details.
Top Menu Disappeared from Blog Page
Hi, Our top menu disappeared at Blog Posts page. However, it's still visible any other page on the website. I attached two screenshots, so it can be understood clearly. How can we bring back top menu? Thanks, K.
New Built In QR/Barcode Generator Print Settings
I'm trying out the new QR/Barcode generator field in Creator. I would think most people will want to print these, like I do. I am not seeing any way to control the height or width of the barcode for printing (inside the print/pdf template builder). The
My Zoho mail has been blocked for suspicious activity. cannot unblock it! need urgent help!
Hi, I was accessing my email on an airplane which for some reason resulted in my mail being blocked. I have managed to unblock my incoming however outgoing is still blocked. I have contacted all your support emails but it still says contact support when I try to unblock outgoing emails. Its now been over 8 days with the same issue which is really serious as I'm not able to send several business emails during this period. I have followed all your steps to unblock this and contacted your support 5
Copy Widget to another Dashboard
I can see the option to clone a widget to the same dashboard but is it possible to copy it to another dashboard?
Error while importing products Purchase Price: Value in the field does not match with the data type supported by us.
I am trying to import items into zoho inventory using an excel spreadsheet. I keep getting this error Purchase Price: Value in the field does not match with the data type supported by us. no matter how i format the cells this comes up and will not import
Quotes Module - import data
Hello Zoho, is it possible to import Quotes records? I was trying and i have no results. Raport shows no data imported. Could you help me please how to do it?
Year-End Wrap: Disconnect now; Reconnect later with Offline Mode
🎄Happy Holidays🎄 Let's say you are travelling home to spend the holiday season with your loved ones. Before you even board the train, you check your phone only to find your inbox rapidly filling with urgent emails that need your attention. There’s no
Resource booking functionality questions
I'm exploring the resource booking functionality in Zoho Bookings for my organisation's needs. I have a few questions about the available Zoho Bookings functionalities. Is it possible to force all users to sign up for an account before they book a resource?
How to create a Field with answers as Yes, No> Further if no is selected a new field to be visible to give details
Dear All, I am creating a feedback form in HR Letter. The question is were you satisfied with the work allotted. Expected answer to this is Yes, No. Further if the response is no, then a field to be give to fill more details as to why no was selected.
Modify the way a phone number is shown in footer on ZOHO Booking Page
The default display of the phone number field in the footer is not customer friendly - See image below. We would like it to use the accepted standards of phone number display: +61 (0)2 88545440, or allow us to choose. At the moment ZOHO Booking sets how
Zoho Bookings Multilingual ?
Hello, Not sure if there is a way to do it currently, but it would be very helpful if Zoho bookings allowed multilingual translations so we could have our booking pages and notifications setup in multiple languages. Thanks,
Allow customers to choose meeting venue and meeting duration on booking page
My business primarily involves one-to-one meetings with my clients. Given the hybrid-work world we now find ourselves in, these meetings can take several forms (which I think of as the meeting "venue"): In-person Zoom Phone call I currently handle these
Two way sync Zoho Mail and Bookings
Hi, I know it’s possible to view Bookings appointments in Zoho Mail, but is there a way to see my Zoho Mail meetings in the Bookings calendar?
Modifying iframe data of Zoho booking iframe
Hello, I have integrated a Zoho Bookings embedded iframe into my website. Currently, I am pre-filling the booking form with default values as part of our process flow. However, I want to ensure that if an input field is already populated with a default
Sending my emails to Spam Folder
I am loosing my business because of this issue, many of my customers are receiving their email in the spam sometimes no one checks them
Why can't I sync my Zoho Mail tasks and notes with my mobile device, and is there a way to fix this issue?
I'm having trouble syncing my Zoho Mail tasks and notes with my mobile device. Despite following the usual steps, the tasks and notes don't appear on my phone. Is there a way to fix this issue? Regards, Adamjes, Tekskills India Pvt Limited, India.
Re: constant rejected email form and to my account
Hi, have had several rejection when I sent an email to Zoho account as well as other people have sent emails to my as your health Centre they have account and all aspects have been ejected. i wonder why the email are rejecting to and from. If you see
How do I redeem credits?
How do I redeem credits that are shown in billing section?
Cannot add IMAP account to "new" Outlook
Hi, I am attempting to add an IMAP account to my copy of the "new" Outlook on my desktop computer. I have tried using the default password when MFA was disabled and an app password when MFA was enabled. But neither attempt worked. My Windows 11 OS number
Update Zoho Flow on Sprint Work Item Status Change
Hello, I've contacted Zoho One support but have been unable to help in a timely manner, so I'm asking the community. I want to start using sprints, but I'm having an issue. I need to post updates to Slack when a Work Item has a status change. My understanding
Create Dashboard using data/tables from different workspaces
Is it possible do create a Dashboard using different tables that are part of different Workspaces?
Este domínio já está associado a esta conta
quando digitei meu domínio recebi essa mensagem que meu domínio estava associado a uma conta que eu nem faço idéia de quem seja. Como que faço pra resolver isso?
Storage addon failed to upgrade
Hi, I am trying to purchase addon storage, but i am getting upgrade failed error Sorry! We are unable to process your information. Please try again after some time. If the problem occurs again, please visit our Contact Us page to reach out to the appropriate
Next Page