Monday, April 19, 2021

#842 OIC - Oracle Hospitality syncing Company/Guest with SFDC Account/Contact








I covered the very basic Oracle Hospitality to SFDC integration a couple of posts ago. Now to a more compelling example - Oracle Hospitality allows us to create profiles for companies and guests - the latter being employees of the former. So, with this background, how about syncing Oracle Hospitality company and guest profiles with SFDC Accounts and Contacts?

I start, as usual, in Postman - working out which REST apis I need to invoke -

Here is the api to create a company profile - I create one for the Hare of the Dog Pub.

Note the id returned - 17858.

I then create a Guest profile - for the Hare's general factotum - Jimmy Keenahann.


 











Note the id for Jimmy - 17860.

Now to create the relationship between the 2 -











I now update the Company Profile with address and telephone data -













I also update Jimmy's profile - 














I can now use the following api to retrieve the relationship -













With OHIP, one can create a reservation for an existing profile id -



 







Note the reservation id - 19650.

I can use this to retrieve the Reservation, which will include the profile id -














Final step - I use the following api to store Jimmy's preferences for Banquets.













So now to the integration use case - based on a reservation id 

- retrieve the guest profile

- retrieve the company 

SFDC - check if an Account exists for the OH Company - if not, create a new Account in SFDC.

SFDC - check if a Contact exists for the OH Guest -  if not, create a new Contact in SFDC, linked to the relevant Account.

So let's build this incrementally - first step goes as far as creating the Account in SFDC -













I use the following SOQL in Check4Account - 














The SWITCH action is used to check if any records are returned - 













Now to testing...

CreateAccount returns me the SFDC Account id - 








I can check this out in SFDC - 








Note the id in the url.

Next step is to create the contact - now to save time, I won't go thru the existence check steps beforehand - you've already seen how easy it is to do that.













Check4Contact uses SOQL - checking for match on name and Contact Account Id -












The CreateContact configuration is simple - 











I only map a couple of fields - name etc. and accountId - 

Note: I am only showing the mapped fields -












Test Result in SFDC -









Now in a real life situation I could have a plethora of information coming from Oracle Hospitality e.g.













So I would probably add a couple of custom objects to my CRM to store such data. 

















I have surfaced these as the Bookings and Guest Preferences sections in the SFDC Contacts page -


 






























Bookings - could include reservation / stay data; a reservation morphing into a stay, once the guest has checked out. Sales activities with this SFDC contact can, of course, be progressed thru the standard SFDC business objects - Opportunities etc.

Naturally, I can update these custom business objects via the OIC SFDC adapter - 










No comments:

Post a Comment