Validate Visitor Phone Number Input in Zoho SalesIQ Using Phone Card and Plug

Handling phone numbers of desired digits within the standard limit from Zoho SalesIQ

Overview:

Capturing accurate phone numbers from visitors is critical for sales follow-ups, customer support, and lead qualification. This guide explains how to configure the Phone card in Zoho SalesIQ, including a workaround using Plug and Criteria Router to enforce format validation (e.g., 10-digit numbers).

Zoho SalesIQ lets you build a fully functional chatbot to automate your live chat operation without a single line of code. With our code-less chatbot builder, all you need to do is create a chatbot flow using the drag-and-drop interface and type in your bot responses.

As part of collecting the visitor information process, fetching the phone number information becomes a crucial step. The phone card can be used to get the visitor's phone/mobile number during the bot conversation. The number collected in this card will be updated as the visitor's phone number automatically in the SalesIQ portal.  


Why Collecting Valid Phone Numbers Matters


Phone numbers are essential for:

  • Sales conversion through call follow-ups

  • Telephonic support and personalised outreach

  • Avoiding spam or incomplete lead entries

To ensure that the data collected is accurate, it's important to validate phone number inputs properly.

We are unable to restrict the phone card's input to a specific number. According to the current implementation, we are not allowed to enter more than fourteen numbers and less than seven numbers.

Screenshots:






Validating Specific Digit Formats (e.g., 10-digit Numbers):

We understand that not every country uses phone numbers with fixed set of digits. The number of digits in a phone number varies by country and depends on factors like population size and the need for unique numbers. For example, North America uses a 10-digit system with a 3-digit area code and a 7-digit local number whereas in countries like Australia Mobile numbers are 12 or 13 digits and India uses 10-digit numbers, including area codes.

While the Phone card has basic validation, it does not natively enforce specific digit limits (e.g., exactly 10 digits for Indian numbers).  We cannot restrict visitors' ability to enter the required number of numbers in accordance with your geographical standards, To handle this, you can implement a workaround using:

  • Plug (custom script-based validator)
  • Criteria Router (decision logic based on Plug output)

To validate the length of the phone number provided in the phone card, we can connect a script-based plug into the bot which can be configured to validate whether or not the phone number value entered in the phone card has a specific length. 

In the script-based plug, we configure both Input and Output parameters:

  • The Input parameter is set up to accept the phone number entered by the user.

  • The Output parameter is defined to return a text message based on the result of the validation.

This ensures that the phone number is validated through the script, and the corresponding validation message is sent back to the bot for further processing.




In the
script-based plug, we can incorporate a Deluge script to validate the length of the phone number obtained as an input parameter.

In this case, the script checks the length of the phone number and returns a text string as the output. This output is then stored as a context variable in the bot, which is subsequently used in the criteria router card to route users based on the returned value.

The output of the code will be “Please enter a valid 10-digit phone number” if the phone number entered by the visitor is not exactly 10 digits. Otherwise, it will display “Correct format.”






Sample Plug Code used for this case:

  1. info session;
  2. response = Map();
  3. if(session.containsKey("phone"))
  4. {
  5. if(session.get("phone").get("meta").get("phone").isEmpty() == false)
  6. {
  7. phone_raw = session.get("phone").get("meta").get("phone");
  8. }
  9. else
  10. {
  11. phone_raw = session.get("phone").get("value");
  12. }
  13. if(trim(phone_raw).len() == 10)
  14. {
  15. message = "Correct format";
  16. }
  17. else
  18. {
  19. message = "Please enter a valid 10-digit phone number";
  20. }
  21. }
  22. else
  23. {
  24. message = "Phone number not found in session";
  25. }
  26. response.put("message",message);
  27. return response;

As stated above, the output obtained from the plug, we map it to the Criteria Router where we define a rule to check if the output received is of the message '
Please enter a valid 10-digit phone number'.
 
If the Criteria Router rule is satisfied, then it is mapped to a message card(with display the output context of the plug code response to make the visitor understand the reason) and then, add a Go to card to Phone card again to collect the valid 10 digits number, unless the visitor add the valid 10 digits number this flow will repeat itself and once they add the proper 10 digit number, the flow is completed as the Criteria Router will route the flow to 'Not Matched' way which lead to the end card. 

Kindly find the complete implementation steps of this Zobot, for phone card validation, and it's working as mentioned above, along with the screenshots for your understanding below.

[Zobot Configurations Explained]


Zobot Configuration Screenshot 1:



Zobot Configuration Screenshot 2:



Zobot Configuration Screenshot 3:



Zobot Configuration Screenshot 4:



I hope this gives you a basic understanding of how you can handle such cases where you need validation to be done for the phone number input on the Phone card to avoid junk/spam inputs into your system.

You can look into the above-mentioned case, where I have explained it for the phone number card, and implement it accordingly based on your use-case with the help of your development team to build plug code.
 
If you would like to leverage your bot's functionality and avoid Junk/Spam leads. You can make use of the help document to create a plug and to verify the visitor's phone number by sending OTP to them.



