Home Documentation Smart Locks & Access Codes

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.

Smart Locks is available on all plans. You will need at least one compatible smart lock device registered in BnBFlows and assigned to a room before codes can be generated.

Supported lock types

BnBFlows supports three categories of smart lock:

Type Description Example brands
PIN PadNumeric keypad — guest enters a 4–8 digit PIN codeYale, Schlage, Samsung, Assa Abloy
Smart LockWi-Fi/Bluetooth lock with mobile app or alphanumeric code accessAugust, Nuki, igloohome
Key CardRFID / NFC card reader — issue virtual card codesAssa Abloy, Dormakaba, SALTO

Adding a smart lock

1
Go to Smart Locks

In the admin sidebar, navigate to Operations → Smart Locks. Click Add Lock.

2
Fill in lock details

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.

3
Set code format

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.

4
Save the lock

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.
Code generation is idempotent — confirming the same booking twice will not create duplicate codes. BnBFlows checks for an existing active code before generating a new one.

Manually generating a code

You can also generate or regenerate codes manually at any time:

  1. Go to Smart Locks → [Lock Name].
  2. Click Generate Access Code.
  3. Select a booking to link the code to, or generate a standalone code.
  4. Set an optional custom validity period.
  5. 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
PIN4–8 digits (e.g. 381046)PIN pad keypad locks
Alphanumeric6–10 mixed characters (e.g. A3K9PZ)Smart locks with full keyboard
Master PINLonger PIN for manager overrideStaff / 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.
Notifications are only sent if the guest has an email address and/or phone number saved in their profile. Ensure guest contact details are complete before confirming bookings.

Troubleshooting

No code was generated for a booking

  • Ensure the booking has a room assigned (room_id must 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_TOKEN and WHATSAPP_PHONE_NUMBER_ID are configured in your environment.