Activate SalesIQ via Command line

Steps to activate Zoho SalesIQ Plugin on your Website via Command line

Requirements

  • You should have a Windows OS Machine installed with PowerShell that contains SharePointPnPPowerShellOnline package
  • If not, you can also install using the command.
Command : Install-Module SharePointPnPPowerShellOnline

  • Step 1: Connect your SharePoint website via command-line.

    Note: Zoho SalesIQ's live chat and tracking will be enabled only for the links that are provided in the command-line. For example: If you have given the link as "http://zylker.com" then the live chat and tracking will be enabled only on the home page. If you wish to add to all the pages in the website then you should be following the same procedure to add SalesIQ to that pages as well.

Connect-PnPOnline -Url https://****.sharepoint.com

  • Step 2: A pop-up window appears prompting you for your website credentials to connect SharePoint online. Provide a valid User name and Password, and click Ok to proceed.

  • Step 3: You will be successfully logged into your website. You should run another command to inject the Zoho SalesIQ code to your website.
    • Copy the code given below and paste it in your command-line, now you should replace the Zoho SalesIQ website widget code that is unique to your website. Add-PnPCustomAction -ClientSideComponentId "9a33c707-89fb-4032-a9e3-d7b9e4f57c90" -Name "zohosalesiq" -Title "zohosalesiq-client-side-solution" -Location ClientSideExtension.ApplicationCustomizer -ClientSideComponentProperties: '{"widgetCode":" window.$zoho = window.$zoho || {}; $zoho.salesiq = $zoho.salesiq || { widgetcode: \"3d1464274e6eba67e5f1800ea1783ca81b17e297c43db48052436c41b8a73e2f\", values: {}, ready: function () { } }; var d = document; var s = d.createElement(\"script\"); s.type = \"text/javascript\"; s.src = \"https://salesiq.zoho.com/widget/\"; s.defer = true;\n s.id=\"zsiqscript\" ; var t = d.getElementsByTagName(\"script\")[0];t.parentNode.insertBefore(s,t);"}' -Scope site

       

      To get your Zoho SalesIQ website's widget code:

      • Login to your Zoho SalesIQ Operator console.
      • Navigate to Settings -> Websites, click on the name of the website you are attempting to include in a page.
      • Select Live Chat. In the Installation section, copy the widget code alone and replace the your-widget-code in the given command-line. Also, do not remove the slash (\) behind the code.

  • You can also use the JS-API scripts available in Zoho SalesIQ, for which you can replace the script in the JS-API-functions inside the code. For example: I've used the JSAPI script  to get the visitor name in the reference screenshot. 

    Note: The JSAPI functions that you use must be appropriately parsed in-order to reflect successfully in SharePoint.

  • Refresh the SharePoint website, you can view the SalesIQ live chat widget popped-up on your website.

Note: To receive live chat notifications you should be logged in to https://www.zoho.com/salesiq/

Share this post : FacebookTwitter

Still can't find what you're looking for?

Write to us: support@zohosalesiq.com