• Resolved estradas

    (@estradas)


    I am trying to add a zoho API on my website, where if a user/client is logged in and they send a message with the zoho chat they won’t have to fill in the fields of the chat; it would automatically do it for them – just because they are logged in.

    I know I need to create a fetch call from my database but I haven’t been able to figure out where to place the API zoho supplied. Any help?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author zohosalesiq

    (@zohosalesiq)

    Hello!

    Greetings from Zoho SalesIQ team.

    In order for you to pass the information of a visitor like name, email, phone etc. from your website login/database to SalesIQ, you need to use the SalesIQ API’s provided below.

    $zoho.salesiq.visitor.name(“<Name>);
    $zoho.salesiq.visitor.email(“<Email>”);
    $zoho.salesiq.visitor.contactnumber(“< NUMBER >”);

    Sample Implementation:

    <script>
    $zoho.salesiq.ready=function()
      {
                  $zoho.salesiq.visitor.name("John Smith");
                  $zoho.salesiq.visitor.email("[email protected]");
                  $zoho.salesiq.visitor.contactnumber("1-541-754-3010");
      }
    </script>

    These API’s will automatically fetch the information from the logged in customers and auto-populate it in the SalesIQ pre-chat form.

    You can paste these API’s right below the SalesIQ code in your website for it to take effect. However, please note API’s will not be supported in the SalesIQ plugin in WordPress. If you are using the SalesIQ plugin in the WordPress, please deactivate it and paste the SalesIQ code along with the above API’s directly in the header.php or footer.php file.

    You can go to Appearance -> Themes -> Header.php or Footer.php -> Paste the SalesIQ code along with the API’s in between the <body> and </body> tags.

    Regards,
    Aslam
    Zoho SalesIQ

    Thread Starter estradas

    (@estradas)

    Hi Aslam,

    I got in the theme’s footer now and it works perfectly, though it has the fields you have on the code, John Smith…. How can I make the fields be to the person that is signed in?

    I just tried under incognito and its showing the fields you have in the sample – I also tried ” <name> ” it loads that exactly.

    • This reply was modified 4 years, 10 months ago by estradas.
    Plugin Author zohosalesiq

    (@zohosalesiq)

    Hello!

    The values like “John Smith” and “Name” which we provided in the API are the samples. If you looking to pass the information from your website or database into SalesIQ dynamically, you have to pass the value from your own database or website instead of “John Smith” or “Name” in the API.

    For eg, if you are using the WordPress login system, the value will be like this

    <?php
             $current_user = wp_get_current_user();		
    ?>

    Please find the sample scripts below

    Sample Implementation

    $zoho.salesiq.visitor.name("<?php echo $current_user->user_login; ?>");		
    $zoho.salesiq.visitor.email("<?php echo $current_user->user_email; ?>"); 

    This will dynamically pass the visitors information to SalesIQ as soon as the visitor logs into the website.

    Regards,
    Aslam
    Zoho SalesIQ

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘API call with Zoho SalesIQ chat’ is closed to new replies.