Online Sales 360 Enquiry from Web Service

Top  Previous  Next

A Sales Enquiry can be created from a web service very easily.  

 

This uses a Transactional Web Service using a method name of WEBT_SALES_LEAD_CREATE and the following parameters :-

 

Field Name

Description

Mandatory

Notes

Team

Sales Team

Yes

This is the Team No in Navigator to direct the enquiry to.  Sales staff can be assigned to Teams.

LeadType

Type of Lead

No

This is the Type of Lead (eg online, walk in, exhibition etc) - it should be text which matches the list setup in Navigator

LeadSource

Source of the Lead

No

This is the Lead Source (eg Web Site, Advert etc) and should matxh the list setup in Navigator

LeadSubSource

Sub Source of the lead

No

This is the Lead Sub Source (eg if Advert is the LeadSource this may be the advertising publication eg Local Paper)

Title

Customer Title

No

Customer Title, ef Mr, Miss, Mrs

FirstName

Customer First Name or Initials

No


Surname

Customer Surname

No


Address1

Address Line 1

No


Address2

Address Line 2

No


Address3

Address Line 3

No


Address4

Address Line 4

No


Address5

POST CODE

No


Notes

Notes

No

This should contain any notes and any information that isn't able to be sent elsewhere - for example customer comments or extra information

Email

Email

No

Customer Email address - whlst not mandatory, either an email or a phone no should be present

Telephone

Telephone No

No


WorkNo

Work Phone No

No


MobileNo

Mobile No

No


StockNoWanted

Stock No

No

This should be the full stock no eg 1234.1

WantedVehicleReg

Registration No required

No

This field isn't required if the stock no is filled in but is the vehicle registration of the vehicle of interest

MakeWanted

Make of Vehicle Required

No

This isn't required if the interest is in a specific vehicle identified by StockNoWanted of WantedVehicleReg

ModelWanted

ModelWanted

No

This isn't required if the interest is in a specific vehicle identified by StockNoWanted of WantedVehicleReg - if sent should be accompanied by a MakeWanted

NewUsed

New or used required

No

Contains New or Used.  Not required if a StockNoWanted or WantedVehicleReg is filled in

ColourRequired

Colour Required

No


ChangeDate

Estimated date of intended purchase

No

in the form dd/mm/yy

Budget

Purchase budget

No


PxMake

Part Exchange Make

No


PxModel

Part Exchange Model

No


 

 

 

An example using curl is :-

 

curl --location --request POST 'https://services.dmservices.co.uk/DmsNavigator.NavigatorWebService.svc/CallProgExt' \

--data-raw '<request>

<apikey>xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</apikey>

<sessionid>12345</sessionid>

<method>WEBT_SALES_LEAD_CREATE</method>

<parameters>

<Team>19</Team>

<Title>Mr</Title>

<FirstName>Simon</FirstName>

<Surname>Verona</Surname>

<Email>simonverona999@googlemail.com</Email>

<MobileNo>07777777777</MobileNo>

<Notes>This is a test enquiry</Notes>

</parameters>

</request>

'

 

 

 

An example of this in use in a web page can be seen in the following example - which is built using html and jquery.  The actual web page can be viewed at

 

web page example <html>
<head>
   <link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
   <script src="http://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
   <script>
       < !this accesses the url variables in the URL! >
           function getUrlVars() {
               var vars = {};
               var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m, key, value) {
                   vars[key] = value;
               });
               return vars;
           }
   </script>
   <script>
       < !In the next
       function the * * _rendered - form_ * * is the id of the form(see the < form > tag) ! >
           $(document).ready(function() {
               $('#rendered-form').submit(function(event) {
                   event.preventDefault();
                   < !gets the data from the form! >
                       var Title = document.forms["rendered-form"].elements["Title"].value;
                   var FirstName = document.forms["rendered-form"].elements["First-Name"].value;
                   var Surname = document.forms["rendered-form"].elements["Surname"].value;
                   var Email = document.forms["rendered-form"].elements["Email"].value;
                   var Notes = document.forms["rendered-form"].elements["Note"].value;
                   < !the next line comes from the URL! >
                       var ApiKey = getUrlVars()["apikey"]
                   < !builds the URL and xml to post a sales lead
                   for example! >
                       var settings = {
                           "url": "https://staging-services.dmservices.co.uk/DmsNavigator.NavigatorWebService.svc/CallProgExt",
                           "method": "POST",
                           "timeout": 0,
                           "data": "<request><apikey>" + ApiKey + "</apikey><sessionid>12345</sessionid><method>WEBT_SALES_LEAD_CREATE</method><parameters><FirstName>" + FirstName + "</FirstName><Surname>" + Surname + "</Surname><Email>" + Email + "</Email><Notes>" + Notes + "</Notes><Team>1</Team></parameters></request>\r\n",
                       };
                   $.ajax(settings).done(function(response) {
                       alert("Submitted");
                   });
               });
           });
   </script>
   <title>Navigator Demonstration Sales lead creator</title>
</head>
<body>
   <img src="logo_navigator-193x65.jpg">
   <h1>Navigator Sales 360 Demonstration Contact Form</h1>
   <br>
   <form method="POST" id="rendered-form">
       <div class="rendered-form">
           <div class="fb-text form-group field-Title">
               <label for="Title" class="fb-text-label">Title</label>
               <input type="text" class="form-control" name="Title" id="Title">
           </div>
           <div class="fb-text form-group field-First-Name">
               <label for="First-Name" class="fb-text-label">First Name</label>
               <input type="text" class="form-control" name="First-Name" id="First-Name">
           </div>
           <div class="fb-text form-group field-Surname">
               <label for="Surname" class="fb-text-label">Surname</label>
               <input type="text" class="form-control" name="Surname" id="Surname">
           </div>
           <div class="fb-text form-group field-Email">
               <label for="Email" class="fb-text-label">Email Address</label>
               <input type="text" class="form-control" name="Email" id="Email">
           </div>
           <div class="fb-textarea form-group field-Note">
               <label for="Note" class="fb-textarea-label">Comments</label>
               <textarea type="textarea" class="form-control" name="Note" id="Note"></textarea>
           </div>
           <div class="fb-button form-group field-submit">
               <input type="submit" class="btn-default btn" name="submit" style="default" id="submit" value="submit" />
           </div>
       </div>
   </form>
</body>
</html>

 

 

Content loading

Content loaded

Add a comment. Use hash symbol to link a work item, exclamation