Skip to main content

How Smart Lock Code Communication and Backup Codes Work

Understand when Hospitable sends guest access codes, how backup codes are used, and what happens with last-minute reservations

Written by Pierre-Camille Hamana

Hospitable can automatically manage smart lock code delivery to help ensure guests receive the correct access code at the right time.

This article explains when code messages are sent, how backup codes work, and what happens if there’s an issue setting a reservation-specific code.


Guest Code Communication

Understanding the %smartlock_code% Shortcode

%smartlock_code% in your scheduled before-check-in message.

When the message is sent, Hospitable replaces this short code with the reservation’s actual access code. It is not a fixed PIN.

When you connect a new Smart Lock account, Hospitable will automatically add

%smartlock_code% if it can identify the correct before-check-in messaging ruleset and the short code is not already included in that message.

If there are multiple possible rulesets, or Hospitable cannot determine which one to update, you will need to add the short code yourself.

Use the review link on the setup screen to check your messaging rules. Confirm that your check-in message is enabled, applies to the correct properties, and includes

%smartlock_code%

.

Step-by-Step Instructions for Editing Check-In Message Templates

  1. Go to Guest Experience → Messaging → Rules.

  2. Open the scheduled before-check-in messaging rule that applies to the property.

  3. Check whether %smartlock_code% is already included. If it is missing, add it where the guest’s access code should appear.

  4. Include any instructions guests need to use the lock, such as pressing the enter key after entering the code.

  5. Confirm that the rule is enabled and applies to every property that should receive these instructions.

  6. Check that the message is scheduled to arrive before guests need access.

  7. Save your changes.

The %smartlock_code% shortcode automatically inserts the guest’s reservation-specific smart lock code into your message, ensuring seamless access at check-in time.

Example:

Message template in Hospitable containing the %smartlock_code% shortcode in the message body


When the message is sent, the guest will see their actual lock code instead of the shortcode.


Note: The %smartlock_code% shortcode only works if the property is connected to a supported smart lock and the lock is properly matched to the listing in Hospitable.

Since September 28, 2026, Booking.com no longer shares guest phone numbers with Hospitable through its connection. This is an intentional Booking.com security measure, not an outage.

If no usable phone number is available, Hospitable still generates an access code, using a random code instead.

Use %smartlock_code%, not %guest_phone_last4%, to send the generated access code. Avoid instructions such as “Your door code is the last four digits of your phone number.”

A random reservation code is not the same as a backup code. The missing phone number alone does not mean that code generation has failed.


When the Guest's Code Is Sent

If you include the %smartlock_code% shortcode in a scheduled message

If you include %smartlock_code% in a scheduled message before check-in, your messaging rule settings determine when the code is sent.

Unless there is an error setting the guest’s code on the lock, Hospitable will not send a separate automatic code communication message. This is because the code has already been shared.

If you don't use the %smartlock_code% shortcode, or if there is an issue setting the guest's code

If:

  • You do not include %smartlock_code% in a scheduled message before check-in, or

  • There is an issue setting the reservation-specific code

Hospitable will send a fallback message, called the Smart lock backup code message, which is enabled by default. If disabled, no message will be sent.

The Smart lock backup code message, when enabled, is sent exactly at Check-in time. This ensures guests receive a valid access code when it becomes active.

Note: If you share a different code manually without using the smart lock code placeholder, Hospitable cannot recognize it as the same code and will send a backup code message to ensure guest access.


Default Code Communication Message (Smart lock backup code message)

Hospitable provides the default fallback message to ensure guests receive access details if needed. This is the Smart lock backup code message.

The Smart lock backup code message is a fallback, not a replacement for your normal before-check-in message.

Keep %smartlock_code% in your normal check-in messaging rule. Using a phone-number short code or typing a PIN directly into the message cannot communicate to the system that the reservation’s access code was shared through %smartlock_code%. This can lead to an unnecessary backup-code message.

You can find and edit this message under: Guest Experience → Messaging → Rules → Search for "backup code" or scroll down:

The rule:

Smart lock backup code message template page in Hospitable for smart lock code communication

Hospitable will only send this message if:

  • The messaging rule is enabled, and

  • There was an issue setting the code that was already communicated to the guest on the lock, or

  • The code has not already been shared using the %smartlock_code% shortcode in another message


Editing the Smart Lock Backup Code Message

When editing the message, you can:

  • Update the name of the rule

  • Adjust the message's wording and modify the tone to match your brand

  • Add another language

  • Update settings

    • Exclude last-minute bookings

    • Add a picture

    • Specify a reservation duration

    • Change the message's scoping

The %smartlock_backup_code% shortcode must remain in the default code communication message and cannot be removed.

You can continue using %smartlock_code% in your own messaging rules without affecting this fallback message. If you already shared a code using %smartlock_code%, the Smart lock backup code message will only send if there is an error setting that original code.

Messaging rules page in Hospitable with the smart lock code communication message open for editing

Customizing and Disabling Backup Code Notifications

  • Customizing Messages:

    • Adjust the wording and conditions for backup-code notifications in your smart lock messaging settings. This ensures the communication aligns with your preferences while keeping the safety net in place.

  • Disabling Messages:

    • You can disable backup-code messages entirely. However, note that if Hospitable cannot program a new access code (e.g., due to connectivity or battery issues), guests will not receive an automatic replacement code


Where the Code Is Delivered

The delivery method depends on the booking source:

  • Airbnb, Vrbo, Booking.com → Sent through the platform’s messaging system

  • Direct bookings or manual reservations → Sent via email

Sending Host (Airbnb Only)

If multiple hosts are scoped for the same listing, the code communication message will be sent from the last host to send a message to the guest.


