Plug Samples #2 : Prevent junk information by verifying the customer contact details with OTP

Plug Samples #2 : Prevent junk information by verifying the customer contact details with OTP

The chatbot is an excellent way to up stock your business needs. They shine in all the areas you apply them, like conversing with visitors, engaging them on-site, collecting their contact information, etc. Activating your Zobot with a codeless bot platform to collect visitor contact information is easy. But, validating the information and pushing the correct contact details to your CRM for future reference is tedious. In this post, let us learn how to validate the visitor contact information using OTP via plugs. 
  
Plugs help you perform customized actions on the codeless bot platforms. To validate, when a visitor visits your website, you can get their email, generate a unique OTP and allow them to proceed further only if the OTP verification is successful.

Overview of the Plugs:

We need to generate 2 Plugs : 
Plug 1 - For generating unique OTP 
Plug 2 - For verifying the OTP 

How to create a plug:

Plug1 - Generating OTP
  • In your SalesIQ Dashboard, navigate to Settings > Developers > Plugs and Click Add.
  • Provide your plug a name, description. Select the Platform as SalesIQ Scripts, and click on Create Plug
  • Now, create the Plug 1- generating OTP. Click on the parameters on top and declare the following. 
            1. Input Parameter - Name : email | Type : Email
            2. Output Parameter - Name : OTP | Type : Number
  • Copy paste the below code:
  1. response = Map();
  2. email = "";
  3. if(session.containsKey("email"))
  4. {
  5.         email = session.get("email").get("text");
  6. OTP = randomNumber(1000,9999);
  7. }
  8. response = Map();
  9. response.put("OTP",OTP);
  10. return response;
  • Then, click Save, preview the plug and Publish it.
Plug 2 - Verifying OTP
  • Create the Plug 2 - verifying the OTP. Click on the parameters on top and declare the following. 
            1. Input Parameter 1 - Name : emailotp | Type : Number
            2. Input Parameter 2 - Name : visitorotp | Type : Number
            3. Output Parameter : - Name : otpstatus | Type : String
  • Copy paste the below code.
  1. response = Map();
  2. emailotp = "";
  3. visitorotp = "";
  4. emailotp1 = session.get("emailotp").get("value");
  5. visitorotp1 = session.get("visitorotp").get("value");
  6. if(emailotp1 == visitorotp1)
  7. {
  8. otp_status = "OTP verification is Successful";
  9. }
  10. response = Map();
  11. response.put("otpstatus",otp_status);
  12. return response;
  • Then, click Save, preview the plug and Publish it. Now, we have added Plug. 
Note : Only published Plugs will be listed in Codeless Bot Builder. 

Flow to verify OTP on the Codeless Bot platform: 
  1. Initially get the email from the visitor,
  2. Generate a unique OTP using Plug 1,
  3. Send the generated OTP by send mail block
  4. Then get the OTP from the visitor by visitor fields block,
  5. Verify the both OTP (visitor given OTP and plug generated OTP) using Plug 2,
  6. If the OTP verification is successful proceed to the flow, if not, ask the OTP again. 

How to incorporate Plugs in Codeless bot?
  • Navigate to Settings > Bot >Add, enter the necessary information and select Codeless Bot as bot platform or open an existing bot.
  • Select the Plugs block under Action Block and select the Plug 1 (Generate OTP)
  • Provide bot context for email as plug input and get the OTP as plug output and store in bot context (emailotp). 
  • Click Save

  • Now, with Send email block, send an email to the visitor with OTP got from the Plug 1 using bot context (emailotp). 
  • Next, using the visitor fields block, get the OTP from the visitor and save it using the bot context (visitorotp) to verify. 
  • Then, select Plug 2, to verify the OTP created from Plug 1 (emailotp) and OTP entered by the visitor (visitorotp.)
  • Provide both emailotp and visitorotp as Plug input and get the verification successful text from as Plug output and store it in bot context to use it further. Click Save.


