# How We Built a Multi-Property Occupancy Ledger and WhatsApp AI Assistant for Room-Based Housing

> Source: <https://dev.to/musabkhan/how-we-built-a-multi-property-occupancy-ledger-and-whatsapp-ai-assistant-for-room-based-housing-2n3a>
> Published: 2026-12-05 08:34:00+00:00

**Recommendation:** Scope each WhatsApp assistant user to their organization and role via strict tool-calling so queries only touch permitted tenant data.
More in the playbook "Designing agent systems": <https://wpnews.pro/playbooks/agent-architecture>

Traditional property management software assumes a simple 1:1 relationship: one lease, one apartment, one monthly invoice.

When we started building [PulseHub](https://yourpulse.io), an accommodation management platform for HMOs, student housing, co-living spaces, and hostels, we quickly realized that standard real estate data models fall apart in room-based operations. In a student hall or hostel, a single room has multiple beds, residents move mid-month, shared utilities get split dynamically, and managers run daily operations from their phones rather than a desktop dashboard.

Here is a look at the core architectural decisions we made to handle bed-level occupancy, audit trails, and conversational workflows.

In multi-bed accommodations, availability is time-bound and hierarchical: **Property → Floor/Unit → Room → Bed**.

Instead of storing a simple `status: "occupied" | "available"` boolean on a room or bed, we modeled occupancy as date-bounded allocation intervals. A bed's availability for any target window `[startDate, endDate)` is computed by checking for overlapping active allocations:

```
SELECT b.id, b.label
FROM beds b
WHERE b.room_id = \$1
  AND NOT EXISTS (
    SELECT 1
    FROM bed_allocations a
    WHERE a.bed_id = b.id
      AND a.status IN ('active', 'reserved')
      AND a.start_date < \$3 -- requested end_date
      AND (a.end_date IS NULL OR a.end_date > \$2) -- requested start_date
  );
```

When a tenant disputes a security deposit deduction six months after moving in, reconstructing their history from separate payment tables, maintenance tickets, and chat logs is painful.

To solve this, every state-changing action in [PulseHub's accommodation management software](https://yourpulse.io) appends an immutable event to a unified **Resident Timeline**:

```
type TimelineEventType =
  | 'ADMISSION_CREATED'
  | 'BED_ASSIGNED'
  | 'ROOM_CHANGED'
  | 'CHARGE_POSTED'
  | 'PAYMENT_RECORDED'
  | 'DEPOSIT_HELD'
  | 'DEPOSIT_REFUNDED'
  | 'COMPLAINT_LOGGED';

interface ResidentTimelineEvent {
  id: string;
  residentId: string;
  propertyId: string;
  type: TimelineEventType;
  occurredAt: string;
  actorId: string;
  metadata: Record<string, unknown>;
}
```

Separating the **Payments Ledger** (which tracks cash flow and reconciliation) from the **Resident Timeline** (which preserves chronological context) gives property teams a complete audit trail without cluttering financial reports.

One surprising discovery from talking to hostel and HMO managers was that most of them rarely sit in front of a laptop during the day. They inspect rooms, collect cash or bank transfers on-site, and answer resident messages on WhatsApp.

Instead of forcing them to open a web dashboard for routine checks, we built **Ask Pulse**, a conversational AI assistant inside WhatsApp that connects directly to their scoped tenant data via strict tool-calling:

`Owner`, `Manager`, `Staff`).` organization_id`.
Software only works if the underlying operational workflow is consistent. Many operators start with paper clipboards before outgrowing spreadsheets at 10+ rooms.

To help smaller landlords standardize their room turnovers, we also published a free, open-source [Resident Move-In & Room Turnover Checklist](https://yourpulse-io.github.io/pulse-free-tools/) covering pre-arrival verification, meter readings, and deposit documentation.

If you are building vertical SaaS or working on multi-tenant booking systems, I would love to hear how you handle time-bound inventory and audit logs in the comments!
