In the case of SuccessFactors Integration via SAP Cloud Platform Integration (CPI), we encounter scenarios where we need to retrieve data from SuccessFactors through polling based on certain events (Hire, Rehire, Terminate, Manager Change etc)
In this blog I will try to explain how we can get data in real-time for the events which are pre-defined in Intelligent Services Center.
Why Event Driven Integration?
Conventionally, we schedule SuccessFactors integrations to run at a particular frequency and poll the data based on Last Successful run date (LSRD). Sometimes, the integration tries to poll even when there have been no changes made in SuccessFactors since the last integration run.
Making the integration event driven not only omits unnecessary polling but also gains the advantage of real-time data availability. This is made possible as events within Intelligent Services Center can be promptly triggered as soon as they transpire.
Pre-requisites for trying this integration scenario:
- CPI Access
- In SuccessFactors, access to Intelligent Services Center, Integration Center, Configure Business Rules, Manage Business Configuration and to Add new Employee (since I will demonstrate Hire event scenario)
How to do the Set-Up?
- Integration Flow in CPI
- Produce an integration flow within CPI as instructed which will receive the events from Intelligent Services Center and the endpoint created by integration will be placed in SuccessFactors.
- Add any address in HTTPS adapter (for example : /DemoISC).
- Provide Expression ${in.body} in Content Modifier to read the payload in the trace.
- Deploy the artifact and copy the end point (as highlighted)
- SuccessFactors Set up
- Go to “Configure Business Rules” and create rule (if not already there) for Hire events as shown below. This event triggers New Hire Event in Intelligent services Center.
- Go to “Manage Business Configuration”.
- From the left pane click on “jobInfo”.
- On the right, click on “Take action” and choose “Make Correction”
- Scroll down to Trigger Rules on the same screen and add the rule created in Step 1 as shown below. (Please note that Event Type must be “onPostSave”)
- Getting the predefined events using Intelligent Services Center
- Go to “Intelligent Services Center (ISC)”
- From the list of events, choose Employee Hire
- From the right pane, click “Event Connector” under custom activities.
- From the list of Connectors, Select “New Event Connector”
- Provide CPI end Point copied in the Integration Flow Set up step 4 along with Username and Password of the CPI user.After saving, Event Connector will be added.
- Go to “Add new Employee” in SuccessFactors and fill the new-hire details. (Before submitting the details, go to the integration and set your integration on trace mode).
- After you submit the new hire record, an event must reach CPI as shown below. Hence, this enables triggering of an event whenever a new hire is added to SuccessFactors.
- Creating custom events using “Integration Center”
- Go-to “Integration Center” and select “My Integrations”
- Choose Create from right and hence click on More Integration Types as shown below.
- Configure Integration Type as shown below
- In Search bar, Type “Employee Hire” and select Employee Hire from the drop down. Click select.
- Provide a meaningful Integration name and description and go-to next.
- On configure Fields screen, you can select fields of your choice to define the event.
- Click on Root, and add child element
- Name it userId from XML Element Name and then associate it with user id as shown.
When you click on Change Association to “User ID”, you can see the userId being linked to the userId of Job Information.
- Similarly, other fields can be added as shown and then click next
- Add any filter if needed, otherwise you can skip the step and go to next
- In Destination Settings, provide any Connection name, CPI endpoint in REST API URL, and user credentials.
Note: If Authentication Type is chosen as OAuth, either pre-defined configuration needs to be chosen or you need to create a new OAuth Configuration in “Manage OAuth Configurations”.
Go to next and save the integration created. Click on Run now, you will be able to see a dummy data event in CPI.
We can fetch more information based on the event received from Intelligent Services Center.
Conclusion:
This is how Intelligent Services Center in SuccessFactors can be used to send Events to CPI in real-time. The Process can be decoupled by sending the events to Event Mesh’s Topics/Queues.
Hope this blog helps! 😊
Best Regards,
Deepali
Consultant, Capgemini India