Sending Email in an ADF XML format to ELEAD CRM.

Share this post on:

In the automotive field, ADF XML is considered the standard data delivery format. In this process, emails are sent in a definitive XML pattern to the CRMs. On the CRMs’ side, like ELEAD, etc., there is a qualified programming code to extract the information from this XML. In this tutorial, I am going to show you what this ADF Format is likely about, how we can send an email in this format using PHP, how it is collected by a popular CRM, ELEAD, and I will also tell you how you can implement the same functionality in Joomla.

Folowing is a standard XML format for sending an automotive lead.

<?xml version="1.0" encoding="UTF-8"?>
  <?ADF VERSION="1.0"?>
    <adf>
      <prospect>
        <id sequence="yourLeadID" source="site name"></id>
        <requestdate>2013-03-15T8:22:40</requestdate>
        <vehicle interest="buy" status="used">
        <vin>4RT6FGE6HJ78F3DF56</vin>
        <year>2013</year>
        <make>Ford</make>
        <model>Ford Focus</model&gt
        <stock>4321</stock>
        </vehicle>
    
      <customer>
        <contact>
        <name part="first" type="individual">John</name>
        <name part="last" type="individual">XYZ</name>
        <email>john at example.com</email>
        <phone type="home">111-222-7777</phone>
        <phone type="mobile">111-444-5555</phone>
        <phone type="work">111-222-3333</phone>
        </contact>
        <comments>Inquiry regarding vehicle</comments>
      </customer>
 
      <vendor>
       <contact>
       <name part="full">website name from where you are sending email</name>
       <email>john at example.com</email>
       <phone type="business">111-666-7777</phone>
       </contact>
     </vendor>
 </prospect>
</adf> 

Sending an email through php.

I am assuming that you have setup a complete form and now you are fetching the form values through “POST”.

<?php
$fname = $_POST['FirstName'];
$lname = $_POST['LastName'];
$email = $_POST['Email'];
$home = $_POST['PhoneHome'];
$work = $_POST['PhoneWork'];
$mobile = $_POST['PhoneMbile'];
$msg = $_POST['msg'];

$vin = $_POST[‘vin’];
$year = $_POST[‘year’];
$make = $_POST[‘make’];
$model = $_POST[‘model’];
$stock = $_POST[‘stock’];
$currentdate = date();

$businessname = $_POST[‘businessname’];
$businessemail = $_POST[‘businessemail’];
$businessphone = $_POST[‘businessphone’];

$to = “xxxxxxxx@eleadtrack.net”;
$subject = “This is subject”;
$message = ‘<?xml version=”1.0″ encoding=”UTF-8″?>
<?ADF VERSION=”1.0″?>
<adf>
<prospect>
<id sequence=”uniqueLeadId” source=”sitename”></id>
<requestdate>’.$currentdate.'</requestdate>
<vehicle interest=”buy” status=”used”>
<vin>’.$vin.'</vin>
<year>’.$year.'</year>
<make>’.$make.'</make>
<model>’.$model.'</model>
<stock>’.$stock.'</stock>
</vehicle>
<customer>
<contact>
<name part=”first” type=”individual”>’.$fname.'</name>
<name part=”last” type=”individual”>’.$lname.'</name>
<email>’.$email.'</email>
<phone type=”home”>’.$home.'</phone>
<phone type=”work”>’.$work.'</phone>
<phone type=”mobile”>’.$mobile.'</phone>
</contact>
<comments>’.$msg.'</comments>
</customer>
<vendor>
<contact>
<name part=”full”>’.$businessname.'</name>
<email>’.$businessemail.'</email>
<phone type=”business”>’.$businessphone.'</phone>
</contact>
</vendor>
</prospect>
</adf>’;

$mail = mail ($to, “”, $message);
?>

You can use the same code in joomla to send email by using RSForms, like

$frm = $_POST[‘form’];

$fname = $frm[‘FirstName’];  and so on

After sending the form and executing the above code, the email will be send to ELEAD CRM. To check it, first login.
ADF XML Login Screen

After logging in, click on the + sign on the left of the inbox. Now you will see three options there. Your new lead email will be collected on the “New Leads” page, and the emails with no definite pattern will be saved in the “unmatched” email section.

Check emails with ADF XML Format

If you are working in Java, you can instead use a library to automate and streamline this operation. JavaMail and Apache Commons Email are two prominent libraries for sending email in Java. They enable you to build and send emails programmatically.

It is important to remember that some email clients may not allow attachments with the .xml extension; thus, it is best to validate the best way to send this ADF XML file to the receiving end.

Author: Nohman Habib

I basically work in the CMS, like Joomla and WordPress and in framework like Laravel and have keen interest in developing mobile apps by utilizing hybrid technology. I also have experience working in AWS technology. In terms of CMS, I give Joomla the most value because I found it so much user freindly and my clients feel so much easy to manage their project in it.

View all posts by Nohman Habib >

Leave a Reply

Your email address will not be published. Required fields are marked *

PHP Code Snippets Powered By : XYZScripts.com