Skip to content

Units Lead Export

Dealer Studio can push sales enquiries into the Units dealer management system. This is an outbound integration: Dealer Studio calls the Units public API. Partners and dealerships do not POST leads to Dealer Studio for this flow.

Each Dealer Studio lead becomes one Units prospect (a sales opportunity). The first successful send creates the prospect, and Dealer Studio keeps the prospect code Units returns. Sending the same lead again updates that prospect rather than creating another, so the same person can have several prospects over time, one per enquiry. Updates (for example after a salesperson is reassigned) use the stored prospect code, or look up an existing prospect for that contact and salesperson when the lead has none.

Exports are typically configured as manual send. A sales manager assigns the customer’s lead cluster to a salesperson who has a Units salesperson code before the lead is sent.

To enable the integration, email support@dealerstudio.com.au. You will need Units credentials for the dealership (access key, database ID, franchise code) and a Units salesperson code for each user who should receive prospects.

Requirement Purpose
Units access key Identifies the dealership to Units
Units database ID Selects the Units database (often per location)
Units franchise code Set on the prospect’s vehicle interest (for example TOYOTA)
Units salesperson code on the assigned dealership user Required. If the assigned user has no salesperson code, the export does not run
Customer email and/or phone Email is used to search for an existing Units contact. If there is no email, Dealer Studio creates a contact without searching

Configure these on the dealership Units notification and on each relevant user’s dealership profile. Contact support if you need help obtaining Units keys.

Every request to Units includes:

Content-Type: application/json
Accept: application/json
x-secret-key: <Dealer Studio platform secret>
x-access-key: <dealership access key>
x-database-id: <Units database ID>
deploymentTypeCode: PROD

deploymentTypeCode is PROD in production. Units may require PILOT for non-production testing.