Related Links:
To know more about the features of zobot, kindly visit our Resources Section. 


      • Sticky Posts

      • Optimizing Chatbot Versatility by Combining Answer bot and Zobot

        Hi everyone! Great to see you. We are delighted to introduce the Answer bot card/autopilot function for the Codeless and SalesIQ Script bot platforms. This provides your bot with Q&A capabilities similar to the Answer bot. So, you can bring your Answer
      • What will happen if we deploy two Zobots/Chatbots on the website?

        Hi everyone,  The chatbot is a powerful tool to automate customer interaction on your website. But, what will happen if we deploy two different chatbots on the website? If you've deployed both answer bot and Zobot on the website for the same flow, then

        • Recent Topics

        • Using Queries with dynamic parameters in Kiosk Studio

          Hi, I'm pretty new when it comes to developing within Zoho (I'm really a .NET developer), as it was just added to my responsibilities. For a new feature in the CRM, I'm trying to develop a Kiosk function to show a list of records (retrieved by the new
        • Workflow Based on Manual Journal

          Manual journal entries are one of the few areas that cannot kick off a workflow automation in Zoho Books currently. I would propose considering adding that. My use case is that the payroll provider I use (a flavor of SurePayroll) has a Zoho Books automation
        • 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?
        • Zoho sheets to crm and mapping

          i want to know more about mapping the contacts that i upload from the spreadsheet also couldnt able to understand flow
        • Problem viewing document imported from google drive.

          Hello, When I add a document via my google drive, it is impossible to preview it. I get the error “Files without extensions cannot be previewed. Download to view this file”. Could you please help me? Also, and this is more of a question: is there a way
        • Condition-based data sharing rules are now available in CRM

          Dear All,   We are excited to introduce a much awaited feature: condition-based data sharing rules. We'd love to explain more about this enhancement.   Specify record conditions in data sharing rules Data sharing rules enable you to share all the CRM
        • 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.
        • Automatic Portal invite

          We have numerous customers we move through a blueprint in deals, when they get to a certain point we need to give them portal access, how can this be done through deluge or a workflow?
        • Directly Edit, Filter, and Sort Subforms on the Details Page

          Hello everyone, As you know, subforms allow you to associate multiple line items with a single record, greatly enhancing your data organization. For example, a sales order subform neatly lists all products, their quantities, amounts, and other relevant
        • Is it possible to trigger the review process when a record is edited?

          Hello, I need to trigger a review process whenever a field is updated to a specific value. This field is empty when the record is created and is only filled later. I know the approval process exists, but that's not what I'm looking for in this case. What
        • 【Zoho CRM】ウィザード機能のアップデート

          ユーザーの皆さま、こんにちは。コミュニティチームの中野です。 今回は「Zoho CRM アップデート情報」の中からウィザード機能のアップデート をご紹介します。 今回のアップデートにより、ウィザードの「条件処理ルール」機能が改良され、以前の入力画面の項目を基に条件を設定できるようになりました。 これまでは条件設定が1つの画面内に限られていたため、画面間で情報を関連付ける際に、余分な項目を作成する必要がありました。 今回のアップデートにより、前の画面の情報を利用して次の画面に条件を適用できるため、設定がより効率的になります。
        • 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
        • Multiple date selection

          Hello, we want create app for our company. We need create tasks for our employers. For example - 1 employer have task every Friday the whole year. Second have task every Monday for 6 months. For simple way create Multiple date selection in date form
        • Last payroll of the year gives me an error

          Trying to run the last payroll of the year. The payment doesn't get to the employee until 1/1/25, which is correct. However when I try to process it I get the following error: Tax calculation is not supported for the year 2025. Please change the Pay date.
        • Partner with HDFC And Sbi Bank.

          Hdfc and sbi both are very popular bank if zoho books become partner with this banks then many of the zoho books users will benefit premium features of partnered banks.
        • Set organization level access to Knowledge Base and manage duplicate article permalinks (with date appended to them)

          Hello everyone, We have introduced two important updates in the Knowledge Base module: Permissions - A new permission called "Admin access" has been introduced under module permission. Permalink alert - Users will be alerted when an article with the same
        • Language Field on Contact Person-level

          Dear at Zoho Books, would it be possible for you to have a Field for 'Language' for the Contact Persons under a Company. In CRM and Bigin we could create a Custom Field (Dropdown) for this effect but without any present in Zoho Books we could never sync
        • This domain is not allowed to add. Please contact support-as@zohocorp.com for further details

          I am trying to setup the free version of Zoho Mail. When I tried to add my domain, theselfreunion.com I got the error message that is the subject of this Topic. I've read your other community forum topics, and this is NOT a free domain. So what is the
        • Create Dashboard using data/tables from different workspaces

          Is it possible do create a Dashboard using different tables that are part of different Workspaces? 
        • Zoho Books email notifications

          Hi, We are currently implementing Zoho books for our organisation. I have 2 questions. 1. Are we able to embed HTML into our emails to make them look as part of our business ? Branding is very big issue for us and i would like to make sure that all branding efforts are carried across into the notification emails.. 2. Is there a way to preview the notifications that are sent out to our customers so we can make sure the look and feel is as we require ? thanks
        • Multiple templates (Settings > Email templates)

          Hi Zoho, We would like to have more options to select a template when sending an email in Zohosign. Currently we can only add 1 template per option: Is this possible? Kind regards, Tristan
        • Add an action to set agent as a member of a team in zoho desk

          Hi, Please add an action to zoho flow to set agent as a member of a team in zoho desk (add to a team or remove from a team). Regards, Ram
        • Zoho email setup in office365

          When i am trying to setup zoho mail setup using my domain in office365 and it is not working and it says that we couldn't log on to the incoming (IMAP) server and please check your email address and password and try again. I was able to login using my
        • 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
        • All notes disappeared

          I've been using the notebook app for over five years on my phone without being logged into an account. A few days ago I opened the app and all my notes had disappeared. Since then I tried restarting my phone, updating the app and logging into my account,
        • I need help in setting up a script that works for my calling service

          Please i need your guidance and expertise in how to go about a particular scripting. You see, we are a call service that assists companies to receive calls for them, i need to create a system in my Zoho CRM whereby i will receive call from my already
        • Cost Center accounting

          Hello all. We are looking at switching from MYOB to Zoho books. Love all the features in books - esp. CRM integration, but the big gap for us is the lack of cost-center accounting feature. Are there firm plans to develop this feature in Zoho Books? If
        • Impuesto automatico en cotizaciones

          Buen dia Mi pregunta es como se puede poner alguna operacion para que las cotizaciones me salgan automaticamente con impuestos ya que uno al cargarla al final tienen que añadir el porcentaje de impuesto Saludos
        • Formatting of Gantt Chart for PDF export

          Hi all, There really needs to be some improvements to the presentation of exported PDF Gantt Charts. An exported format is the way that most people on a project (other than the PM directly) will consume this data. The current PDF export options are lacking a lot of control. - I'd like to firstly have control over the export size of the PDFs (A4, A3 etc), Currently it seems arbitrary - very large aspect ratio print sizes. - Next i'd like to be able to specify the print date range, and scale (show
        • How to Iterate a Function in Zoho Desk Workflow with Delay Between Calls?

          Hi everyone, I’m working on a function in Zoho Desk that searches for a specific ticket record. If the ticket is not found, I need to retry the search multiple times with a delay between each attempt until the ticket is located or a maximum number of
        • タスクを問い合わせテンプレートに追加

          タスクを問い合わせテンプレートに自動で追加されるようにしたいです。どうしたらいいですか
        • Placeholder for Agent Signature in Email Templates

          Dear Zoho Team, I hope this message finds you well. We currently face a limitation when designing email templates in Zoho Desk. While we can create email templates and include a footer at the end, the agent signature is always appended by default at the
        • Custom Profile Agents Unable to Update Mandatory Phone Number in tickets under Zoho Desk

          Hi, While working in the Ticket module in Zoho Desk, agents with a custom profile are unable to update the Phone Number field (which is mandatory) under Account Information. The agents need to enter values such as "NA" or "Nil" in the field to close the
        • Response Violation - Zoho Desk

          Hi Team, I just need an information regarding the zoho desk - Response Violation and how can we avoid the tickets from getting the tickets response violated.
        • How to Replace an Assessment in a Job Opening on Zoho Recruit

          Hi everyone, I’m currently using Zoho Recruit and would like to replace the assessment linked to a specific job opening. I want to remove the existing assessment and add a new one. What is the best way to do this without losing any important data or affecting
        • Updating existing values in a list

          Is it possible to update an existing value in a list? For example if I wanted to append text to an existing string value that I had previously added to a list is that possible? I'm able to extract the existing value (get() function) and append the additional text, but can't find a way to add the new value back to the list in the same index location. One work around I found was to delete the existing list entry and then add the new value, however this changes the index location to the last entry in
        • Host not reachable

          Good morning. I have four mail accounts and they have been working well for years. Now, suddenly, I am unable to send any e-mails from any of them. I allways have this pop-up: Thank you. Regards. Luis Fernández
        • BIN Locations

          Hi, I’m new to Zoho inventory and unless Im missing something, I cannot find BIN locations anywhere in ‘items’? please tell me it’s there somewhere?!? Thanks
        • Zoho Marketing Campaign

          I want a details report of marketing API . which API i can use to get a full flexed detail of email campaign , sms , social media ,and all other campaigns ?
        • Zoho Marketing Automation APIs

          When I want to create New lead in marketing automation , I want to add First Name and Last Name as well along with Email but there is no option like this in API . Can you please give me the API which will fulfill my condition ?
        • Next Page