How to send time events through Postman to SuccessFactors Time Management
source link: https://community.sap.com/t5/human-capital-management-blogs-by-members/how-to-send-time-events-through-postman-to-successfactors-time-management/ba-p/13589813
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
01-31-2024 5:15 PM
During SAP SuccessFactors Time Tracking implementation is very common to make some test on how an external terminal could work in integration with the time tracking module.One of the easiest ways we have found is through Postman.
Here is a step by step on how to send time events with Postman that is API platform.1. Go to “Manage OAuth2 Client Applications” transaction.
2. Then go to “Register Client Application” to create a new OAuth2 client.A new screen like the below will appear, introduce the following values
Application Name: Introduce a label for you to identify this client in the client list
Application URL: https://api2preview.sapsf.eu/rest/timemanagement/timeeventprocessing/v1/TimeEvents
3. Go to Generate X.509 Certificate
A new screen will appear, insert a common Name. Any reference label.
a screen like the below will appears:Select: “bind to Users”
Insert the Technical user: TECHNICAL_USER_CICOTERMINAL_9D3F8AC1
Ok, why this user?SfSf has pre-configured users for the OAuth authentication. This was something hard to crack for me, but if you want more info please refer to the following SAP Help |
5. Click Register
6. Copy the X.509 Certificate that you will need during the Postman configuration.
In Postman
At this point, you have already downloaded an installed the Postman software.
A. In collections go to the pus icon and select “blank collection”
B. Select Authorization and “OAuth 2.0”
C. Into the Authorization tab set as follow.D. In the side panel select the first request.
E. In the Headers tab insert:Method: POST
URL: https://api2preview.sapsf.eu/oauth/idp
Content-Type : application/x-www-form-urlencoded
Client_id : here insert the API Key obtained in "Manage OAuth2 Client Applications"
Company_id: yours
User_id : TECHNICAL_USER_CICOTERMINAL_9D3F8AC1
token_url : https://api2preview.sapsf.eu/oauth/idp
private_key : The on e obtained in the X.509 Certificate in the “Manage OAuth2 Client Applications” SfSf transaction
grant_type : urn:ietf:params:oauth:grant-type:saml2-bearer
With these values make a POST call and as a result you Will obtain a Token that Will be used in the next call.
G. The next step is to change the service for https://api2preview.sapsf.eu/oauth/token and introduce a new key called “assertion” where is introduced the token of the previous call.
As a result is obtained a token to be used in the OAUTH call. This token spires in 24 hours.
The last step:
I recommend you to copy the request as shown below:
Then in the Headers tab, insert:
Authorization: Bearer “white space” and the token_oauth
Content-Type: application/json
Accept: application/json
Like below:
And in the Body Tab insert the following sentence
[ { "id": "1", "assignmentId": "USERID", "typeCode": "P10", "timestamp": "2024-01-18T08:00:21+02:00", "terminalId": "the string that represents the terminal (no validation for this value)", "timeTypeCode": "yours time type code" } ] |
As a result is obtained a message like below.
Hope this blog helps!
Special thanks to @daniel_villegas postman and integrations spec!
Recommend
-
16
SAP SuccessFactors EC Time & Attendance : 2H 2021 Release Highlights The Release blog series is back! Here comes the third blog of 2H 2021 release series. This blog, I am going tal...
-
32
Successfactors Time Management – new features in H2 2021 1 12 140 Time Management Folks,
-
3
Code is available on GitHub Event-driven Telegram bot In the
-
3
Neelesh Kamath April 25, 2022 6 minute read ...
-
5
Send Events from SwiftUI to UIKit and Vice Versa // Written by Jordan Morgan /...
-
3
Wes Ancog February 2, 2023 6 minute read ...
-
2
-
4
How...
-
2
Introduction Hi there! The 1H 2023 release upgrade is just around the corner and with that some great enhancements around the handling of public holidays are waiting to be implemented and used. So, let me tell you a little bit about those...
-
4
Overview of requirement Parental leave lets parents take unpaid leave from work to spend time looking after their children. You can take up to 26 weeks’ parental leave for each eligible child before their 12th birthday. G...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK