Custom codes are a powerful engine to automatically adapt your message to the profile of your guests, their inquiry or reservation, and your selected listing. Custom codes must be set up personally so that they reflect your own hosting style and requirements.

Unlike Short codes, they are not meant to be replaced by some data from Airbnb. Instead, they are bits of text or entire paragraphs that will be important to some guests or listings, but not to others. For example, you may want to add a special paragraph for guests who are staying for more than a week or guests who are travelling with children.

How it works

Custom codes are small bits of text or whole paragraphs that you can insert into your templates. They always start, and end, by "%%", to distinguish them from our system short codes, which start, and end by "%".

Whenever a message needs to be prepared or sent, your custom code is replaced by the matching text if the condition is met. Any text between " % " or " %% " will be erased from the message if it has not been replaced. Your raw custom codes will never appear to a guest.

Sometimes custom codes will contain entire paragraphs of text, sometimes just a line to add to a "static" paragraph. It is important to us that in any case, the message is presented correctly to the guest, without presenting any artefacts due to your usage of custom codes. For this reason, we enforce a few rules to make the messaging service work as you expect.

Unnecessary lines will be removed between paragraphs. In the final message, distinct paragraphs will be separated by one line and one line only. You may, therefore, add as many lines as you wish between custom codes, or between custom codes and a static text: the final message will always look professional. You don't have to worry about adding additional blank lines for every scenario.

Keep in mind

Custom codes are not multi lingual: you need to create one for each language you wish to support and integrate that custom code into templates matching their language.

Custom codes can include short codes on their own, that will be automatically adapted and translated into the template's language. To see what short codes are available, open the rule where you would like to include your custom codes.

Adding a custom code

You can create or edit your custom codes in your Messaging's Command Center by selecting the tab Custom Codes.

You will see this form:

It is made of 3 parts:

  • The custom code itself. It can be a simple word, such as "sofa", and can include letters and numbers.
  • The matching text, containing what the custom code should be replaced with.
  • The condition, which defines when the custom code should be replaced with the matching text.

Restricting a custom code to a listing

You may create a custom code that will only be applicable to a certain listing. For this, you need to select the listing from the drop-down menu on the top of the Custom Codes page. 

In that case, the replacement will only occur if your message concerns an inquiry or a reservation for that matching listing. If that is not the case, the custom code will not be replaced by the matching text, and the custom code will be erased from the message.

A custom code must be unique for one listing, but it is possible to create custom codes with the same name for different listings.

For example, you can define a %%nickname%% for each of your listings. The code %%nickname%% will be replaced by the matching text for these listings.

Simulate your template

Once you have created a custom code and included it in your template you are able to check how your message would appear to the guest. After saving your template that includes the custom code scroll a bit down and you will find the Simulate your template option. This enables you to simulate your template against past conversations. This is just for you and no message will be sent in the simulation. 

You can also ask us questions by email; we would be happy to check that your setup corresponds to your expectations.

Did this answer your question?