Skip to Content
Personal Insights

3rd Party Integration – Create User Output REST API

Good day fellow SF’ers

 

Today I will share with you how to create a User upload from Employee Profile to a 3rd party vendor using a REST API.

The specific use case at play here is that the 3rd party currently is receiving a CSV report on an ad hoc basis, but the desire is to have more frequent updates on users (both active and inactive) and multiple users that are linked together because of Global Assignments or Concurrent Employment to be identified.  For the latter, I will also include the Person ID which links the two users together.

I will create an API using the standard SuccessFactors Integration Centre (IC).  You do not require middleware additionally for this type of integration.

To start off, navigate to Integration Centre in Admin Tools, and click My Integrations to see a list of current integrations and also where you will create new integrations.  Click Create, then More Integration Types.

Create%20a%20new%20Outbound%20Integration

Create a new Outbound Integration

We will set this up to periodically trigger to the 3rd party vendor’s API, so select the Trigger Type as Scheduled.  The Source Type is SuccessFactors, while the Destination Type is REST.  Finally, the Format is XML (depends on your preference and the 3rd party) and then you will click Create.

Selection%20on%20the%20Integration%20Type

Selections for the Integration Type

Seeing as most of the fields required are found within the Employee Profile (EP), select User as the starting entity.

The%20starting%20entity%20is%20User%20for%20the%20EP%20fields

The starting entity is User for the EP fields

On the Options tab, enter a name and description for the integration, and click Next to proceed to the Configure Fields tab.

On the Configure Fields tab, you will add the fields that you want in your POST method.  To do so, Switch to Field Mapping View, select Root, and click Add Child Element.  Add as many as is required for the field that should be in your POST.  In my example, I will add 6 elements to cover:  Status, User ID, Username, First Name, Last Name, Email Address and Person ID (which comes from the Biographical Information portlet),

Add%20Child%20Elements%20for%20the%20required%20fields%20in%20you%20Output

Add Child Elements for the required fields in your Output

Now I will drag the fields from the left onto my added Child Elements to map the SFSF fields.  My requirement is to also provide the 3rd party with the Person ID to identify linked records (in cases such as Global Assignments) so they can handle “duplicates”.  For this, navigate to empInfo under user, and drag personIdExternal to the relevant Element.

Drag%20the%20desired%20fields%20from%20the%20left%20to%20the%20Destination%20Fields%20column%20in%20the%20centre

Drag the desired fields from the left to the Destination Fields column in the middle

Now, the output is not very explanatory.  While we know what the fields are that are mapped to each element, the output doesn’t reflect that.  To remedy this, click Switch to Detail View, and navigate to each element, and enter the desired text in the XML Element Name field.  Note, you cannot add spaces or special characters other than “inverted commas”.  The Preview is also updated with the changes.  Once updated, click Next.

Change%20to%20Detail%20View%20to%20update%20the%20names%20of%20the%20Elements

Change to Detail View to update the names of the Elements

On the Filter and Sort tab, set your required parameters, for example, to ensure only changes to employees since the last time the IC Job ran, under Time-Based Filters, you can set Modified or Effective Since, and select Last Run Time. I would also set Advanced Filters to include both “t” and “f” statuses, which are “active” and “inactive” – otherwise only active records are contained in the payload.  Click Next.

Set your desired filters to restrict the payload that the 3rd party receives

On the Destination Settings tab, you will configure the API Endpoint and any authentication.  Click Next.

Set%20Destination%20Configuration%20as%20per%203rd%20party

Set Destination Configuration as per 3rd party

On the Scheduling tab, set up your required frequency, and click Next.

Set%20frequency

Set frequency

Finally, on the Review and Run tab, you can review your settings, save the integration, and set the schedule.  You can also trigger it to run immediately.

Review%20and%20Run%20your%20integration

Review and Run your integration

To test your integration, click Run Now to test the connection to the API URL and the output if desired.

API%20Response%20at%20Destination

API Response at Destination

As you can see, the two highlighted records have two different User IDs, but the same Person Id External.  In this particular case, Evgenya Pavlova is on Global Assignment.  For clarification of SuccessFactors User IDs, see KBA 2495643.

As always, feel free to comment on this post, or ask any questions.

Have a great day!

 

Regards

Eugene

Be the first to leave a comment
You must be Logged on to comment or reply to a post.