Skip to main content

Inquiries

A property inquiry is a lead with a memory. Beyond "who asked about what," it carries the buyer's intent (buying vs renting, budget range), the viewing they want and whether it happened, the follow-up owed and when, the agent assigned, and — if it lands — the transaction it converted into. Working that record through a defined status lifecycle turns scattered interest into a measurable pipeline across voice and chat.

Property inquiry lead journeyA lead is received (type, budget, interest), the agent makes contact and schedules a viewing, the viewing is completed with notes, a follow-up is scheduled, and the lead converts to a transaction or closes.ReceivedNEWContactCONTACTED → scheduledViewingVIEWING_COMPLETEDNegotiateNEGOTIATINGConvertCONVERTEDintent · budgetbuy / rentassign agentviewing dateviewing notesfollow-up dateoffer termsbudget maxtransactionIdpurchase / leaseA lead can move to CLOSED at any stage without converting. Inquiry types: general · viewing · offer · information.
Python setup

The Python examples use the inquiry resource instantiated from the client (see the overview):

property_inquiry = client.property_inquiry

Create an inquiry

The TypeScript SDK can capture the contact inline; the Python SDK links to an existing customer_id.

import { PropertyInquiryType, PreferredContactMethod } from 'wiil-js';

const inquiry = await client.propertyInquiries.create({
propertyId: 'prop_456',
customer: {
firstName: 'John',
lastName: 'Smith',
email: 'john.smith@example.com',
phone: '+1-555-123-4567',
preferredContactMethod: PreferredContactMethod.EMAIL,
},
inquiryType: PropertyInquiryType.GENERAL,
message: 'I am interested in scheduling a viewing for this property.',
source: 'website',
preferredViewingDate: Math.floor(Date.now() / 1000) + 3 * 24 * 60 * 60,
preferredViewingTime: '10:00 AM',
interestedInBuying: true,
budgetMin: 500000,
budgetMax: 800000,
});

Get by property

const result = await client.propertyInquiries.getByProperty('prop_456', { page: 1, pageSize: 20 });
result.data.forEach(inq => console.log(`${inq.status}${inq.inquiryType}`));

Update

Assign an agent, schedule a viewing, or record notes.

const updated = await client.propertyInquiries.update({
id: 'inq_123',
assignedAgentId: 'agent_456',
scheduledViewingDate: Math.floor(Date.now() / 1000) + 2 * 24 * 60 * 60,
notes: 'Client prefers morning viewings',
});

Update status

Advance the lead through its lifecycle. The TypeScript status update can carry viewing and follow-up data alongside the new status.

import { PropertyInquiryStatus } from 'wiil-js';

const scheduled = await client.propertyInquiries.updateStatus('inq_123', {
id: 'inq_123',
status: PropertyInquiryStatus.VIEWING_SCHEDULED,
scheduledViewingDate: Math.floor(Date.now() / 1000) + 2 * 24 * 60 * 60,
});

const converted = await client.propertyInquiries.updateStatus('inq_123', {
id: 'inq_123',
status: PropertyInquiryStatus.CONVERTED,
});

Viewing slots

Query a property's available viewing slots for a date, then schedule a viewing using the slot's UTC timestamp and assigned agent. Slot times are in UTC seconds — pass startTimeUtcSec straight into the API; only multiply by 1000 when building a JavaScript Date for display.

import { PropertyInquiryType, PropertyInquiryStatus } from 'wiil-js';

const slots = await client.propertyInquiries.getViewingSlots('prop_123', '2026-06-25');
console.log(slots.timezone, slots.localDate);

if (slots.slots.length > 0) {
const slot = slots.slots[0]; // startTimeOfDay, providerId, startTimeUtcSec

const inquiry = await client.propertyInquiries.create({
propertyId: 'prop_123',
customerId: 'cust_456',
inquiryType: PropertyInquiryType.GENERAL,
message: "I'd like to schedule a viewing",
scheduledViewingDate: slot.startTimeUtcSec,
assignedAgentId: slot.providerId,
});

await client.propertyInquiries.updateStatus(inquiry.id, {
id: inquiry.id,
status: PropertyInquiryStatus.VIEWING_SCHEDULED,
scheduledViewingDate: slot.startTimeUtcSec,
});
}

Each slot carries startTimeOfDay (display time), providerId (the agent), and startTimeUtcSec (the canonical UTC-seconds start); the response also includes the timezone and the queried localDate.

Get, get by customer, list, delete

Reading a single inquiry, fetching a customer's inquiries, listing, and deletion are exposed through the TypeScript SDK.

const inquiry = await client.propertyInquiries.get('inq_123');
const byCustomer = await client.propertyInquiries.getByCustomer('cust_123', { page: 1, pageSize: 20 });
const all = await client.propertyInquiries.list({ page: 1, pageSize: 20 });
await client.propertyInquiries.delete('inq_123');

Converting a lead

When a deal closes, record the transaction on the inquiry and move it to CONVERTED:

await client.propertyInquiries.update({
id: 'inq_123',
convertedToTransaction: true,
transactionId: 'txn_789',
transactionType: 'purchase',
});

await client.propertyInquiries.updateStatus('inq_123', {
id: 'inq_123',
status: PropertyInquiryStatus.CONVERTED,
});

PropertyInquiry fields

FieldTypeRequiredDescription
idstringautoUnique identifier
propertyIdstringYesProperty being inquired about
customerIdstring | nullNoLinked customer
inquiryTypeenumYesgeneral, viewing, offer, information
messagestring | nullNoMessage from the contact
sourcestringYesLead source (default direct)
statusenumYesLifecycle status (default NEW)
preferredViewingDate / preferredViewingTimeNoRequested viewing
scheduledViewingDatenumber | nullNoConfirmed viewing date
viewingCompletedbooleanYesWhether the viewing happened (default false)
viewingNotesstring | nullNoNotes from the viewing
followUpDate / followUpNotesNoNext follow-up
assignedAgentIdstring | nullNoAssigned agent
interestedInBuying / interestedInRentingbooleanYesBuyer intent (default false)
budgetMin / budgetMaxnumber | nullNoBudget range for qualification
convertedToTransactionbooleanYesWhether it converted (default false)
transactionId / transactionTypeNoResulting transaction (purchase, lease)
appointmentRecordIdstring | nullNoLinked appointment record
cancelReason / notesstring | nullNoCancellation reason and internal notes

Status & type enums

EnumValues
PropertyInquiryTypegeneral, viewing, offer, information
PropertyInquiryStatusNEW, CONTACTED, VIEWING_SCHEDULED, VIEWING_COMPLETED, NEGOTIATING, CONVERTED, CLOSED

Query options

PropertyInquiry queries filter by search, propertyId, customerId, status[], inquiryType, assignedAgentId, source, convertedToTransaction, interestedInBuying, interestedInRenting, viewingCompleted, dateRange, and followUpDateRange, sorted by createdAt, scheduledViewingDate, followUpDate, or status (asc / desc).

tip

Assign an agent promptly, capture budgetMin/budgetMax for qualification, and record viewing feedback in viewingNotes — a clear NEW → CONVERTED path gives a measurable pipeline.