Webhook handler for Genomi PMS (Property Management System) push notifications. Processes XML-based push events including check-in, check-out, room moves, client changes, and reservation list updates. Dynamically creates database columns based on incoming data keys.
ObjData.ObjData
|
+-- ObjHook
- _IsA = "ObjHookGenomiPush"
- _Version = "1.4"
- Page
+ Process(Payload, Param1..Param8)
+ update_reservation(action, hotel_id, data)
+ update_reservation_list(action, hotel_id, data)
+ update_client(action, hotel_id, data)
+ update_booking(action, hotel_id, data)
- _sanitize_value(raw_value)
- _parse_date_value(raw_value)
- _build_field_insert(table, key, value, guest_data, fields, values)
- _extract_value(guest_data, key)
| Method | Description |
|---|---|
__init__(DB, Page) |
Initialises the hook with database connection and page reference |
Process(Payload, Param1..Param8) |
Parses XML payload, determines action type, delegates to handler |
update_reservation(action, hotel_id, data) |
Inserts reservation record into data_booking_reservation |
update_reservation_list(action, hotel_id, data) |
Processes reservation list, delegates to update_reservation |
update_client(action, hotel_id, data) |
Inserts client record into data_booking_client |
update_booking(action, hotel_id, data) |
Inserts guest booking record into data_booking_guest |
_sanitize_value(raw_value) |
Strips control characters from a value string |
_parse_date_value(raw_value) |
Parses date value, stripping timezone info |
_build_field_insert(...) |
Builds SQL field/value fragments for dynamic column insertion |
_extract_value(guest_data, key) |
Extracts and sanitises a value from guest data dict |
| Action | Handler | Data Key |
|---|---|---|
CHECKIN / CHECKINSHARER |
update_booking |
CheckInData |
CHECKOUT / CHECKOUTSHARER |
update_booking |
CheckOutData |
ROOMMOVE |
update_booking (x2) |
SourceRoomInformation / DestinationRoomInformation |
CLIENTCHANGESLIST |
update_client |
Clients |
RESERVATIONLIST |
update_reservation_list |
Reservations |
| Table | Operation |
|---|---|
data_booking_reservation |
INSERT - reservation records |
data_booking_guest |
INSERT - guest booking records |
data_booking_client |
INSERT - client records |
ObjData - base database functionalityxml2dict - XML to dict parsingcythonize -3 -a -i ObjHookGenomiPush.py
Compiling /home/axion/projects/axion/factory.webhook/ObjHookGenomiPush.py because it changed..[1/1] Cythonizing /home/axion/projects/axion/factory.webhook/ObjHookGenomiPush.py
Updated: 2026-03-20