Backup Codes

Backup codes ensure guests can still access the property if Hospitable cannot confirm that the reservation-specific code was successfully set on the lock.

How Backup Codes Are Created

When you match a smart lock to a property in Hospitable:

  • Two backup codes are automatically created and set on your lock

  • They are always active on the lock

  • They are not shared with guests unless needed

By default, backup codes:

  • Begin with “HOSP”

  • Are followed by numbers

  • Match the PIN length configured for the lock


When Backup Codes Are Shared

If Hospitable cannot confirm that the reservation-specific code was successfully set on the lock, a backup code will automatically be shared with the guest (as long as the smart lock backup code message is enabled). No action is required from you.

When a backup code is used:

  • It is included in the smart lock backup code message

  • It becomes active at check-in time (including buffer, if configured)

  • It remains active until check-out time + buffer

  • After that time, it is automatically deleted

  • A new backup code is provisioned for future use

This process ensures there are always active backup codes available on the lock. Backup codes still require a powered, functioning lock. A code already stored on the lock may work during an internet outage, but it cannot provide access if the lock has no power.

Note: If your lock becomes disconnected (for example, due to a dead battery, WiFi outage, or another issue), Hospitable cannot set new codes on the lock. If the lock remains disconnected and all backup codes are used and cannot be replaced, guests will not receive access codes until the lock is reconnected.


How Codes Work for Last-Minute Reservations

If a reservation is confirmed:

  • After check-in time, or

  • After the code activation time (including buffer, if enabled)

Hospitable waits five minutes after the reservation is accepted before triggering the code communication message.

During this five-minute window:

  1. The system attempts to create the reservation-specific code (based on your smart lock settings).

  2. If confirmation is not received within five minutes, a backup code is sent instead.

This process ensures guests receive access as quickly as possible, even for last-minute bookings.


Best Practices for Smart Lock Integration

  • Always include %smartlock_code% in your check-in messages to automate code sharing.

  • Regularly review and update your messaging rules and buffer settings to align with your operational needs.

  • Monitor your smart lock’s connectivity and capacity to prevent issues with code generation or delivery.


Troubleshooting Common Issues

1. Code is stuck in 'Pending', 'Created', or 'Retry Code' status

If Hospitable has generated a code but it hasn't activated on the lock, the code may be waiting for confirmation from your lock provider. This is often caused by a temporary connectivity issue, a PIN conflict, or a sync failure.

  • Navigate to the guest’s reservation conversation → Property Access.

  • Review the status (e.g., Retry Code, Lock disconnected, Visible on lock/Active).

  • If “Retry Code” is shown, click it to re-run code creation.

2. Code fails to set — lock has reached its PIN capacity

Most locks can store a maximum of 100 codes (active or inactive). If the lock is at capacity, Hospitable cannot add a new guest code until space is freed up.

  • In your smart lock’s app (e.g., Yale app), review stored PINs and delete unneeded codes to stay well below the lock’s limit.

3. Guest did not receive their door code in the check-in message

If a guest reports not receiving a code, the most common cause is a missing or incorrect shortcode in the check-in messaging rule, or the message being scheduled at the wrong time.

  • Go to Guest Experience → Messaging → Rules and open the relevant before-check-in rule.

  • Confirm that the rule is enabled, applies to the correct property, and is scheduled before the guest needs access.

  • Confirm that the message contains %smartlock_code%, not %guest_phone_last4% or another phone-number short code.

  • Check the reservation’s Property Access panel to see whether an access code has been generated and its status.

  • For Booking.com reservations, a missing phone number does not prevent code generation. Hospitable uses a random code when no usable phone number is available.

4. Backup code message is sending too early or before check-in

If guests are receiving the backup code message well ahead of check-in, the check-in buffer may be extending code activation further in advance than intended, causing the fallback message to trigger prematurely.

  • Navigate to Devices → Smart Locks → Settings.

  • Check your check-in buffer settings. Earlier access windows can trigger fallback messages prematurely.

5. No code is being created — lock is disconnected or account is unlinked

If Hospitable cannot reach your lock, or your smart lock account has lost authorization (for example, after a password change), codes cannot be set or updated until the connection is restored.

  • Verify the lock’s internet/bridge connection is stable at activation time. Use a Wi-Fi extender or reposition your router if needed.

  • If your provider account has lost authorization, go to Devices → Smart Locks → Connected accounts and select Reconnect for the affected account. Complete any authorization steps requested by the provider.

6. Backup code message fires even though the primary code was successfully set

An active code on the lock does not necessarily mean that the code was shared through your scheduled check-in message.

Check the following:

  • Your before-check-in message includes %smartlock_code%.

  • The messaging rule is enabled and applies to the correct property.

  • The message was sent before guests needed access.

  • You did not use a phone-number short code or type the PIN directly into the message instead of using %smartlock_code%.

If those checks are correct and backup messages still arrive unexpectedly, contact Support with the affected reservation so the code and message history can be reviewed.

7. Codes arrive late or activate at the wrong time

If a guest's code isn't working at check-in, or activation times don't match your expected schedule, a timezone mismatch or incorrect reservation timing is the most common cause.

  • Check your smart lock app's timezone: An incorrect timezone in your lock app is the most common cause of timing offsets. Verify it matches your property's local timezone.

  • Review buffer settings: Navigate to Devices → Smart Locks → Settings. Your buffer setting controls how far in advance codes activate before check-in — confirm it reflects your intended early-access window.

  • Confirm reservation timing in Hospitable: Check that the reservation's check-in and check-out times are correct. A reservation with an incorrect check-in time will cause the code to activate at the wrong moment.

Did this answer your question?