It has been a trial trying to get leads captured from a Joomla site into vTiger CRM using Chronoforms. However with the assistance of Akerman and DigitalBuz and lots of perseverance, that problem has been resolved.
In order to get this working, you must be very careful with what you type. A capital letter in the wrong place could just be the thing that creates frustration and causes many hours of pain. As I write this, my aim is to make it as simple as possible especially for those of us who are not remotely experienced in CURL or PHP or CSS.
I will split this instruction in two areas: vTiger and Chronoforms for Joomla. Should you find any area of the instructions incomplete or not clear, please do let me know as I would certainly like to improve on this document.
Setting up vTiger 5.1
- If you have not installed vTiger, please do so. Instructions on installation of vTiger can be found on vTiger website.
- Login to your vTiger
- Go to Settings->Module Manager
- Scroll down until you see Webforms. Make sure it is ticked (green tick in the column).
Now, you will need to make some changes to the Webforms.config.php file. You will find this file in your vTigercrm/modules/Webforms directory. You can use FTP or any other file manager software that you are familar with to download this file to your local hard drive. Make the following changes:
$enableAppKeyValidation = true;
- make sure this is set to true
$defaultUserName = ‘admin’;
- set this to ‘admin’ userid
$defaultUserAccessKey = ’04eDyJA2Vqqjv7Ra’;
For this, login as admin in vTiger, click on My Preferences on the top right. Find the Access Key which is under the User Advanced Option Block. Copy that field information here.
$defaultOwner = ‘standarduser’;
- Set this to one of your users in the vTiger system. Standarduser is one of the default account that vTiger sets up for you. You can leave it at standarduser if you do not wish to make a change.
- $successURL = ”;
- $failureURL = ”;
- if you wish to have custom fields, then you will have to add that to your Lead Module. (I will at this stage assume that you know how to add custom fields in a module. If you need instructions on that please email me.)
After creating your fields, you will need to find out the names of these fields so that you can map them to your Chronoform. To find out the names of the fields, use phpMyAdmin.
- Look for the table vtiger_leadscf. This is the table that will store all the custom fields for your lead module.
- The names of the fields will be something like cf_568 etc.
- Take down the names and make sure you know what they are used for. The fields are created in the order of which you added them.
- IMPORTANT: If you have created a pick list for one of your custom fields, copy down the exact spelling of those values. This is because you need to match these values to those that you create in your Chronoform form later on.
Setting up Chronoform
- You can download Chronoform from here.
You can create a form by using the wizard or manual creation. You may use any of the functionality in Chronoform when creating your forms. However, you need to consider the following in order to make your form work with vTiger:
- You must have a Last Name field
- You must have a Company field. If you do not wish to have this, you will have to default this to a value as vTiger requires this field
- You must have a Assigned User Id. Normally you would preset this in the CURL portion where the user id will be set to the admin or any valid user id in vTiger
- If you create any drop down values, make sure the values are spelt exactly the same as they have been created in vTiger
Use CURL to map the fields from Chronoform to vTiger
Goto Chronoforms in Joomla administrator. Click on your form. Then click on Plugin tab and click on the green check next to CURL. This will change your CURL option from RED to GREEN like below:
- Click on save to save the changes made.
The next step is to configure the CURL. Select your form and click on CURL on the left hand side as shown below:
Now you will need to map the fields from Chronoform to vTiger. An example is shown below:
- The field names on the left are from Chronoform. The ones on the right are from vTiger.
- From the above, you can see that cf_569 and cf_568 are the custom fields that has been created in vTiger.
- Make sure the field names are spelt correctly. If there is a capital letter, then make sure you use it accordingly. If it is not spelt exactly like how it is in vTiger, then the system will not work.
- Extra fields Data area is used to send data that is required by vTiger but not required for a user to enter in the form.
- The first one, moduleName is required. Again, make sure it is spelt exactly as shown here. Otherwise the integration will not work.
- The second one, assigned_user_id is also required. You need to assign it to one of the value user id in vTiger.
- The third one, appKey is also required. You can get this key from config.inc.php (found in your vtigercrm directory) under the field $application_unique_key.
- Optional: vTiger also has an option to capture where the lead originates from. So you might want to add leadsource=Web Site to this section.
- Finally, click on CURL Params and put in the link to your webforms post module under your vTiger installation. The syntax would be http://yourdomain/modules/Webforms/post.php. Please change yourdomain to your actual domain where your vTiger is installed.
That’s it. At this point you should be ready to test your form and integration to vTiger.