Call Now API For SaaS Developers

5 mins read

Automated qualification of leads from your website and social campaigns...

Call Now API For SaaS Developers

Lucep is an instant call back tool that helps capture, call and convert website visitors into customers. The Lucep widget and mobile app duo push down leads directly from the website to the phones of the right sales team member.

Smarter lead allocation helps users respond instantly, which in turn increases lead generation and online conversions. Lucep users show instant improvements of up to 400% in lead generation, and over 72% more lead conversions.

In many cases, the Lucep tool becomes the primary source of lead generation on websites.

Lucep Call Now API Docs for SaaS Developers

You can go through the full Lucep call now API docs. If you need any help, feel free to use the Lucep widget below to request a call back.

You may load the JavaScript library in two ways, depending on your site and expected user interaction.

Load Call Now JS Library as a Dynamic Script

Dynamic loading is the default if page loading speed is a high priority. Use the following snippet to load the library as a dynamic script. It is downloaded in parallel with other page content, and does not prevent other scripts or objects being loaded before it.

Where the functionality of the page does not depend on the library being immediately available, this is usually a good option. It also has the upside of not needing a separate call to an init method.

Once the library has loaded successfully, it will fire the event “lucep-library-ready”, which is an opportune place to either fire any other dependent scripts, or bind buttons with events. More details on how to work with the custom event are available below.

Include Call Now JS Library in the Header

Including the Lucep JS library in the header is easier and guarantees that it is available on the page to every script called after it. The downside is that it blocks the rest of the page load while the browser is downloading this script. This page loading delay is usually seen only seen once for each user, since the browser will cache it for subsequent loads – and is not really expected to have much impact (however, it is worth checking the difference to your site using something like Google PageSpeed)

To include the script in the page header, simply add this between the tags:

Note that by including it in the header this way, configuration of the library through use of the init function will be required.

Initializing the Lucep Library if included in the Header

The Lucep library must be initialized before it can be used, by providing the account name with which it should be used.

$lucep.init( { domain: YOUR-TEAMNAME-HERE } );

The init function can be called repeatedly without any adverse impact, as only the first call is processed.

Once the init method is fired, all of the other library methods can be used. It is recommended that the init function be fired as early as possible, as this will reduce the wait time needed for other functions to complete.

Build Channels

Two channels are actively maintained, as follows:

Stable: The stable channel contains the most thoroughly tested and reliable version of the library. It is updated more slowly, but only updated when backward compatibility is assured and has been tested as a working library.

The stable library is available here: https://8d69a4badb4c0e3cd487-efd95a2de0a33cb5b6fcd4ec94d1740c.ssl.cf2.rackcdn.com/js/L.SalesGorilla.stable.latest.min.js

Bleeding: The bleeding channel contains builds that can be considered as being in the middle of development. New features are added to this library on an ad hoc basis, but they may not be fully functional, may not even be documented, and you may run the risk of breaking other functionality.

Some of these features may never make it over to the stable channel. It is really only recommended for developers who want to learn more about how Click to Call Now works, and to get a peek under the hood to see what’s coming next.

The bleeding library is available here: https://8d69a4badb4c0e3cd487-efd95a2de0a33cb5b6fcd4ec94d1740c.ssl.cf2.rackcdn.com/js/L.SalesGorilla.bleeding.latest.min.js

How to Make Sure the Library is Loaded

Depending on how you include the library, it may be necessary to check if it is available before performing any subsequent actions.

Listening for the library announcement

The Lucep library will announce it is available by firing the event lucep-library-ready on the document, so it is possible to create an event listener for this:

document.addEventListener(“lucep-library-ready”, function(){< //the library is ready, do something here }, false);

NOTE: This is not compatible with browsers IE9 and prior. Please check compatibility with your target browsers.

Checking for Object Existence

Checking if Lucep is available as an object is a simple and effective way to validate that the library is available for use. This is how you do it:

if (typeof $lucep != ‘undefined’) { //the library is available, do something }

The Combined Approach to Call Now Library

There is also a combined approach to work with the Lucep library. A reliable way to work with the library is to combine these two ways of checking for the availability of the library:

if (typeof $lucep != ‘undefined’){ //launch your custom event } else { document.addEventListener(“lucep-library-ready”, function(){ //launch your custom event }, false); }

lucep.init ( params )

This method can be invoked multiple times – however only the variables passed in the first call are considered. All other subsequent calls are ignored.

params should be a JavaScript object with the following properties:

lucep api table

lucep.raise_lead ( params )

Immediately raises a lead to the appropriate team based on the service_id supplied. Notifications are pushed directly to the relevant users as defined in the Lucep console.

Again, params should be a JavaScript object with the following properties:

lucep callnow api docs 2

Again, you can go through the full Lucep call now API docs. Need any help or support integrating Lucep with your SaaS tool or software? Want us to take you through it step by step? Use the Lucep widget, and talk to us right now.

By Zal Dastur

April 19th, 2017

Want to find out more about how to digitally transform your business?
Enter your name and number below: