---
title: "“Can I Test-Drive This One?” Build an Automotive Chatbot"
titleOverride: "Build an Automotive Chatbot for Test Drive Requests"
pubDate: 2026-11-27
description: "Build an automotive chatbot that reads the stock number from a vehicle listing and sends the buyer’s test drive request to a salesperson in the same chat."
author:
  name: Piotr Grudzień
  image: /blog-assets/authors/piotr_grudzien.jpg
image:
  url: /blog-assets/posts/vehicle-listing-test-drive-enquiry_bg.webp
  alt: "The Meridian Vans panel van, stock MV-0147A, beside the dealership’s test drive conversation."
tags: [tutorials]
articleCta:
  title: "Try it with two vehicles from your forecourt"
  subtitle: "Open a chat on each listing and check which stock number reaches your sales desk."
  button: "Create a practice Agent"
  href: https://app.quickchat.ai/register
faq:
  - question: "How does an automotive chatbot know which vehicle a buyer is viewing?"
    answer: "The vehicle detail page passes its stock number to the website widget as conversation metadata. On the first buyer message, a Quickchat AI Action uses that number to fetch the public stock card. The Agent can then identify the vehicle by its stock number and body style."
  - question: "Can this dealership chatbot book a test drive?"
    answer: "It records which vehicle the buyer wants to test-drive and their preferred date and time. A salesperson takes over the chat, checks vehicle availability and the dealership diary, and confirms the appointment with the buyer. The stock card contains no appointment slots."
  - question: "What if the buyer changes vehicle listings during the chat?"
    answer: "The first-message lookup runs once per conversation. Ask the buyer to confirm the new stock number and keep the correction in the thread for sales. To look up the new vehicle immediately, start a new chat on its listing."
  - question: "Does a buyer need to share a phone number or email address?"
    answer: "A salesperson can reply while the buyer has the chat open on the dealership’s website. Ask for a phone number or email address only if the buyer wants a reply through that channel."
  - question: "Can I use my dealership’s own inventory feed?"
    answer: "Yes. Point the GET Action at a fixed endpoint that returns one public vehicle record. Replace the two demo stock numbers in the run condition with your own. Return the stock number and the facts buyers can verify on its listing. Keep customer records and the appointment diary separate."
howto:
  - name: "Pick two similar vehicle listings"
    text: "Compare the stock number and body style on the Meridian Vans panel and crew listings. Match each page to its public JSON card."
  - name: "Pass the listing reference into the website widget"
    text: "Create a practice Agent, put its public widget ID in the two-page kit, and send the visible stock number as listing_ref before the widget initializes."
  - name: "Look up one stock card before the first reply"
    text: "Create a GET Action with the two permitted stock numbers. Use the conversation metadata in the endpoint URL, test the response and enable the Action."
  - name: "Confirm the vehicle and the preferred time"
    text: "Save the Main Prompt, then enable the Human Handoff rule. Start a fresh panel-van chat, ask for a test drive and give sales the exact date, time and time zone."
  - name: "Reply from the sales Inbox"
    text: "Take the conversation, check the stock number and requested window, send a reply and read it in the buyer’s original widget."
  - name: "Repeat with the other van"
    text: "Compare a fresh crew-van conversation with a correction in an existing thread. Try an unlisted reference to verify that the lookup skips it."
---

“Can I test-drive this one on Friday after four?” A buyer asks the automotive chatbot on the Meridian Vans website about the slate Lantern E2 on their screen. The salesperson has two on the forecourt. One has a solid side panel behind the cab. On the other, a side window reveals a second row of seats.

You’ll carry the stock number from the listing to the sales desk. In our test, Alex opened the enquiry, saw **the two-seat panel van, MV-0147A**, and replied to the buyer about **Friday at 16:30 UTC**. The buyer read his message on the page where they first saw the van.

<figure class="tutorial-context tutorial-compact" style="--capture-ratio: 1496 / 624; --phone-ratio: 760 / 882; --capture-width: 46rem">

