This method allows the adding of customer data.
URL :
Input Parameters :
Form variable called : body
A sample body submission would look like this
<Params>
<SecurityData>
<AccessCode>ACCESS CODE HERE</AccessCode>
<DealerCode>DEALER CODE HERE</DealerCode>
</SecurityData>
<XMLData>
<CUSTOMER>
<CUSTID>12345</CUSTID>
<SALESPERSONNAME>Bob Monkston</SALESPERSONNAME>
<CUSTOMERTYPE>Retail</CUSTOMERTYPE>
<COMPANYNAME/>
<TITLE>Mr</TITLE>
<FIRSTNAME>Billy </FIRSTNAME>
<SURNAME>Jones </SURNAME>
<PHONENO>01234567890</PHONENO>
<MOBILE>987654321</MOBILE>
<WORKNO/>
<EMAIL>test@dealerhub.net</EMAIL>
<ADDRESS1>999 Windsor Rd</ADDRESS1>
<ADDRESS2>Prestwich </ADDRESS2>
<CITY>Manchester</CITY>
<COUNTY>Greater Manchester</COUNTY>
<POSTCODE>M25 0DR</POSTCODE>
<COUNTRY/>
<PREFCONTACT/>
<BESTCONTACTTIME>Mornings</BESTCONTACTTIME>
<DOB>23/03/1964</DOB>
<DPAPOSTAL>Y</DPAPOSTAL>
<DPATEL>Y</DPATEL>
<DPAEMAIL>N</DPAEMAIL>
<DPASMS>N</DPASMS>
<PREVCUST>0</PREVCUST>
<CHANGECYCLE>24 Months</CHANGECYCLE>
<MOC>Visit</MOC>
<SOE>Daily Mail</SOE>
<ADCAMPAIGN/>
<MONTHLYPAYMENT>0</MONTHLYPAYMENT>
<OWEAMOUNT>0</OWEAMOUNT>
<HOWFINANCED>Please Select</HOWFINANCED>
<ISCLEAD>0</ISCLEAD>
<MANUFACTURERSCLEADID></MANUFACTURERSCLEADID>
<NEXTVEHICLE>
<NEWUSED>NEW</NEWUSED>
<CAPCODE></CAPCODE>
<REGNO>NEW</REGNO>
<MAKE>Vauxhall</MAKE>
<MODEL>Astra</MODEL>
<DERIVATIVE>GTC</DERIVATIVE>
<FUEL>Petrol</FUEL>
<ENGINESIZE>2.0</ENGINESIZE>
<COLOUR>Gold</COLOUR>
<TRANSMISSION>Automatic</TRANSMISSION>
<DATEREQUIRED>05/05/2013 0:00:00</DATEREQUIRED>
<VIN>GHGHGYT76786786786</VIN>
<MILEAGE>123</MILEAGE>
<MODELYEAR>2013</MODELYEAR>
</NEXTVEHICLE>
<PRESENTVEHICLE>
<CAPCODE></CAPCODE>
<PRESREG>MM55FFV</PRESREG>
<PRESMODELYEAR>2005</PRESMODELYEAR>
<PRESMAKE> Mercedes-Benz</PRESMAKE>
<PRESMODEL>M Class Diesel Sw</PRESMODEL>
<PRESDERIVATIVE>ML320 CDI SE 5dr Tip Auto</PRESDERIVATIVE>
<PRESFUEL>Diesel</PRESFUEL>
<PRESMILEAGE>96999</PRESMILEAGE>
<PRESCOLOUR>Silver</PRESCOLOUR>
<PRESENGINENO>64294040047919</PRESENGINENO>
<PRESDATEOFREG>2005-05-12 0:00:00</PRESDATEOFREG>
<PRESTRANSMISSION>Automatic</PRESTRANSMISSION>
<PRESSERVICEHISTORY>Full Franchised</PRESSERVICEHISTORY>
<PRESOWNERS>1</PRESOWNERS>
<PRESTIV>15000</PRESTIV>
<PRESSIV>16000</PRESSIV>
<PRESREPAIRCOST>1000</PRESREPAIRCOST>
</PRESENTVEHICLE>
</CUSTOMER>
</XMLData>
</Params>
The sample above would return all the latest customers who have enquiried or been modified recently
Sample Return Content:
<XML VERSION=1.0 ENCODING=UTF-8>
<RESULTSET>
<MESSAGECODE>1000</MESSAGECODE>
<MESSAGETXT>RECORD INSERTED SUCCESSFULLY</MESSAGETXT>
</RESULTSET>
Breakdown of input field values
| Field Name |
Mand |
Type |
Field Description |
Example Data |
| Custid |
Y |
Numeric |
Your database ID number for this customer. If you pass
in a number we haven't seen before, we add the customer. If you pass
in a number we have seen before, we overwrite the details of that customer.
Please make sure you pass in unique numerical number for each new customer.
This number will be used to add activity as well. Please do not start
numbers with a zero. They will be stored in the database in a BITINT
field. Numbers are unique per dealer, so 12345 for example can be used
for dealer1 and dealer2 as we make unique using both the dealer code
and custID combination. |
12345 |
| Salespersonname |
N |
String |
The sales person name |
Jo Bloggs |
| CustomerType |
Y |
String |
Retail,Fleet,Motability,Business are all valid options
for this field |
Retail |
| CompanyName |
Y *2 |
String |
Name of the business (If a fleet customer) |
|
| Title |
N |
String |
Title of the customer |
Mr |
| Firstname |
N |
String |
Firstname of the customer |
Mike |
| Surname |
Y *2 |
String |
Surname of the customer |
Atkinson |
| PhoneNo |
N *3 |
String |
Customers phone number |
0113 000 0000 |
| Mobile |
N *3 |
String |
Customers Mobile number |
0700 000 00000 |
| WorkNo |
N *3 |
String |
Customers work number |
0113 123 4567 |
| Email |
N *3 |
String |
The customers email address |
test@autoslm.com |
| Address1 |
N *3 |
String |
The first line of the customers address |
2 Hill Top Road |
| Address2 |
N |
String |
The customers address |
Newmillerdam |
| City |
N |
String |
The customers city |
Wakefield |
| County |
N |
String |
The customers county |
Yorkshire |
| Postcode |
N *3 |
String |
The customers post code |
WF2 6PY |
| Country |
N |
String |
The customers country |
UK |
| PrefContact |
N |
String |
Whats the customers prefered method of contact |
Mobile |
| BestContactTime |
N |
String |
Whats the best time to call the customer |
Afternoon |
| DOB |
N |
Date |
The customers Date Of Birth |
23/03/1977 |
| DPAPostal |
N |
String |
Y = Yes you can contact, N = No you can't contact, default
is N |
Y |
| DPATel |
N |
String |
Y = Yes you can contact, N = No you can't contact, default
is N |
Y |
| DPAEmail |
N |
String |
Y = Yes you can contact, N = No you can't contact, default
is N |
Y |
| DPASMS |
N |
String |
Y = Yes you can contact, N = No you can't contact, default
is N |
Y |
| PrevCust |
N |
Numeric |
0 = not a previous customer, 1 = yes a previous customer |
0 |
| ChangeCycle |
N |
Numeric |
Number in months of how often they change their vehicle |
24 |
| MOC |
N |
String |
Method of Contact used when enquiring, i.e telephone, visit,
email |
Visit |
| SOE |
N |
String |
Source of Enquiry used when enquiring, i.e Newpaper, TV,
Radio ad |
Daily Mail Newspaper |
| AdCampaign |
N |
String |
AdCampaign used when enquiring, campaign name or campaign
code |
GM5678 |
| MonthlyPayment |
N |
Numeric |
The customers current monthly payment value |
234 |
| OweAmount |
N |
Numeric |
The amount the customer owes on their current vehicle |
3400 |
| HowFinanced |
N |
String |
How will the new vehicle be financed, e.g cash, bank finance,
dealer arranged finance, PCP, HP |
HP |
| IsClead |
N |
Numeric |
Is this a central lead, 0 = No, 1 = Yes |
0 |
| ManufacturersCleadID |
N |
String |
The manufacturers central lead number (if applicable) |
|
| NewUsed |
Y |
String |
Is it a NEW or USED vehicle |
NEW |
| CAPCODE |
N *2 |
String |
Capcode of the enquiry vehicle |
|
| RegNo |
N |
String |
Registration number (if applicable) |
|
| Make |
N *1 |
String |
Manufacturer name |
Vauxhall |
| Model |
N *1 |
String |
Model Name |
Adam |
| Derivative |
N |
String |
Derivative Name |
Jam 1.2i 16V VVT |
| Fuel |
N |
String |
Fuel type |
Petrol |
| EngineSize |
N |
String |
Engine Size |
1.2 |
| Colour |
N |
String |
Colour |
Purple |
| Transmission |
N |
String |
Transmission |
Manual |
| DateRequired |
N |
Date |
Date the customer requires the vehicle for |
12/04/2013 |
| VIN |
N |
String |
VIN number of the next vehicle |
VH56756FGFGH56GG |
| Mileage |
N |
Numeric |
Mileage if a used vehicle |
0 |
| ModelYear |
N |
Numeric |
Model Year of the enquiry vehicle |
2013 |
| CAPCODE |
N *2 |
String |
Capcode of the enquiry vehicle |
|
| PresReg |
N |
String |
Registration number of the present vehicle |
N206 HUA |
| PresModelYear |
N |
Numeric |
Model Year of the present vehicle |
1995 |
| PresMake |
N |
String |
The manufacturer name of the part exchange vehicle |
Ford |
| PresModel |
N |
String |
Model name of the customers present vehicle |
Fiesta |
| PresDerivative |
N |
String |
Derivative name |
1.0 Ghia |
| PresFuel |
N |
String |
Fuel type |
Petrol |
| PresMileage |
N |
String |
Mileage of the present vehicle |
78000 |
| PresColour |
N |
String |
Colour of the present vehicle |
Red |
| PresEngineNo |
N |
String |
Engine No of the present vehicle |
GH66757777dGFH |
| PresDateOfReg |
N |
Date |
Date the present vehicle was registered |
12/05/1995 |
| PresTransmission |
N |
String |
Transmission type |
manual |
| PresServiceHistory |
N |
String |
Service History information |
None |
| PresOwners |
N |
Numeric |
How many present owners of the vehicle |
4 |
| PresTIV |
N |
Numeric |
TIV = Trade In Value |
300 |
| PresSIV |
N |
Numeric |
SIV = Stand in Value |
500 |
| PresRepairCost |
N |
Numeric |
Repair Cost to get the vehicle saleable |
200 |
Y *2 = This is a mandtory field, but only dependant on the customer type
your enter. If you enter a customertype=retail value, then surname is mandatory
and companyname is not mandatory. If you enter customertype=fleet, then companyname
is mandatory and surname is not mandatory.
N *1 = This is not a mandatory field if there is a CAPCODE passed, but
you do not pass a CAPCODE, then Make and Model become mandatory
N *2 - If you pass in a capcode then you do not need to fill in any values
for the N *1 marked fields in next enquiry vehicle as the capcode will overwrite
any other values
N * 3 These fields are not mandatory, but we do require at least 1 contact method
for the customer. So this can be either a phone no / email or address
Example output for a valid call:
<?xml version="1.0" encoding="UTF-8"?>
<ResultSet>
<MessageCode>1000</MessageCode>
<Messagetxt>Record Inserted Successfully</Messagetxt>
</ResultSet>
|
Example output for an invalid call / or general error in a webservice call
<?xml version="1.0" encoding="UTF-8" ?>
<ResultSet>
<Error>
<ErrorCode>2</ErrorCode>
<ErrorInfo>No data found </ErrorInfo>
</Error>
</ResultSet> |
There may be multiple errors returned in the XML packet, they are separated by <Error> blocks and each block contains an ErrorCode to allow you to do some processing logic on the numerical value returned, and an ErrorInfo which is used by the developer or administrator to visually see what the problem is with the submission.