5 min read

 

vtiger CRM Beginner’s Guide

vtiger CRM Beginner's Guide

Record and consolidate all your customer information with vtiger CRM   

To go through the exercises in this article, you’ll need basic knowledge of HTML. If you already understand basic web development concepts, then you’ll also be well prepared to delve into vtiger CRM’s API.

The vtiger CRM API

For you developers out there, all of the ins and outs of vtiger CRM’s API are fully documented at http://api.vtiger.com. For those of you not familiar with API’s, API stands for Application Programming Interface. It’s an interface for computers rather than humans.

What does the API do?

To illustrate—you can access the human interface of vtiger CRM by logging in with your username and password. The screens that are shown to you with all of the buttons and links make up the human interface. An API, on the other hand, is an interface for other computers. Computers don’t need the fancy stuff that we humans do in the interface—it’s all text.

What is the benefit of the API?

With an API, vtiger allows other computer systems to inform it and also ask it questions. This makes everyone’s life easier, especially if it means you don’t have to type the same data twice into two systems.

Here’s an example. You have a website where people make sales inquiries and you capture that information as a sales lead. You might receive that information as an email. At that point you could just leave the data in your email and refer to it as needed (which many people still do) or you could enter it into a CRM tool like vtiger so you can keep track of your leads.

You can take it one step further by using vtiger’s API. You can tell your website how to talk to vtiger’s API and now your website can send the leads directly into vtiger, and…Voila! When you log in, the person who just made an inquiry on your website is now a lead in vtiger.

Sending a lead into vtiger CRM from your website

Well, what are we waiting for?! Let’s give it a try. There is a plugin/extension in vtiger called Webforms and it uses the vtiger API to get data into vtiger. In the following exercises, we’re going to:

  • Configure the Webforms plugin
  • Create a webform on your company website

IMPORTANT NOTE: If you want to be able to send leads into vtiger from your website, your vtiger installation must be accessible on the Internet. If you have installed vtiger on a computer or server on your internal network, then you won’t be able to send leads into vtiger from your website, because your website won’t be able to connect with the computer/server that vtiger is running on.

Time for action – configuring the Webforms plugin

OK, let’s roll up our sleeves and get ready to do a little code editing. Let’s take a look first:

  1. Let’s navigate to the Webforms configuration file in vtigercrm/modules/Webforms/Webforms.config. php
  2. Let’s open it up with a text editor like Notepad. Here’s what it might look like by default:

    /*+**************************************************************
    *******************
    * The contents of this file are subject to the vtiger CRM Public
    License Version 1.0
    * (“License”); You may not use this file except in compliance
    with the License
    * The Original Code is: vtiger CRM Open Source
    * The Initial Developer of the Original Code is vtiger.
    * Portions created by vtiger are Copyright (C) vtiger.
    * All Rights Reserved.
    *****************************************************************
    *******************/

    $enableAppKeyValidation = true;
    $defaultUserName = ‘admin’;
    $defaultUserAccessKey = ‘iFOdqrI8lS5UhNTa’;

    $defaultOwner = ‘admin’;
    $successURL = ”;
    $failureURL = ”;

    /**
    * JSON or HTML. if incase success and failure URL is NOT
    specified.
    */
    $defaultSuccessAction = ‘HTML’;

    $defaultSuccessMessage = ‘LBL_SUCCESS’;

    ?>

    
    
  3. We have to be concerned with several lines here. Specifically, they’re the ones that contain the following:
    • $defaultUserName: This will most likely be the admin user, although it can be any user that you create in your vtiger CRM system.
    • $defaultUserAccessKey: This key is used for authentication when your website will access vtiger’s API. You can access this key by logging in to vtiger and clicking on the My Preferences link at the top right. It needs to be the key for the username assigned to the $defaultUserName variable.
    • $defaultOwner: This user will be assigned all of the new leads created by this form by default.
    • $successURL: If the lead submission is successful, this is the URL to which you want to send the user after they entered their information. This would typically be a web page that would thank the user for their submission and provide any additional sales information.
    • $failureURL: This is the URL which you want to send the user if the submission fails. This would typically be a web page that would say something like, “We apologize, but something has gone wrong. Please try again”.
  4. Now you’ll need to fill in the values with the information from our own installation of vtiger CRM.
  5. Save the Webforms.config. php and close it. We’ve finished completing the configuration of the Webforms module.

What just happened?

We configured the Webforms module in vtiger CRM. We modified the Webform plugin’s configuration file, Webforms.config.php. Now the Webforms module will:

  • Be able to authenticate lead submissions that come from your website
  • Assign all new leads to the admin user by default (you’ll be able to change this)
  • Send the user to a thank you page, should the lead submission into vtiger succeed
  • Send the user to an “Oops” page, should the lead submission into vtiger fail

 


Subscribe to the weekly Packt Hub newsletter. We'll send you the results of our AI Now Survey, featuring data and insights from across the tech landscape.

* indicates required