The Units API base URL is the dealership’s Units host (for example https://api.units.com.au/). Paths below are relative to that host.

Step Method and path
Search contact by email GET /api/pub/admin/contact/v1?keyword={email}&searchPredicate=email_address
Create contact POST /api/pub/admin/contact/v1
List prospects for contact and salesperson GET /api/pub/sales/prospect/v1/summary?contactCode={code}&salespersonCode={code}
Permission to create a prospect GET /api/pub/sales/prospect/v1/allowInsert?contactCode={code}&salespersonCode={code}&selectedSalespersonCode={code}
Permission to edit a prospect GET /api/pub/sales/prospect/v1/allowEdit?prospectCode={code}&salespersonCode={code}&selectedSalespersonCode={code}
Create prospect POST /api/pub/sales/prospect/v1/detail
Update prospect PUT /api/pub/sales/prospect/v1/detail

If Units returns a non-success HTTP status, the export fails. Permission checks must return a successful status from Units or the prospect is not created or updated.

  1. Resolve the customer and vehicle of interest from the lead cluster when present, otherwise from the lead.
  2. Stop if the assigned user has no Units salesperson code.
  3. Resolve a Units contactCode (search by email, then match quality, or create a contact).
  4. Use the prospect code stored from an earlier send of this lead, if there is one. If the lead was exported before prospect codes were stored, look up its prospect for that contact and salesperson. Otherwise create a new prospect.
  5. Call allowEdit when the lead already has a prospect code, otherwise allowInsert.
  6. PUT prospect detail when updating, or POST when creating.
  1. Same contact and salesperson resolution as a new lead.
  2. Use the prospect code stored from an earlier send of this lead, if there is one. Otherwise look up prospects for that contactCode and salesperson.
  3. If one prospect is returned, use it. If several are returned, pick the best match (see Prospect matching). A prospect code already held by another lead is not reused.
  4. Call allowEdit when a prospect code is known, otherwise allowInsert.
  5. PUT prospect detail when updating, or POST when no prospect was found.

When the customer has an email address, Dealer Studio searches Units with searchPredicate=email_address.

  • If no rows are returned, a new contact is created.
  • If rows are returned, each candidate is scored. A weak match is not reused; a new contact is created instead.
  • Contact fields may appear at the top level of the Units response or nested under contactDetails. Both shapes are accepted.

A Units contact older than two years is discarded when it has a first name or surname and neither name is a match (or a close match) for the lead. This avoids attaching a new enquiry to a stale record that only shares an email.

Signal Points
Contact created within 30 days +15
Within 90 days +12
Within 180 days +8
Within 1 year +5
Within 2 years +2
Older than 2 years −5
Normalised email matches the lead +50
Mobile phone exact match (digits only, Australian country code and leading 0 stripped) +10
Phone numbers similar (one contains the other) +5
First name exact +3
Surname exact +3
First name similar (substring or first three characters) +1
Surname similar +1

The best-scoring remaining contact is used only if it meets a minimum:

  • Created within the last year: score ≥ 8
  • Older than one year: score ≥ 15

An email match of +50 usually exceeds both thresholds unless the row was already rejected as a stale unrelated contact.

Phones are compared after stripping non-digits, a leading 61, and a leading 0.

POST /api/pub/admin/contact/v1

{
"contactDisplayName": "Jane Smith",
"contactDetails": {
"name": "Jane",
"surname": "Smith",
"primaryEmail": "jane.smith@example.com",
"mobilePhone": "0400000000"
},
"addressDetails": {
"country": "Australia",
"postCode": "4000",
"street": "1 Example Street",
"suburb": "Brisbane",
"state": "QLD"
},
"personalDetails": {
"dateOfBirth": "1990-01-15"
},
"businessDetails": {
"companyName": "Example Pty Ltd"
}
}

Empty optional contact fields are omitted. Mobile numbers sent to Units use Australian local format with a leading 0. Date of birth, postcode, company name, and street address are included when they exist on the Dealer Studio contact. Units is expected to return contactCode on success.

POST or PUT /api/pub/sales/prospect/v1/detail

{
"contactCode": "C12345",
"prospectCode": "P67890",
"addressDetails": {
"street": "1 Example Street",
"street2": "",
"suburb": "Brisbane",
"state": "QLD",
"postCode": "4000",
"country": "Australia"
},
"email": {
"email1": "jane.smith@example.com",
"email2": ""
},
"extraDetails": {
"marketingSource": "Website",
"salespersonCode": "SP001",
"status": "A",
"contactMethod": "E",
"locator": true,
"qualifier": "Now",
"thirdPartySync": false
},
"interestedIn": {
"make": "TOYOTA",
"model": "RAV4",
"type": "N",
"franchise": "TOYOTA",
"yearFrom": 0,
"yearTo": 0,
"spendFrom": 0,
"spendTo": 0,
"bodyType": "",
"cylinders": 0,
"transmission": "",
"tradeInMake": "",
"tradeInModel": ""
},
"phone": {
"mobile": "0400000000",
"business": "",
"fax": "",
"private": ""
}
}

prospectCode is sent whenever Dealer Studio already holds one for the lead. Units returns the prospectCode on every prospect create and update, and Dealer Studio stores it against the lead, so a later send of the same lead updates that prospect instead of creating a duplicate.

Units field Dealer Studio data
contactCode Units contact resolved or created above
prospectCode Prospect code stored from an earlier send, or the prospect found by the summary search on updates
addressDetails Contact address; country is always Australia
email.email1 Lead email
phone.mobile Lead phone, Australian local format with leading 0
extraDetails.marketingSource Lead source
extraDetails.salespersonCode Assigned user’s Units salesperson code
extraDetails.status A (Active)
extraDetails.contactMethod E (email)
interestedIn.make / model Vehicle of interest (uppercase). Falls back to manufacturer name or enquiry make/model fields
interestedIn.franchise Notification franchise code
interestedIn.type U used, D demo, otherwise N (new)

When several prospects exist for the same contact and salesperson, Dealer Studio scores them and uses the highest score.

Signal Points
Modified within 7 days +20
Within 30 days +15
Within 90 days +10
Within 180 days +5
Within 1 year +2
Older than 1 year −5
Status A (Active) +8
Status P (Pending) +4
Interested make matches the vehicle of interest +3
Interested model matches +2
Situation What happens
No Units salesperson code on the assigned user Export is skipped
Units HTTP error Export fails; the Units Message, message, or error body is treated as the failure reason
Permission status is not successful Prospect is not created or updated
No usable contact match and create succeeds New contactCode is used for the prospect

For credentials, franchise codes, salesperson codes, or to turn on Units notifications, email support@dealerstudio.com.au.