Auto-fill the chat window fields with the procured form data

Auto-fill the chat window fields with the procured form data

Save the time that your visitors spend on filling the fields in the chat window while trying to initiate a chat with the operators of your firm,

Say you own an e-commerce page, you obviously would have procured prime particulars of the visitors visiting your page via a sign up form, then why not retrieve it and utilize it instead of prompting the visitors to enter their name, email address and contact number over and over again?

Shall we just consider a quick and simple example on how to use the following JS APIs to get your job done?

  • $zoho.salesiq.visitor.name();

  • $zoho.salesiq.visitor.email();

  • $zoho.salesiq.visitor.contactnumber();  

Say you create a sign up form prompting for the following particulars,

  1. <form id="myForm" action="/shop.html" method="post">

  2. First name: <input type="text" name="fname"><br>

  3. email: <input type="text" name="email"><br>

  4. Phone: <input type="number" name="phone"><br>

  5. <input type="submit" value="Submit" onclick="myFunction()">

  6. </form> 

Okay now say you have procured the details, how do I retrieve it and use it?

  1. <script>

  2. function myFunction() {

  3. var x = document.getElementById("myForm").elements[0].value;

  4. var y = document.getElementById("myForm").elements[1].value;

  5. var z = document.getElementById("myForm").elements[2].value;

  6. $zoho.salesiq.visitor.name(x);

  7. $zoho.salesiq.visitor.email(y);

  8. $zoho.salesiq.visitor.contactnumber(z);

  9. }

  10. </script> 

Once the method "ready()" inside the Zoho SalesIQ widget code is called, the values retrieved will be captured and will be set in the configured fields in the visitor chat window, 

  1. <script type="text/javascript"> 

  2. var $zoho=$zoho || {};$zoho.salesiq = $zoho.salesiq || 

  3. {widgetcode:"6369d474198d4fc9604656182c9c4e3ee6da94a87bb0400877114fe25f2803f64c9df2e59248c8d7bfee986a890ef9d0", 

  4. values:{},ready:function(){}};var 

  5. d=document;s=d.createElement("script");s.type="text/javascript";s.id="zsiqscript"; 

  6. s.defer=true;s.src=" ]; 

  7. t.parentNode.insertBefore(s,t);d.write("<div id='zsiqwidget'></div>"); 

  8. $zoho.salesiq.ready=function(embedinfo) 



  9. $zoho.salesiq.visitor.name(); 

  10. $zoho.salesiq.visitor.email(); 

  11. $zoho.salesiq.visitor.contactnumber(); 



  12. </script> 

If you are not ready to get all geeky and use JS APIs to get your job done, you can also use Zoho SalesIQ's auto-pick mechanism to
achieve the same results ,
  1. <form id="myForm" action="/shop.html" method="post">

  2. First name: <input type="text" name="name" siqatrib="name"/><br>

  3. email: <input type="text" name="email" siqatrib="email"/><br>

  4. Phone: <input type="number" name="phone" siqatrib="phone"/><br>

  5. <input type="submit" value="Submit" onclick="myFunction()">

  6. </form> 


                                          

Hope this was helpful and comprehensible! Thanks for sticking around!

Fond regards,
Bala






      Zoho Developer Community









                                Zoho Desk Resources

                                • Desk Community Learning Series


                                • Digest


                                • Functions


                                • Meetups


                                • Kbase


                                • Resources


                                • Glossary


                                • Desk Marketplace


                                • MVP Corner


                                • Word of the Day



                                    Zoho Marketing Automation


                                            Manage your brands on social media



                                                  Zoho TeamInbox Resources

                                                    Zoho DataPrep Resources



                                                      Zoho CRM Plus Resources

                                                        Zoho Books Resources


                                                          Zoho Subscriptions Resources

                                                            Zoho Projects Resources


                                                              Zoho Sprints Resources


                                                                Qntrl Resources


                                                                  Zoho Creator Resources



                                                                    Zoho WorkDrive Resources



                                                                      Zoho Campaigns Resources


                                                                        Zoho CRM Resources

                                                                        • CRM Community Learning Series

                                                                          CRM Community Learning Series


                                                                        • Tips

                                                                          Tips

                                                                        • 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