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 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 -
No comments:
Post a Comment