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 new Dealer Studio lead creates a new Units prospect (a sales opportunity). Existing prospect records are not overwritten. The same person can have several prospects over time. Updates (for example after a salesperson is reassigned) look up an existing prospect for that contact and salesperson and update it when one is found.
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.
Prerequisites
Section titled “Prerequisites”| 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.
Authentication (Dealer Studio → Units)
Section titled “Authentication (Dealer Studio → Units)”Every request to Units includes:
Content-Type: application/jsonAccept: application/jsonx-secret-key: <Dealer Studio platform secret>x-access-key: <dealership access key>x-database-id: <Units database ID>deploymentTypeCode: PRODdeploymentTypeCode 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.
Endpoints used
Section titled “Endpoints used”| 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.
New lead flow
Section titled “New lead flow”- Resolve the customer and vehicle of interest from the lead cluster when present, otherwise from the lead.
- Stop if the assigned user has no Units salesperson code.
- Resolve a Units
contactCode(search by email, then match quality, or create a contact). - Always create a new prospect (do not reuse an existing prospect code).
- Call
allowInsertfor that contact and salesperson. POSTprospect detail.
Update lead flow
Section titled “Update lead flow”- Same contact and salesperson resolution as a new lead.
- Look up prospects for that
contactCodeand salesperson. - If one prospect is returned, use it. If several are returned, pick the best match (see Prospect matching).
- Call
allowEditwhen a prospect code is known, otherwiseallowInsert. PUTprospect detail when updating, orPOSTwhen no prospect was found.
Contact search and matching
Section titled “Contact search and matching”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.
Contacts that are not reused
Section titled “Contacts that are not reused”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.
Scoring
Section titled “Scoring”| 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.
Create contact payload
Section titled “Create contact payload”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.
Create or update prospect payload
Section titled “Create or update prospect payload”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 only on updates.
Field mapping
Section titled “Field mapping”| Units field | Dealer Studio data |
|---|---|
contactCode | Units contact resolved or created above |
prospectCode | Existing Units prospect (updates only) |
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) |
Prospect matching (updates only)
Section titled “Prospect matching (updates only)”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 |
Errors
Section titled “Errors”| 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 |
Support
Section titled “Support”For credentials, franchise codes, salesperson codes, or to turn on Units notifications, email support@dealerstudio.com.au.