Smart Locks & Access Codes
BnBFlows integrates with digital smart locks — PIN pads, key-card readers and Bluetooth locks — to automatically generate expiring access codes for guests when a booking is confirmed. Codes are delivered via email, SMS and WhatsApp without any manual work.
Supported lock types
BnBFlows supports three categories of smart lock:
| Type | Description | Example brands |
|---|---|---|
| PIN Pad | Numeric keypad — guest enters a 4–8 digit PIN code | Yale, Schlage, Samsung, Assa Abloy |
| Smart Lock | Wi-Fi/Bluetooth lock with mobile app or alphanumeric code access | August, Nuki, igloohome |
| Key Card | RFID / NFC card reader — issue virtual card codes | Assa Abloy, Dormakaba, SALTO |
Adding a smart lock
In the admin sidebar, navigate to Operations → Smart Locks. Click Add Lock.
Enter the lock name (e.g. "Room 101 – Front Door"), brand, model, lock type (PIN pad / smart lock / key card), and the location. Assign the lock to a specific room.
Choose PIN (numeric) or alphanumeric code format, and set the default code length (4–10 characters). This should match what your physical lock hardware supports.
The lock is now active and linked to the room. Any confirmed booking for that room will automatically generate a code for this lock.
Automatic code generation on booking confirmation
When a booking is confirmed — either at creation or when the status changes from pending to confirmed — BnBFlows automatically:
- Generates a unique access code for every active smart lock assigned to the booked room.
- Sets the code validity to match the booking's check-in and check-out dates.
- Sends the code to the guest via email, SMS (Africa's Talking) and WhatsApp (Meta Cloud API).
- Logs every notification sent in the Notification Logs audit trail.
Manually generating a code
You can also generate or regenerate codes manually at any time:
- Go to Smart Locks → [Lock Name].
- Click Generate Access Code.
- Select a booking to link the code to, or generate a standalone code.
- Set an optional custom validity period.
- Click Generate. The code appears immediately and can be copied or shared.
Viewing and revoking codes
All active and expired codes for a lock are visible on the lock's detail page. To revoke a code:
- Open Smart Locks → [Lock Name].
- Find the code in the Access Codes table and click Revoke.
- Revoked codes are deactivated immediately and cannot be used to access the lock.
You can also view all codes for a specific booking via Bookings → [Booking] → Access Codes.
Code types reference
| Code type | Format | Best for |
|---|---|---|
| PIN | 4–8 digits (e.g. 381046) | PIN pad keypad locks |
| Alphanumeric | 6–10 mixed characters (e.g. A3K9PZ) | Smart locks with full keyboard |
| Master PIN | Longer PIN for manager override | Staff / maintenance access |
Guest notification content
Guests receive the access code via three channels simultaneously:
- Email — a branded HTML email showing the code prominently, with booking details, valid-from/until dates and how-to-use instructions.
- SMS — a compact plain-text message: "BnBFlows: Booking #BK-XXXXX confirmed at [Property], Room [X]. Your access code: 381046. Check-in: 15 Jan 2026."
- WhatsApp — a richly formatted message with bold headers, bullet-point booking details and the code in monospace formatting.
Troubleshooting
No code was generated for a booking
- Ensure the booking has a room assigned (
room_idmust be set). - Ensure the room has at least one active smart lock (status = Active).
- Check that the booking status is confirmed — pending bookings do not trigger code generation.
Guest did not receive the notification
- Check Settings → Notification Logs — the send attempt and any errors are recorded there.
- Verify the guest's email and phone number are correct.
- For SMS: check Africa's Talking account balance and ensure the phone number is not blacklisted.
- For WhatsApp: ensure
WHATSAPP_TOKENandWHATSAPP_PHONE_NUMBER_IDare configured in your environment.