Thursday, April 1, 2021

#838 - OIC and Oracle Hospitality (OHIP) - Getting the most out of Opera APIs

 This is my second post on integrating with Oracle Hospitality Cloud using OIC. The introductory post is here. So let's continue our journey...











I preface this post with the usual caveat - I am not an expert on Oracle Hospitality, however, I have been playing around with the apis provided by OHIP.

So here is the basic scenario - I want to implement the following basic use cases -

1. room reservation 

2. checkin

The introductory post covered room reservation, but here is a recap.









Think of OHIP (Oracle Hospitality Integration Platform) as THE catalog of APIs for Opera integration and THE Gateway for processing API requests.

Starting point is getting the required OAuth Token - 














Now I can work with the apis - next step check for Room Availability, then create the Reservation - 










I can then use the Reservation Id to complete the Check In process -

Check in has 2 steps - 

1. Room Assignment

2. Checkin











There is a partner program run by the OHIP folks which gives one access to the Oracle Hospitality Integration Platform. Their collateral also includes a postman collection that one can use to test the apis.

So let's start off with looking for room availability and then reserving a room - 










Reservation Id is in the Response header - Location -









In my case, 18175.

I can use this to retrieve, update, cancel the reservation - 











Note the profile id - CRM part of Opera Cloud














Ok, so now we have reserved the room and today's the day - time to check in.

Another useful api in this respect is the following - 














Checkin is only valid on the date of arrival.

I already mentioned room assignment, so this is where I go back to my pre-covid experience of checking into hotels. Front office staff look for available rooms - 


  










looks like room 101 is good -  I try to assign this - 










Looks like Fergus has beat me to it!

I try again with room 102 - 













I check the available rooms and find - 














Granted, it is a Superior room, but I deserve the upgrade.

Room 308 it is then!









Finally, the Check In api call - 











Naturally, I have a Postman environment that is used by all of the calls -






Now to getting all of this running in OIC, with a Visual Builder front end.

The Postman collection is of great help here - providing me with the apis I need to call and sample request and response payloads.

OHIP Connectivity in OIC

Essentially I have created an integration for each of the Postman calls I have shown.

















Check4rooms and ReserveRoom cover the Reservation side of the house.

CheckInGetRooms returns the rooms available at Check in time.
AssignRoom4Checkin assigns a vacant room to the guest.
CheckIn - completes the Check In process. 


Firstly, the OHIP connection definition:












Note: I am using the OIC REST adapter.

I leverage an OIC Lookup for some of the required values, stored in the Postman environment file.












I will detail how to "migrate" some of these to the Connection definition in my next post.  

First Integration is Check for Room Availability - 

GetAvailability Integration














The REST Trigger - GetRooms - is configured as follows - 




















Now to GetAvailability, which invokes the OHIP api.






























Note the Standard and Custom HTTP Headers above.

Mapping is simple - some leveraging the builtin OIC lookup function -














Now to a Test - 














€300 - what a bargain - must be an April Fool!

Now to the Create Reservation Integration - 

CreateReservation Integration 

Same process here - 

























ReserveRoom configuration -



















The Location Header will contain the Reservation Id.

I then use the substring function to extract the aforementioned.





Let's test this in OIC - 














I check my email for the confirmation - remember the Notification action (NotifyGuest) in the integration?








Now to checkin step 1 - Assigning a room -

Check4VacantRoomsOnCheckin Integration

Just think of the receptionist looking for free rooms -














So plenty of room at the inn. This integration takes the reservationId and a frontOfficeStatus as parameters. The value of the latter is set to "Vacant".














GetVacantRooms4Checkin configured as follows - 















The next step is Assign the Room - 

AssignRoom4CheckIn Integration

I won't go thru the whole config screenshots again here, suffice headers, payloads etc. based on the Postman samples.

Here is a test -




















Here I tried to assign room 308, but maybe you recall that is the room I already assigned earlier.
Note the error message returned by OHIP - 






























But 310 is free.

Final step is the actual checkin -

CheckIn Integration 





Test - 
























I check the Activity Stream -
















































No comments: