If you PMS Booking solution is to be used with the holidaymaker™ url embeds module, you have the ability to ‘callback’ to the app once a booking is complete to notify the app that the process has finished, but to also potentially log the user in with their new booking.
The new booking would be added in these circumstances :
The booking can only successfully be queried if it is available from the standard data sources of those PMS solutions within holidaymaker™. Even if you know the booking would not be available yet, or the user is not in either of the above circumstances, the callback is still beneficial, as it is then marked (anonymously) in our stats and analytics engines.
The following PMSs are supported:
Note: In a future release of the holidaymaker™ app surfaces, for PMSs which do not support multiple bookings, you will have the ability to add multiple bookings to your app, so this will open up a 3rd segment of users where the booking will be added : The user is using the app logged in with a current or future booking, and this booking will be added to their set of bookings
The bridge is added to the Android or iOS web view when loaded within the app – the name of this is HMPMSBridge
This currently includes a single function called bookingComplete(bookingJSON) – This should be sent a string of JSON defined below (not an object)
The bridge is normally found in either the JS window, or in the webkit message handlers
var bookingJSON = {
// ...
};
var definedBridge = null;
if (window.webkit && window.webkit.messageHandlers) {
definedBridge = window.webkit.messageHandlers['HMPMSBridge'];
} else {
definedBridge = window['HMPMSBridge'];
}
if (definedBridge != null) {
definedBridge.bookingComplete(JSON.stringify(bookingJSON));
}
Note: Normally the surname and booking ID of a user is used when they add a booking to the app for most of our PMSs – however some clients may choose to use our ‘manual booking’ option if they have high number of guests who may book on an OTA such as Hoseasons. On this option the user instead adds their own arrival, departure, first name, and booking ID to the app to create a ‘sudo login’ for them. This information should also be sent as we may change clients between these two modes remotely.
Warning: Both GemaPark and Prophet Bookings use a password for authentication, however we are able to login to these using a customer hash/token. For security this should not be sent via javascript in a raw form and instead should be encrypted with some kind of time sensitivity. We can then add a hook to our infrastructure to then decrypt this before attempting the login to their APIs.
//Many PMSs would use surname, and booking id to login, with the extra information for manual login fall back and user feedback message in the app
var bookingJSON = {
type: 'parcvu',
total: 450.5,
amountPaid: 110.5,
firstName: "Jamie",
lastName: "KeyDigital",
bookingID: "11223344",
arrival: "2024-11-11",
departure: "2024-11-15"
};
//Campmanager is very similar, however also requires the 'park' key, so holidaymaker knows which park to attempt to login with
var bookingJSON = {
type: 'campmanager',
total: 450.5,
amountPaid: 110.5,
firstName: "Jamie",
lastName: "KeyDigital",
bookingID: "11223344",
arrival: "2024-11-11",
departure: "2024-11-15",
park: "key-park-one"
};
//GemaPark does not require the 'lastName', or the 'park', but does require an encrypted 'customer' token to attempt the login
var bookingJSON = {
type: 'gemapark',
total: 450.5,
amountPaid: 110.5,
firstName: "Jamie",
bookingID: "11223344",
arrival: "2024-11-11",
departure: "2024-11-15",
customer: "an-encrypted-user-token"
};
//Prophet bookings requires both the additional 'park' node as well as the 'customer' encrypted user token
var bookingJSON = {
type: 'prophet',
total: 450.5,
amountPaid: 110.5,
firstName: "Jamie",
bookingID: "11223344",
arrival: "2024-11-11",
departure: "2024-11-15",
park: "key-park-one",
customer: "an-encrypted-user-token"
};
// ...
//Trigger on page ready/load or similar
var definedBridge = null;
if (window.webkit && window.webkit.messageHandlers) {
definedBridge = window.webkit.messageHandlers['HMPMSBridge'];
} else {
definedBridge = window['HMPMSBridge'];
}
if (definedBridge != null) {
definedBridge.bookingComplete(JSON.stringify(bookingJSON));
}
Note: The information provided to the app in this JSON packet is disposed of after the trigger has been made. However if the login process is triggered using this information, some of that information would be retained within the app itself, in the same way a user had manually logged in using that same data.
If you require additions to your privacy policy, or require additions to the privacy policies used for the specific clients mobile apps, then please speak to your contacts at holidaymaker™ and we will gladly make, or assist with changes and additions