Earlier in the week I had to do a rather niche task with a local leasing company I work with. They have switched over to eLEAD CRM and as such wanted to convert all of their online lease quote request forms to submit to their new eLEAD CRM. This way requests from existing customers will automatically be assigned and recorded to their customer account; and new quote requests will automatically generate new prospects within the CRM system. Having done several of these implementations in the past I figured I would outline what it takes to take this on yourself.
For starters let’s define what ADF XML is. ADF stands forĀ Auto Data Format which is the standard data delivery format for the automotive industry. Using ADF XML leads and customer details can easily be imported/exported across a wide array of platforms and dealerships. You can read the v1.0 of the ADF XML specifications here.
Now that we got the pleasantries out of the way – let’s start doing some coding. We’ll need a form first which will collect the information from our customer. For the purposes of this tutorial I’ll use the following simple form, however any pre-existing form you have will work just fine.
Now let’s head over to our submission script, in this case I have it in a separate file called submitLead.php. I won’t go into detail here on the basics of sending out an email with PHP as I have described that in a separate tutorial here – alas the basis of this entire process is based on sending out an email via PHP so if you feel you need a refresher head back to that tutorial. Otherwise let’s collect our form variables and start building our ADF XML email.
In addition to gathering the usual POST information from our form we’re also going to need to create a few additional variables for our request id number, the eLEAD email address assigned to us, and the date of the request. For this tutorial I simply generated a number for each lead lead using mt_rand
.
Now that we have all the variables we will need setup, let's build the body of our email. The part that will actually be made up of ADF XML. All of the ADF XML emails you will be building will all always start off with the following lines:
Following that you will always need to specify a unique lead ID and a source for the lead. In my example I am listing my source as Lease Request Page.
$adfxml = ''; $sendelead = mail($eleadtrackemail, $adfsubject, $adfxml); '.$six_digit_random_number.' '.$currentdate.' '.$adfmake.' '.$adfmodel.' '.$fname.' '.$lname.' '.$adfemail.' '.$adfphone.' '.$commentsbox.' My Awesome Dealership Now take note that this is a very basic implementation and ADF XML offers alot more elements and has the ability to transmit additional information such as vehicle VIN numbers, odometer readings, and much more. A full write-up of of all the different elements is available here. At the end you're submit script will resemble the following:
'; $sendelead = mail($eleadtrackemail, $adfsubject, $adfxml); '.$six_digit_random_number.' '.$currentdate.' '.$adfmake.' '.$adfmodel.' '.$fname.' '.$lname.' '.$adfemail.' '.$adfphone.' '.$commentsbox.' My Awesome Dealership Now once you're form submission has processed simply head on over and login to eLEAD CRM and you'll see your new lease request within your mail inbox with a new prospect automatically assigned to the request.