





















































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.
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.
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.
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.
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:
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.
OK, let's roll up our sleeves and get ready to do a little code editing. Let's take a look first:
<?php
/*+**************************************************************
*******************
* 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';
?>
We configured the Webforms module in vtiger CRM. We modified the Webform plugin's configuration file, Webforms.config.php. Now the Webforms module will: