Documentation · User Handbook
Lead Management Workflow
This document describes how customer inquiries (leads) are created, stored, reviewed, and processed in the ADP Car Market Hub plugin. It covers lead data, status management, CSV export, email routing, consent configuration, email template customisation, and webhook integration.
When to use this document
Read this document if you:
- Need to review, process, or export customer inquiries received through vehicle detail pages.
- Are configuring the recipient email address, consent checkbox, or email notification templates.
- Want to route leads to an external CRM or notification system via webhook.
- Need to understand what data is stored and how leads are connected to vehicle records.
For a quick daily review workflow, see Daily Usage Workflows.
Overview
When a visitor submits a contact inquiry or test drive request on a vehicle detail page, the plugin:
- Validates the submission (required fields, nonce verification, honeypot spam check, rate limiting).
- Sends an HTML notification email to the configured recipient.
- Sends an HTML confirmation email to the visitor.
- Saves the lead as a WordPress custom post (
as24ci_lead). - Fires the
as24ci_lead_savedaction hook (which triggers the webhook if configured). - Tracks a
lead_sentanalytics event (if Analytics is enabled).
All leads are accessible in the ADP Car Market Hub → Leads admin tab.
Requirements or prerequisites
- A vehicle detail page must be accessible to visitors and the contact form must be enabled.
- For email notifications to be delivered, WordPress must be able to send email via
wp_mail(). On many shared hosting environments this works out of the box. On some servers, an SMTP plugin may be required. - The Recipient email field on the Leads tab should be configured to ensure notifications go to the right address.
- To use the test drive feature, it must be enabled in Features and the available days, time window, and slot duration must be configured on the Leads tab.
Lead data fields
Each lead stores the following information:
| Field | Description |
|---|---|
| Name | Customer full name (always required) |
| Customer email address (always required) | |
| Phone | Customer phone number (optional; controlled by field visibility setting) |
| Message | Free-text inquiry message (optional; controlled by field visibility setting) |
| Vehicle title | Title of the vehicle the inquiry is about |
| Vehicle ID | WordPress post ID of the vehicle |
| AutoScout24 listing ID | The AutoScout24 listing identifier (used to link back to the original listing) |
| Vehicle URL | Permalink to the vehicle post in WordPress |
| Source URL | Page the visitor was on when submitting the form |
| Date | UTC date and time the lead was received |
| Email sent | Whether the notification email was delivered successfully |
| Status | Current processing status (New, Contacted, Closed, or Spam) |
| Is test drive | Whether this lead is a test drive booking request |
| Appointment date | Requested date and time slot for a test drive (if applicable) |
Step-by-step instructions
Reviewing leads
- Navigate to ADP Car Market Hub → Leads.
- The leads list is ordered with the most recent submissions first.
- Each row shows: date, name, email, phone, vehicle, message (truncated), and current status.
- Use the search box to find leads by name, email, vehicle title, or AutoScout24 listing ID.
- Use the status filter to show only leads with a specific status (New, Contacted, Closed, or Spam).
- Click on a lead row to see full details including the vehicle link and appointment date.
Changing lead status
Lead status tracks where each inquiry is in your sales process:
| Status | Meaning |
|---|---|
| New | Received but not yet acted upon |
| Contacted | The customer has been contacted |
| Closed | The inquiry has been fully resolved |
| Spam | Identified as unwanted or fraudulent |
To change a lead's status:
- Find the lead in the Leads tab.
- Select the new status from the status dropdown next to the lead.
- The change is saved immediately.
Exporting leads to CSV
- Navigate to ADP Car Market Hub → Leads.
- Optionally apply a search filter or status filter to export only a subset of leads.
- Click the Export CSV button.
- A CSV file is downloaded. The filename includes the current date (for example,
leads-2026-04-30.csv). - The CSV file includes a UTF-8 BOM so it opens correctly in Microsoft Excel without encoding issues.
- The CSV columns are: Date, Name, Email, Phone, Vehicle Title, Vehicle ID, Message, Test Drive (Yes/No), Appointment.
Deleting a lead
- Find the lead in the Leads tab.
- Click the Delete button next to the lead.
- Confirm the deletion when prompted. This permanently removes the lead and its metadata.
Configuring lead settings
Lead settings are found on the ADP Car Market Hub → Leads tab (Settings section).
Recipient email
The plugin uses the following priority order to determine where to send lead notification emails:
- Global recipient email override (Leads tab → Recipient Email field). Supports a comma-separated list of email addresses to deliver to multiple recipients.
- CMH Team contact — the email of the active team member resolved for the vehicle (per-vehicle assignment, branch default or global default). See CMH Team and Contact Routing.
- Seller profile public email (stored as
as24ci_seller_emailuser meta on the vehicle author's user account). - Vehicle author's WordPress account email.
- WordPress admin email (Settings → General → Administration Email Address) as the final fallback.
To route all lead notifications to one or more fixed addresses, enter them in the Recipient Email field on the Leads tab. When the Send a copy to the general dealership email rule is enabled in CMH Team, the general dealership email also receives a copy of each inquiry.
Form field visibility
The Name and Email fields are always shown. The following fields can be individually enabled or disabled:
- Phone number field — show or hide the phone field on the contact form.
- Message field — show or hide the free-text message field. If disabled, a message is not required and leads contain no message text.
Consent checkbox
- Enable consent checkbox — when enabled, a consent checkbox is shown on the contact form. The visitor must check it before the form can be submitted.
- Consent text — the label shown next to the checkbox. Typically includes a reference to your privacy policy.
- Privacy policy URL — URL of your privacy policy page. Can be linked from the consent text.
These settings are stored per the plugin's options and take effect immediately on the frontend contact form.
Email templates
The plugin supports custom email subject lines and body templates for both the dealer notification and the customer confirmation email.
Templates support the following {placeholder} tokens:
| Placeholder | Replaced with |
|---|---|
{customer_name} | Customer name |
{customer_email} | Customer email |
{customer_phone} | Customer phone number |
{customer_message} | Customer message text |
{vehicle_title} | Vehicle title |
{vehicle_url} | URL of the vehicle detail page |
{vehicle_price} | Vehicle price |
{listing_id} | AutoScout24 listing ID |
{appointment_date} | Test drive appointment date and time (if applicable) |
Dealer email:
- Subject — customise the notification email subject sent to the recipient. If left blank, the default subject is used ("Vehicle inquiry: {vehicletitle}" or "Test drive request: {vehicletitle}").
- Body — full HTML email body. If left blank, the default template is used.
Customer confirmation email:
- Subject — customise the confirmation subject sent to the visitor.
- Body — full HTML confirmation body.
When custom templates are configured, they replace the default content entirely. The Reply-To header of the dealer notification email is set to the customer's name and email address.
Webhook integration
The plugin can fire outbound webhooks on lead events for integration with external systems (CRM, Slack, Zapier, and so on).
Configuration is in the Leads settings section:
| Field | Description |
|---|---|
| Webhook URL (new lead) | HTTP endpoint called when a new lead is saved |
| Webhook URL (new import) | HTTP endpoint called when a vehicle is imported or updated |
| Webhook secret | Used to sign the request with HMAC-SHA256 for verification by the receiver |
The webhook payload for a new lead includes: event name (new_lead), timestamp, lead ID, and lead data (name, email, phone, message, vehicle ID, vehicle title, vehicle URL).
Failed webhook deliveries are retried up to 3 times via WP-Cron.
The HMAC-SHA256 signature is included in the request header and can be used by the receiving endpoint to verify authenticity. Do not share the webhook secret publicly.
Operational notes
- Rate limiting: the contact form accepts a maximum of 5 submissions per IP address per 5 minutes. Submissions exceeding this limit receive an error response without creating a lead or sending an email.
- Honeypot spam protection: the contact form includes a hidden field that humans leave blank but automated bots typically fill. When the honeypot field is filled, the submission is silently rejected.
- Lead storage: leads are stored as WordPress custom posts (
as24ci_lead). They are not publicly visible and do not appear in standard post lists unless accessed through the Leads admin tab. - Data retention: leads remain in WordPress until manually deleted or until the plugin is uninstalled with the "Delete data on uninstall" option enabled in Settings.
- Test drive leads: test drive bookings are also stored as leads with
is_test_drive = 1and anappointment_date. They appear in the same Leads tab and CSV export alongside regular contact inquiries. - Analytics tracking: when a lead is successfully saved and the Analytics feature is enabled, a
lead_sentevent is tracked for the vehicle. - Multiple recipients: to send lead notifications to multiple email addresses, enter them as a comma-separated list in the Recipient Email field.
Troubleshooting
| Symptom | Likely cause | Check |
|---|---|---|
| Notification email not received | WordPress email delivery is not working, or no valid recipient is configured | Configure Recipient Email in Leads settings; test wp_mail() delivery; check spam folder; consider installing an SMTP plugin |
| Visitor confirmation email not received | Customer email address is incorrect, or email delivery issue | Check the lead record for the email address; check spam folder |
| Form rejects valid submissions | Consent checkbox is required and not checked, or a required field is empty | Check Leads settings → field visibility and consent settings |
| Lead saved but email not sent | wp_mail() returned false | Check the _as24ci_lead_email_sent meta field on the lead; review server email logs |
| Webhook not receiving data | Webhook URL is not saved, is unreachable, or returns an error | Verify the URL in Leads settings; check the server logs for delivery failures |
| Leads tab shows no results | No submissions have been received yet, or all leads have been deleted | Verify the contact form is visible on vehicle pages; submit a test inquiry |
| CSV export has encoding issues | Application does not interpret the UTF-8 BOM correctly | Open the CSV file in a text editor or re-import specifying UTF-8 encoding |