Module sap.successfactors.ecglobalbenefits

ballerinax/sap.successfactors.ecglobalbenefits Ballerina library

1.1.1

Overview

SAP SuccessFactors Employee Central is a comprehensive human capital management solution that helps organizations manage their workforce effectively. It provides a unified platform for HR processes including employee data management, organizational structures, and employment lifecycle management.

WSO2 SAP Successfactors Global Benefits provides a way to interact with the SAP SuccessFactors Employee Central APIs.

Key Features

  • Manage comprehensive employee benefits including insurance and savings plans
  • Access pension funds, company cars, and benefit enrollments
  • Query benefit employee claims and eligibility records

Setup guide

This connector supports two authentication methods: Basic Authentication and OAuth 2.0 SAML Bearer.

Method 1: Basic Authentication

If you already have a username and password for this integration to work, you can use those directly. If you'd rather create a new account with narrowed scope for this integration, follow these steps:

  1. Sign in to your SAP SuccessFactors instance as an administrator.
  2. Navigate to Admin Center > Add New Employee and create a new user account for this integration.
  3. Navigate to Admin Center > Manage Permission Roles, create a role scoped to only the permissions this integration needs, and grant it to the new user.
  4. Navigate to Admin Center > Reset User Password and set a password for the new user account.

In either case, you will also need the API server hostname for your SuccessFactors region, for example, api12.successfactors.eu. The complete list of API server hostnames by region is available in the SAP SuccessFactors API documentation.

Method 2: OAuth 2.0 SAML Bearer

Step 1: Generate a key pair and certificate

  1. Generate an RSA key pair and a matching X.509 certificate. If you don't already have one, generate a self-signed pair with OpenSSL:

    Copy
    openssl req -x509 -newkey rsa:2048 -keyout private_key.pem -out certificate.pem -days 365 -nodes -subj "/CN=YourAppName"

    private_key.pem is secret - it never leaves your machine or gets uploaded anywhere. Only certificate.pem is registered with SAP.

Step 2: Register an OAuth2 client application

  1. Sign in to your SAP SuccessFactors instance as an administrator.

  2. Search for Manage OAuth2 Client Applications in Admin Center's action search, or navigate to it directly under Admin Center > Company Settings.

    Search for Manage OAuth2 Client Applications

  3. Choose Register Client Application and provide the following information:

    FieldDescription
    Application NameA name to identify this integration
    DescriptionAn optional description
    X.509 CertificateThe contents of certificate.pem as a single continuous base64 string, with the -----BEGIN CERTIFICATE----- / -----END CERTIFICATE----- lines and line breaks removed. Produce this with awk '/BEGIN CERTIFICATE/{flag=1;next}/END CERTIFICATE/{flag=0}flag' certificate.pem | tr -d '\n' and paste the single line of output it prints.
  4. Choose Register to save the application.

Step 3: Note your credentials

After registering, open the application (choose View from the application list) to find the Company ID and the API Key SAP assigned to it.

View a registered OAuth2 client application

You now have everything sap:SamlBearerAuthConfig needs:

  • apiKey - the API Key from the application you just registered
  • companyId - the Company ID shown on the same screen
  • username - the SAP user to authenticate as
  • privateKey - the path to your private_key.pem file
  • certificate - the path to your certificate.pem file, or its content
  • tokenUrl - your Admin Center's OAuth2 token endpoint, typically https://<admin-center-host>/oauth/token

Quickstart

To use the sap.successfactors.ecglobalbenefits connector in your Ballerina application, modify the .bal file as follows:

Step 1: Import the module

Import the sap.successfactors.ecglobalbenefits module.

Copy
import ballerinax/sap.successfactors.ecglobalbenefits as globalbenefits;

Step 2: Instantiate a new connector

Use the hostname and credentials to initiate a client.

Copy
configurable string hostname = ?;
configurable string username = ?;
configurable string password = ?;

globalbenefits:Client globalbenefitsClient = check new (
    {
      auth: {
        username,
        password
      }
    },
    hostname
);

Step 3: Invoke the connector operation

Now, utilize the available connector operations.

Copy
globalbenefits:BenefitEmployeeClaimWrapper result = check globalbenefitsClient->listBenefitEmployeeClaims();

Step 4: Run the Ballerina application

Copy
bal run

Examples

The SAP SuccessFactors Employee Central Ballerina connectors provide practical examples illustrating usage in various scenarios. Explore these examples, covering use cases like syncing employee data and sending notifications.

  1. Google Sheets to SuccessFactors - Read employee records from a Google Sheets roster and create Personal Information records in SuccessFactors.

  2. SuccessFactors to Slack - Poll SuccessFactors for newly onboarded employees and send welcome notifications to a Slack channel.

Import

import ballerinax/sap.successfactors.ecglobalbenefits;Copy

Other versions

Metadata

Released date: about 19 hours ago

Version: 1.1.1

License: Apache-2.0


Compatibility

Platform: any

Ballerina version: 2201.13.0

GraalVM compatible: Yes


Pull count

Total: 2

Current verison: 0


Weekly downloads


Source repository


Keywords

Name/SAP Success Factors Global Benefits

Type/Connector

Vendor/SAP

Area/ERP & Business Operations

Business Management/HCM

Cost/Paid

SuccessFactors

Employee Central

Global Benefits


Contributors