Sending Email in an ADF XML format to ELEAD CRM.

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.

Add a Comment

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

ABOUT CODINGACE

My name is Nohman Habib and I am a web developer with over 10 years of experience, programming in Joomla, Wordpress, WHMCS, vTiger and Hybrid Apps. My plan to start codingace.com is to share my experience and expertise with others. Here my basic area of focus is to post tutorials primarily on Joomla development, HTML5, CSS3 and PHP.

Nohman Habib

CEO: codingace.com

Request a Quote









PHP Code Snippets Powered By : XYZScripts.com