Prerequisites
- Access to SAP Concur with Admin privileges.
- Access to SAP SuccessFactors with Admin privileges.
- Access to a development environment with ability to send HTTPS requests (such as Postman or cURL).
- Basic understanding of REST APIs and JSON data format.
Authentication
SAP Concur
- Generate an API access token:
- Go to the SAP Concur Admin portal.
- Navigate to the 'Integrations' or 'APIs' section.
- Create a new app or use an existing one to get the client ID and client secret.
- Use these credentials to obtain an OAuth2 accessToken by posting to the /oauth2/v0/token endpoint.
SAP SuccessFactors
- Generate an API access token:
- Log in to SAP SuccessFactors.
- Go to Admin Center > Manage OAuth2 Client Applications.
- Create a new OAuth Client providing necessary callback URLs and scopes.
- Record the client ID and client secret.
- Use these credentials to obtain an OAuth2 accessToken by sending a POST request to SuccessFactors OAuth token endpoint.
Steps for Integration
Step 1: Extract User Data from SAP SuccessFactors
- Make an authorized GET request to the SAP SuccessFactors API endpoint that retrieves user data. Typically, this might look like:
- GET /odata/v2/User('userId')
Authorization: Bearer <SuccessFactors access token>
- Parse the JSON response to extract necessary user data fields such as FirstName, LastName, Email, etc.
Step 2: Format Data for SAP Concur
- Map the extracted user data from SAP SuccessFactors to the corresponding fields expected by the SAP Concur User Profile API.
Step 3: Create User Profile in SAP Concur
1. Construct a JSON payload with the user data formatted for SAP Concur. Example:
{
"User": {
"LoginID": "<Email>",
"FirstName": "<FirstName>",
"LastName": "<LastName>",
// Include other necessary fields as per the API specification }
}
2. Make a POST request to the SAP Concur API endpoint (/api/v3.0/profile/users) to create a new user profile:
POST /api/v3.0/profile/users
Content-Type: application/json
Authorization: Bearer <Concur access token>
Body: <JSON payload from the previous step>
Check the response:
- If successful, the API will return a 200 OK status with details of the created user profile.
- If there are errors (e.g., missing required fields, authentication issues), the API will return an error status code and message. Handle these appropriately (e.g., log errors, retry with corrected data).
Step 4: Error Handling and Logging
- Implement error handling to manage failed API requests or unexpected responses.
- Log important events and errors to facilitate troubleshooting and auditing of the integration process.
Step 5: Testing and Validation
- Perform unit and integration tests to ensure that the integration works as expected under different scenarios.
- Validate that new user data in SAP SuccessFactors correctly creates corresponding profiles in SAP Concur without data inconsistency.