Aaxsys Notes
  More articles

March 16, 2007

Online Preferences

Using Aaxsys Online Preferences for Ordering
Availability Listings

Aaxsys Corporate Housing Software
Introduction.
When clients and agents seek available properties, they typically fill in a form for their search criteria. That is, when the reservation site or engine provides a "dynamical" inventory. Static lists - without real-time availability information - were often used in the first generation websites. For very small inventories, they might still be a good solution. However, online booking requires that the lists of available units be dynamically created from truly reservable properties.

Clients and agents may have different forms for the search, and the results may also be shown differently. For an agent, the graphical display of the reservation situation - "reservation board" - is a very useful and fast tool for finding the places to book. No marketing is needed. On the other hand, the clients will often be presented with a list of available properties, with pictures, some main amenities, location and (potentially) pricing information. In a linear list, such as search engine results as well as these availability listings, the very first items naturally get the highest attention from the user. To be seen, other items require user actions. The question immediately rises about the ordering of the listings.

Ordering availability listings. Which units to bring first to the client? One may follow the philosophy of ordering the list with respect to the lowest price - without necessarily showing pricing to the clients - because this philosophy is fair toward the providers and contact agents and, additionally, may provide the best incentive for the clients.

In a SQL query to the unit database, the results are simply ordered by, e.g., a statement such as
ORDER BY ROUND(MRATE/1000), BEDROOMS DESC...
for first showing the lowest monthly rates in thousands ("rate class"), and within each rate class, the units with the most bedrooms first.
Listings may have properties from several vendors, or from different agents with "contact" ties with the properties. To be entirely fair, we should first take care that each of these different providers gets their share in the listings. We clearly cannot do this any "normal" kind of ordering, because the top placings on the list are limited to a few and there may be a large number of different providers. Instead, in order to be democratic, we must use a "random" ordering. We first randomize over these different providers, and then apply criteria similar to the ones above.

Randomizing the list. To give each item (property) a random chance to be the first, or second, or third..., we cannot use any of the existing fields for the property. Instead, we will add a new field that is randomized "on-the-fly".
We add a new field with a random value by adding the following to the SELECT statement:
SELECT ... ROUND(9*RAND()) RND FROM ...
The function RAND() selects a (pseudo-)random decimal number from between 0 and 1, and the above makes this a random selection of an integer between 0 and 9. Finally, the ORDER BY statement will have the form:
ORDER BY RND ASC,MRATE ASC,BEDROOMS DESC
The properties are randomly divided into 10 random classes, and all the properties of the class 0 are shown first ordered by the monthly rate and bedrooms.
Naturally, the random ordering is different for each availability listing. However, there are situations in which certain units should be given a persistent preferential treatment.

Aaxsys preferences. Aaxsys provides a user-prescribed tool for modifying the system-given order of availability listings. For each unit, the user may set a number of preference. The higher the preference number, the higher in the list the unit will appear.


For example, by giving just one unit a positive value (which default to zero) will position that unit to the top of the listing in any search.

The final SQL code for ordering the listings thus reads

ORDER BY PREFERENCE DESC,RND ASC,
             MRATE ASC,BEDROOMS DESC
By setting the preference of some units negative, those units can be temporarily "pushed out" of the search (especially if the inventory is large) without de-activating them. New units on-line can be given a top position for a while, or the user may wish to use the property occupancy rates to prefer those properties that already get more reservations than other units.
Aaxsys Notes, March 16, 2007