Custom Solution Created by Prasannah | Zoho Partner Support

If you need any further clarifications, please don’t hesitate to contact partner-support@zohocorp.com

Additionally, we kindly ask all Europe and UK Partners to reach out to partner-support@eu.zohocorp.com

      Create. Review. Publish.

      Write, edit, collaborate on, and publish documents to different content management platforms.

      Get Started Now


        Access your files securely from anywhere

          Zoho CRM Training Programs

          Learn how to use the best tools for sales force automation and better customer engagement from Zoho's implementation specialists.

          Zoho CRM Training
            Redefine the way you work
            with Zoho Workplace

              Zoho DataPrep Personalized Demo

              If you'd like a personalized walk-through of our data preparation tool, please request a demo and we'll be happy to show you how to get the best out of Zoho DataPrep.

              Zoho CRM Training

                Create, share, and deliver

                beautiful slides from anywhere.

                Get Started Now


                  Zoho Sign now offers specialized one-on-one training for both administrators and developers.

                  BOOK A SESSION







                              Quick LinksWorkflow AutomationData Collection
                              Web FormsRetailOnline Data Collection Tool
                              Embeddable FormsBankingBegin Data Collection
                              Interactive FormsWorkplaceData Collection App
                              CRM FormsCustomer ServiceForms for Solopreneurs
                              Digital FormsMarketingForms for Small Business
                              HTML FormsEducationForms for Enterprise
                              Contact FormsE-commerceForms for any business
                              Lead Generation FormsHealthcareForms for Startups
                              Wordpress FormsCustomer onboardingForms for Small Business
                              No Code FormsConstructionRSVP tool for holidays
                              Free FormsTravelFeatures for Order Forms
                              Prefill FormsNon-Profit
                              Forms for Government
                              Intake FormsLegal
                              Mobile App
                              Form DesignerHR
                              Mobile Forms
                              Card FormsFoodOffline Forms
                              Assign FormsPhotographyMobile Forms Features
                              Translate FormsReal EstateKiosk in Mobile Forms
                              Electronic FormsInsurance
                              Drag & drop form builder

                              Notification Emails for FormsAlternativesSecurity & Compliance
                              Holiday FormsGoogle Forms alternative GDPR
                              Form to PDFJotform alternativeHIPAA Forms
                              Email FormsWufoo alternativeEncrypted Forms
                              Accessible FormsTypeform alternativeSecure Forms

                              WCAG

                                          Create. Review. Publish.

                                          Write, edit, collaborate on, and publish documents to different content management platforms.

                                          Get Started Now






                                                            You are currently viewing the help pages of Qntrl’s earlier version. Click here to view our latest version—Qntrl 3.0's help articles.




                                                                Manage your brands on social media

                                                                  Use cases

                                                                  Make the most of Zoho Desk with the use cases.

                                                                   
                                                                    

                                                                  eBooks

                                                                  Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho Desk.

                                                                   
                                                                    

                                                                  Videos

                                                                  Watch comprehensive videos on features and other important topics that will help you master Zoho Desk.

                                                                   
                                                                    

                                                                  Webinar

                                                                  Sign up for our webinars and learn the Zoho Desk basics, from customization to automation and more

                                                                   
                                                                    
                                                                  • Desk Community Learning Series


                                                                  • Meetups


                                                                  • Ask the Experts


                                                                  • Kbase


                                                                  • Resources


                                                                  • Glossary


                                                                  • Desk Marketplace


                                                                  • MVP Corner



                                                                    Zoho Sheet Resources

                                                                     

                                                                        Zoho Forms Resources


                                                                          Secure your business
                                                                          communication with Zoho Mail


                                                                          Mail on the move with
                                                                          Zoho Mail mobile application

                                                                            Stay on top of your schedule
                                                                            at all times


                                                                            Carry your calendar with you
                                                                            Anytime, anywhere




                                                                                  Zoho Sign Resources

                                                                                    Sign, Paperless!

                                                                                    Sign and send business documents on the go!

                                                                                    Get Started Now




                                                                                            Zoho TeamInbox Resources





                                                                                                      Zoho DataPrep Demo

                                                                                                      Get a personalized demo or POC

                                                                                                      REGISTER NOW


                                                                                                        Design. Discuss. Deliver.

                                                                                                        Create visually engaging stories with Zoho Show.

                                                                                                        Get Started Now










                                                                                                                              Wherever you are is as good as
                                                                                                                              your workplace

                                                                                                                                Resources

                                                                                                                                Videos

                                                                                                                                Watch comprehensive videos on features and other important topics that will help you master Zoho CRM.



                                                                                                                                eBooks

                                                                                                                                Download free eBooks and access a range of topics to get deeper insight on successfully using Zoho CRM.



                                                                                                                                Webinars

                                                                                                                                Sign up for our webinars and learn the Zoho CRM basics, from customization to sales force automation and more.



                                                                                                                                CRM Tips

                                                                                                                                Make the most of Zoho CRM with these useful tips.



                                                                                                                                  Zoho Show Resources