Showing posts with label HCM. Show all posts
Showing posts with label HCM. Show all posts

Tuesday, September 13, 2022

#929 OIC - HCM Register for Training - Create Absence Use case







This is a typical HCM extension use case for OIC. Allow employees to register for training, the registration resulting in the creation of the relevant absence record in Fusion HCM. My usual caveat applies here - I am not an HCM expert, but this post may be useful for other integration specialists tasked with doing such. As usual I am leveraging Postman at the outset - 

The HCM REST API doc is a good place to start - 







The following seems to be the basic payload required to create an absence record -

{"personNumber"7,
"absenceType""Training",
"employer":"US1 Legal Entity",
"startDate":"2023-09-27",
"endDate""2023-09-28",
"absenceStatusCd":"SUBMITTED",
"startDateDuration"8,
"endDateDuration"8}

personNumber identifies the employee

absenceType = "Training" - makes sense for this use case.

employer - so where do I get this info? Let's look up our employee - Alan Cook - in HCM -








There we find the legal employer.

absenceStatus can be set to SAVED or SUBMITTED

personNumber identifies the employee - I retrieved this by executing the following REST request -

/hcmRestApi/resources/11.13.18.05/emps?q=FirstName=Alan;LastName=Cook&fields=PersonId,PersonNumber

startDateDuration/endDateDuration refers to the number of hours which will be assigned to Training. In my case, full days - i.e. 8 hours.

The response - 


 






Now to the UI, here I use Visual Builder - 









Now to Fusion HCM - I begin by creating a Sandbox - 


Ensure Page Integration is active for this sandbox - 














I then navigate to Page Integration -










Next step is to position this new page in the Fusion HCM structure - 






Per default, the new page has been located here - 


Let's move it to the Me group -








One has to activate anonymous access to the Visual Builder app to get this working - in real-life one would do this via SSO - a subject for a future blog post.

Now to the OIC integration that creates the absence record in HCM.

I leverage the OIC HCM Adapter here, which essentially invokes the REST service I already tested in Postman.

The payload is the same as the Postman request - 














The HCM Invoke is configured as follows - 














Mapping is simply to target fields of the same name.

personAbsenceEntryId is the return value we are interested in. This id can be used to retrieve the absence record from HCM - 





 

The final piece we need to add is the invoke of the OIC endpoint from Visual Builder - 

I start by creating a connection definition.


 







Now to invoking this from the Create page actionChain -



Let's try out the whole flow - 








We can validate in HCM - 





Monday, April 12, 2021

#840 Box to HCM Cloud --> HDL File Load

Simple scenario here: read HDL file from Box and upload to HCM 







This is a customer use case, where she edits HCM worker.dat files and then uploads them to a folder on Box. OIC will be the plumbing between Box and HCM. 

Box adapter will be used as a Trigger in the OIC integration -

Box Developer Setup

First step is to get yourself a Box account and then go to https://app.box.com/developers

Create an App - 
















Copy the Client Id and Secret for future use - 






Set the Redirect URI -




format is myOIC:443/icsapis/agent/oauth/callback 

Select Read/Write - 











Generate Primary and Secondary Key - 














Copy these for future use.


 







Create Box connection in OIC











Then Click Provide Consent

Then your connection should show 100% complete. 

Save and Exit.

Now to a simple sanity test - create a folder in Box and copy the folder id.

This is in the url.










Create an App-Driven Orchestration












Drop the Box Connection as a Trigger and configure as follows - 











I add a Log Action - 









Activate and Test by uploading a file to Dropbox -






























Now to the HCM side of the house...

Here is my Oracle HCM Cloud Connection - 












Here is it's configuration in my integration - 



































Now back to Box, I have received the notification a file has been uploaded, but now I need to actually download that file - so I leverage the Box connection, configured as follows - 








 

















Mapping for Download - 









Now to the mapping for the HCM HDL upload - note, I am only displaying mapped fields.
I pass the file reference from the Box FileDownload and I also set the Target FileName to that from the initial Box FileUpload Trigger.










Now to test - Here is a sample worker.dat -









I zip this up and upload to Box -




















Here is the response from HCM - 













I check the upload in HCM itself - 

Import and Load have completed successfully - 













I check for the new employee in HCM -


















The final integration is as follows - 






Now, one could also add a check on HCM import/load process. In this case the customer wants a response posted to Box with import/load status and, if successful, some fields from the employee record.



 













You could implement this in the same integration, but, probably better to externalise this - have a scheduled job that runs frequently, checking on import/load progress and updating Box accordingly.















Load