<picture><source media="(max-width: 30rem)" srcset="/blog-assets/posts/meridian-vans/finish-line-phone.webp" width="760" height="882">![The Meridian Vans website chat and the Quickchat AI Inbox show Alex Reed’s reply about MV-0147A and Friday at 16:30 UTC.](https://quickchat.ai/_astro/finish-line.rc_-8gEZ_cUX4h.webp)</picture>

<figcaption><span>The same message appears on both sides. Alex sees the stock number and requested time in the Inbox while the buyer waits on the listing.</span></figcaption>
</figure>

Try the [panel van](/blog-assets/demos/meridian-vans/panel.html) and the [crew van](/blog-assets/demos/meridian-vans/crew.html) side by side. Meridian Vans is fictional. We used AI to create the two vehicle photos. The screenshots show our original conversation in English, and the setup examples use the English labels shown on screen.

To run the chat yourself, [download the Meridian Vans practice kit](/blog-assets/downloads/meridian-vans-practice-kit.zip). You’ll need a Quickchat AI account with credits for test replies. You can play buyer and salesperson in separate browser windows.

## 1. Which part of a vehicle listing identifies the van?

Use the **stock number** as the lookup key. A make, model or colour can describe several vehicles. Meridian gives each van its own public stock card, a small JSON file with the same facts a visitor sees on the page.

<figure class="tutorial-context tutorial-compact" style="--capture-ratio: 1496 / 864; --phone-ratio: 760 / 522; --capture-width: 46rem">

<picture><source media="(max-width: 30rem)" srcset="/blog-assets/posts/meridian-vans/listing-pair-phone.webp" width="760" height="522">![Two slate Lantern E2 listings. MV-0147A has a solid side panel behind the cab. MV-0147B has a window beside the second row.](https://quickchat.ai/_astro/listing-pair.yI3X4QdT_3JNp2.webp)</picture>

<figcaption><span>Look behind the front door. A is the two-seater outside the ochre building. B has a second row of seats. The last letter of the stock number preserves that distinction in chat.</span></figcaption>
</figure>

1. Unzip the kit and open `panel.html`. Find **Stock reference MV-0147A**. Select **View stock card** to open `inventory/MV-0147A.json`. Here is the entire record.

```json
{
  "stock_ref": "MV-0147A",
  "model": "Lantern E2",
  "body": "two-seat panel van",
  "colour": "slate"
}
```

2. Open `crew.html` and its card, `inventory/MV-0147B.json`. The model and colour match. The last letter is **B** and the body is **five-seat crew van**. Keep the leading zero and suffix when you copy either reference.

On your own vehicle detail page, give the visible stock number an element the widget can read. Both practice pages already do this.

```html
<p>Stock reference <code id="stock-ref">MV-0147A</code></p>
```

## 2. How does the stock number get into website chat?

Read the number from the page when the widget starts. This lets one installation work on both vans, including when the buyer’s entire first message is “this one.”

1. [Create a Quickchat AI account](https://app.quickchat.ai/register) and choose **Set up manually**. In an existing account, open the Agent name at the top of the sidebar and choose **Add new AI Agent → Set up manually**. Name it `Meridian Vans` and describe its job as `Take viewing and test-drive enquiries for the sales desk.` Continue through **Knowledge Base**, **External apps** and **Deployment** without adding anything. Choose **Skip for now** on the plan screen for personal practice. Commercial use starts on Starter. [Plans and limits](https://quickchat.ai/docs/pricing-and-plans).
2. Open **Channels → Your Website → Install → Install manually with code → Widget**. In the snippet, find the public ID on the `_quickchat("init", …)` line. Copy it into the empty quotes on the `const widgetId = "";` line in the kit’s `widget.js`. Both pages load that file. On the Install tab, check that **Widget & Embed access** is on under **Availability and access**. [Website installation guide](https://quickchat.ai/docs/channels/website).

<figure class="tutorial-context tutorial-compact" style="--capture-ratio: 1448 / 792; --phone-ratio: 760 / 730; --capture-width: 45.25rem">

<picture><source media="(max-width: 30rem)" srcset="/blog-assets/posts/meridian-vans/widget-install-phone.webp" width="760" height="730">![The Your Website installation screen in Quickchat AI, with Install manually with code and the Widget option.](https://quickchat.ai/_astro/widget-install.DZwKvHPZ_HoMcq.webp)</picture>

<figcaption><span>Choose the floating Widget. Only the public ID on its init line goes into the practice kit.</span></figcaption>
</figure>

3. Serve the kit on your staging site, keeping its files together. To practice on your computer, run `python3 -m http.server 8080 --bind 127.0.0.1` in the unzipped folder and open `http://localhost:8080/panel.html`. You can open the bubble now. Save your first message for step 4, when the stock lookup is in place.

For an existing dealership site, use the Widget snippet from **Install** once in the page footer. Add these lines immediately before its `_quickchat("init", …)` line, after the stock number is on the page. The kit includes this step already.

```js
const stockRef = document.getElementById("stock-ref")?.textContent.trim();
if (stockRef) {
  window._quickchat("custom_params", { listing_ref: stockRef });
}
```

The widget sends a field named `listing_ref`. It tells the Agent which public listing to read. The inventory service supplies the body style and seat count. Anyone can change a browser field, so use it only to select records a visitor may already see. [How conversation metadata works](https://quickchat.ai/docs/api-reference/conversations/conversation-metadata).

## 3. How does the chatbot read the right vehicle before it replies?

Give the Agent one read-only **API Action**. The buyer’s first message triggers a lookup on a fixed inventory host. When the card comes back, the Agent can say which van “this one” refers to.

<figure class="tutorial-context tutorial-compact" style="--capture-ratio: 1460 / 580; --phone-ratio: 764 / 702; --capture-width: 45.625rem">

<picture><source media="(max-width: 30rem)" srcset="/blog-assets/posts/meridian-vans/listing-lookup-phone.webp" width="764" height="702">![Diagram of the first reply. MV-0147A and MV-0147B lead to a stock card read. A missing or unlisted listing_ref skips the API call.](https://quickchat.ai/_astro/listing-lookup.C_55kQOc_2vkVAS.webp)</picture>

<figcaption><span>The website supplies the reference. Quickchat AI checks it against the two permitted values before sending a request.</span></figcaption>
</figure>

1. In **Actions & MCPs**, select **Add Action → API Action → Create manually**. Enter `Read current vehicle listing` as the **API Action Name**. Paste the following into **API Action Description**.

```text
Read the public stock card for the vehicle page where this chat starts. Use its model, body style and stock reference to identify that vehicle.
```

2. Under **When to run**, choose **Before first reply**. In **Advanced settings → Run only when**, add a condition. Enter `listing_ref` as the key, choose **is one of**, and enter `MV-0147A` and `MV-0147B` as two separate values. This comparison is exact.
3. In **API Endpoint**, choose **GET** and paste the URL below. The `metadata_` prefix tells the Action to substitute the value from the conversation. You can type the placeholder even on a new Agent where the key has yet to appear in **Add AI Data**. Leave headers, query parameters, body and **What to ask the user first** empty. [Action variables](https://quickchat.ai/docs/ai-agent/variables).

```text
https://quickchat.ai/blog-assets/demos/meridian-vans/inventory/{{metadata_listing_ref}}.json
```

<figure class="tutorial-context tutorial-compact" style="--capture-ratio: 1500 / 852; --phone-ratio: 760 / 568; --capture-width: 46rem">

<picture><source media="(max-width: 30rem)" srcset="/blog-assets/posts/meridian-vans/action-editor-phone.webp" width="760" height="568">![Quickchat AI’s API Action editor shows Before first reply and the listing_ref condition with MV-0147A and MV-0147B.](https://quickchat.ai/_astro/action-editor.CkLRZHOr_2qdRMw.webp)</picture>

<figcaption><span>Set the timing on the Action itself. Under Advanced settings, enter the two stock numbers as separate values for the same condition.</span></figcaption>
</figure>

4. Open **Test Response**, give the metadata variable the value `MV-0147A` and send the test. Look for an HTTP **200** with `MV-0147A` and `two-seat panel van` in the response. Repeat with `MV-0147B` to see `five-seat crew van`. Save your changes and turn the Action on. You can use the hosted cards for this exercise even if you install the widget on your own domain.

Opening the widget displays its greeting. The lookup waits for the first **buyer message** and runs once in that conversation. That timing matters if the buyer later clicks through to the other van. [Before-first-reply Action behaviour](https://quickchat.ai/docs/ai-agent/actions#choose-when-an-api-action-runs).

## 4. How do you turn “Friday after four” into a test drive request?

Have the Agent repeat the van’s body style and stock number, then ask which Friday, what time and which time zone the buyer means. The buyer can correct the stock number while the two of them are still talking about the same listing.

1. Open **Identity → Main Prompt**. Paste the instructions below and save.

```text
You take viewing and test-drive enquiries for Meridian Vans. When someone says “this one,” read back the model, body style and exact stock reference from the returned stock card. If a buyer asks about seats, answer from that card. Ask which kind of visit they want if unclear.

Clarify a relative day, an ambiguous time and the time zone. A preferred slot is a request for sales to check. Offer to continue in this chat. Ask for contact details only if the buyer asks for a reply elsewhere.

If the card is missing or the buyer names a different reference, ask them to confirm the reference on the intended listing. Record the correction in your reply. Leave unverified vehicle details for sales to check. When the buyer asks to pass the request to sales, use Human Handoff.
```

2. Under **Actions & MCPs**, switch **Human Handoff** on and open **Edit Action**. Under **Handoff rules**, add and enable the rule below. Set **Question** and **Confirmation** as shown. Pick a time inside the configured human availability for your test. [Human Handoff settings](https://quickchat.ai/docs/ai-agent/actions/human-handoff).

| Field | Value |
| --- | --- |
| Name | Vehicle visit requested |
| Description | The buyer has asked to pass a specific viewing or test-drive request to sales, or explicitly asks for a person now. |
| Question | Would you like a salesperson to check that preference here? |
| Confirmation | A salesperson can pick up your request here. |

<figure class="tutorial-context tutorial-compact" style="--capture-ratio: 1496 / 720; --phone-ratio: 760 / 782; --capture-width: 46rem">

<picture><source media="(max-width: 30rem)" srcset="/blog-assets/posts/meridian-vans/handoff-phone.webp" width="760" height="782">![The Human Handoff settings for Meridian Vans show the Vehicle Visit Requested rule and the question that offers to connect the buyer with sales.](https://quickchat.ai/_astro/handoff.BcPuZjT8_Z1ANLfv.webp)</picture>

<figcaption><span>The rule describes when sales should take over. The question gives the buyer a way to ask a salesperson to check the time in this chat.</span></figcaption>
</figure>

3. In the buyer’s window, open the panel van on **your copy** of the site. Start a new widget chat and send the opening question.

> Can I test-drive this one on Friday after four?

On desktop, the widget answered, “You’d like a test drive of the **Lantern E2 two-seat panel van**, stock reference **MV-0147A**.” It asked which Friday, what time after four, and which time zone. The phone run named the same van and reference. In both cases the buyer could answer without leaving the page to hunt for the stock number.

<figure class="tutorial-context tutorial-compact" style="--capture-ratio: 1520 / 650; --phone-ratio: 760 / 646; --capture-width: 46rem">

<picture><source media="(max-width: 30rem)" srcset="/blog-assets/posts/meridian-vans/first-reply-phone.webp" width="760" height="646">![Meridian Vans answers the buyer’s first test-drive question with the Lantern E2 two-seat panel van, MV-0147A, and asks for the date and time zone.](https://quickchat.ai/_astro/first-reply.giTYDtnF_Z21yqhH.webp)</picture>

<figcaption><span>The buyer typed “this one.” The widget supplied the stock number, leaving the buyer to clarify the date and time.</span></figcaption>
</figure>

4. Confirm the reference, give a date and time zone, and ask sales to take over. Here is the buyer’s message from the example. For your own run, pick a future Friday and use that date on both sides of the exchange.

> Yes, MV-0147A. Friday 4 December 2026, around 16:30 UTC. Please pass it to sales. I’ll wait here.

## 5. How does the salesperson reply to the buyer?

The salesperson takes over the **same conversation**. Keep the widget open so you can see what arrives from the sales desk.

1. In the salesperson’s window, go to **Inbox → Open → Unassigned** and open the request. That’s where ours arrived after the buyer explicitly asked for sales. Select **Assign to me**. If you use topic routing and a teammate already owns it, look in **Open → Assigned**. [Inbox views and assignment](https://quickchat.ai/docs/conversations/inbox).
2. Read the buyer’s latest message. Check the vehicle, the type of visit, and the date and time zone. Inspect the called Action under the first AI reply or open **Actions & MCPs → Read current vehicle listing → View logs**. Match the returned stock card to the buyer’s confirmed reference.

<figure class="tutorial-context tutorial-compact" style="--capture-ratio: 1476 / 904; --phone-ratio: 760 / 692; --capture-width: 46rem">

<picture><source media="(max-width: 30rem)" srcset="/blog-assets/posts/meridian-vans/call-receipt-phone.webp" width="760" height="692">![The Quickchat AI Inbox shows the successful listing Action. The Action editor’s separate test of the same stock number returns the two-seat panel-van card.](https://quickchat.ai/_astro/call-receipt.BCDfXLMh_EBxc8.webp)</picture>

<figcaption><span>The Inbox records the lookup on the buyer’s first message. A separate editor test shows the same card’s fields. Match the 200 status and MV-0147A across the two views.</span></figcaption>
</figure>

3. Type a reply in the Inbox. Here’s what Alex sent before checking the appointment diary.

> I have your request for the two-seat panel van, MV-0147A, for Friday 4 December at 16:30 UTC. I’ll check the diary and reply here.

<figure class="tutorial-context tutorial-compact" style="--capture-ratio: 1496 / 884; --phone-ratio: 760 / 662; --capture-width: 46rem">

<picture><source media="(max-width: 30rem)" srcset="/blog-assets/posts/meridian-vans/sales-reply-phone.webp" width="760" height="662">![Meridian Vans’ Inbox conversation shows Alex Reed taking the request and replying about the two-seat panel van.](https://quickchat.ai/_astro/sales-reply.4D7BwP0j_Z2lwKVy.webp)</picture>

<figcaption><span>Check the assignee before replying. Alex tells the buyer he has received their Friday request. He still needs to check the appointment diary.</span></figcaption>
</figure>

The test is complete when the buyer can read the salesperson’s words on the **original listing**. Sales can check the vehicle and diary, then send an appointment confirmation in a later message.

## 6. What happens if the buyer switches to the other van?

A fresh chat on the crew van should read card B. An existing chat still has the card it read on its first turn. Try both so you know which stock number the salesperson should act on.

| Try this | What to check |
| --- | --- |
| Open the crew listing. Use the pen-in-a-square **new chat** control and ask “Can I view this one?” | Our widget identified the **five-seat crew van, MV-0147B**, and asked when the buyer wanted to visit. Inspect the call for `MV-0147B.json`. |
| In that crew-van chat, say “Actually, I’m now looking at MV-0147A. Is that the panel van?” | Our Agent repeated the new reference and asked the buyer to confirm it. Its existing **Lack Of Knowledge** handoff rule also brought in sales. Only B had been looked up. Start a fresh chat on the panel listing to fetch A. |
| With B in a fresh chat, ask “How many seats does this one have?” | The Agent answered **five** in our simulation. A seating question on its own stayed with the Agent. |
| Try a new chat with no `listing_ref`, or with the unlisted value `MV-9999`. | Both tests skipped the HTTP request. A skipped Action can still appear in the log. Open it and check the URL and HTTP status before counting it as a lookup. |
| A permitted card returns 404 on your own inventory host. | With the crew-van file unavailable, the Agent asked the buyer to confirm the reference and left the vehicle details open. Restore the card and start a new chat to retry. |

The stock card can be correct and the answer can still be too vague for sales. In one pair of Quickchat AI simulations, both first turns fetched the panel-van card with HTTP 200. We used this Main Prompt for the first run.

```text
You take viewing and test-drive enquiries for Meridian Vans. Identify the vehicle from the returned public stock card. Ask sales to check the requested time.
```

The reply offered to ask sales about the **Lantern E2**. Either van fits that description. With the Main Prompt from step 4, the next run identified the **Lantern E2 two-seat panel van, stock ref MV-0147A**, then asked which Friday, whether “after four” meant 4 p.m., and which time zone.

<figure class="tutorial-context tutorial-compact" style="--capture-ratio: 1496 / 672; --phone-ratio: 760 / 772; --capture-width: 46rem">

<picture><source media="(max-width: 30rem)" srcset="/blog-assets/posts/meridian-vans/tuning-phone.webp" width="760" height="772">![Two replies to the same test-drive question in Quickchat AI. The first names the Lantern E2. The revised prompt also returns the two-seat body, MV-0147A and a question about the time zone.](https://quickchat.ai/_astro/tuning.D2mU9brg_zEBRX.webp)</picture>

<figcaption><span>Both simulations read the same panel-van card. Compare what a salesperson could identify from each reply.</span></figcaption>
</figure>

To repeat the comparison on your practice Agent, open **Conversations → Testing → Create Dataset**. Name it `Panel van first reply`. Under **Paste messages**, enter the opening question about Friday. Under **Conversation metadata (advanced)**, enter `{"listing_ref":"MV-0147A"}`. Create the dataset, save the short prompt and choose **Run → Start Run** after reviewing the message cost.

Restore the step 4 prompt and run the same dataset again. Give the two replies to your salesperson and ask them to identify the van from each one. Check the Action log to see which card each run received. Metadata applies to every question in a dataset. Use a separate dataset with `{"listing_ref":"MV-0147B"}` for the crew van, or leave the metadata empty to try a page with no reference. [Simulation testing guide](https://quickchat.ai/docs/conversations/testing).

For a sales desk that collects enquiries in a spreadsheet, the [apartment tour request walkthrough](https://quickchat.ai/post/apartment-availability-viewing-request) shows the buyer’s preferred window arriving as a new row after they agree to send it.

## Can ChatGPT or Claude help configure the dealership chatbot?

An authorized Quickchat AI account connection can prepare the HTTP Action and inspect its settings. Give it the endpoint and values from step 3. You’ll still install the widget on the dealership site and receive the buyer’s message as a salesperson. [Connect Quickchat AI to ChatGPT](https://chatgpt.com/plugins/plugin_asdk_app_6a4656c688748191be4c5247fb0d5dfc). [Connect it to Claude](https://claude.ai/directory/connectors/app-quickchat-ai).

```text
In my Meridian Vans practice Agent, draft a GET Action named Read current vehicle listing. Fetch https://quickchat.ai/blog-assets/demos/meridian-vans/inventory/{{metadata_listing_ref}}.json to identify the vehicle by model, body style and stock reference. Run it before the first reply only when listing_ref is one of MV-0147A or MV-0147B. Leave headers, query and body empty. Show me both expanded URLs and the run condition before enabling the Action. Ask before running tests that spend credits.
```

## Frequently asked questions

### How does an automotive chatbot know which vehicle a buyer is viewing?

The vehicle detail page passes its stock number to the website widget as conversation metadata. On the first buyer message, a Quickchat AI Action uses that number to fetch the public stock card. The Agent can then identify the vehicle by its stock number and body style.

### Can this dealership chatbot book a test drive?

It records which vehicle the buyer wants to test-drive and their preferred date and time. A salesperson takes over the chat, checks vehicle availability and the dealership diary, and confirms the appointment with the buyer. The stock card contains no appointment slots.

### What if the buyer changes vehicle listings during the chat?

The first-message lookup runs once per conversation. Ask the buyer to confirm the new stock number and keep the correction in the thread for sales. To look up the new vehicle immediately, start a new chat on its listing.

### Does a buyer need to share a phone number or email address?

A salesperson can reply while the buyer has the chat open on the dealership’s website. Ask for a phone number or email address only if the buyer wants a reply through that channel.

### Can I use my dealership’s own inventory feed?

Yes. Point the GET Action at a fixed endpoint that returns one public vehicle record. Replace the two demo stock numbers in the run condition with your own. Return the stock number and the facts buyers can verify on its listing. Keep customer records and the appointment diary separate.
