Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
import ThemedImage from '@theme/ThemedImage';
import useBaseUrl from '@docusaurus/useBaseUrl';

# Example

## What you'll build

Build an integration that connects to SAP SuccessFactors Employee Central and retrieves advance installment records through the SAP SuccessFactors Employee Central Advances connector. The integration exposes an automation entry point that calls the operation and stores the result in a variable you can process further.

**Operations used:**
- **List Advances Installmentss** : Queries the AdvancesInstallments collection and returns a page of entities, optionally filtered, sorted, and paged through OData query options.

## Architecture

```mermaid
flowchart LR
A((User)) --> B[List Advances Installmentss]
B --> C[SAP SuccessFactors Employee Central Advances Connector]
C --> D((SAP SuccessFactors OData API))
```

## Prerequisites

- Access to a SAP SuccessFactors OData API server (see the [setup guide](setup-guide.md))
- A company ID, username, and password, or OAuth 2.0 credentials

## Setting up the SAP SuccessFactors Employee Central Advances integration

> **New to WSO2 Integrator?** Follow the [Create a New Integration](../../../../develop/create-integrations/create-a-new-integration.md) guide to set up your integration first, then return here to add the connector.

## Adding the SAP SuccessFactors Employee Central Advances connector

### Step 1: Open the connector palette

1. Select **Add Artifact**.
2. Select **Connection** to open the connector search palette.

<ThemedImage
alt="SAP SuccessFactors Employee Central Advances connector palette open before selection"
sources={{
light: useBaseUrl('/img/connectors/catalog/hrms/sap.successfactors.ecadvances/ballerinax_sap_successfactors_ecadvances_screenshot_01_palette.png'),
dark: useBaseUrl('/img/connectors/catalog/hrms/sap.successfactors.ecadvances/ballerinax_sap_successfactors_ecadvances_screenshot_01_palette.png'),
}}
/>

### Step 2: Select the SAP SuccessFactors Employee Central Advances connector

1. Enter `ecadvances` in the search field.
2. Select the **Ecadvances** connector card.

## Configuring the SAP SuccessFactors Employee Central Advances connection

### Step 3: Bind the connection parameters to configurable variables

Bind every required connection field to a configurable variable.

- **Config** : Expression containing the `auth` credentials for the SAP SuccessFactors OData server — bind `username` to a `sfUsername` configurable variable and `password` to a `sfPassword` configurable variable.
- **Hostname** : The SAP SuccessFactors OData API server hostname — bind to a `sfHostname` configurable variable.

<ThemedImage
alt="SAP SuccessFactors Employee Central Advances connection form with all parameters bound before saving"
sources={{
light: useBaseUrl('/img/connectors/catalog/hrms/sap.successfactors.ecadvances/ballerinax_sap_successfactors_ecadvances_screenshot_02_connection_form.png'),
dark: useBaseUrl('/img/connectors/catalog/hrms/sap.successfactors.ecadvances/ballerinax_sap_successfactors_ecadvances_screenshot_02_connection_form.png'),
}}
/>

### Step 4: Save the connection

Select **Save Connection** and verify that **ecadvancesClient** appears in the **Connections** section.

<ThemedImage
alt="SAP SuccessFactors Employee Central Advances connection visible after saving"
sources={{
light: useBaseUrl('/img/connectors/catalog/hrms/sap.successfactors.ecadvances/ballerinax_sap_successfactors_ecadvances_screenshot_03_connections_list.png'),
dark: useBaseUrl('/img/connectors/catalog/hrms/sap.successfactors.ecadvances/ballerinax_sap_successfactors_ecadvances_screenshot_03_connections_list.png'),
}}
/>

### Step 5: Set actual values for your configurables

1. Select **Configurations** at the bottom of the project tree under **Data Mappers**.
2. Enter a value for each configurable listed below before you run the integration.

- **sfUsername** (`configurable string`) : The SAP SuccessFactors login username, formatted as `<username>@<companyID>`.
- **sfPassword** (`configurable string`) : The SAP SuccessFactors login password.
- **sfHostname** (`configurable string`) : The SAP SuccessFactors OData API server hostname, for example `api68sales.successfactors.com`.

## Configuring the SAP SuccessFactors Employee Central Advances List Advances Installmentss operation

### Step 6: Add an automation entry point

1. Select **Add Artifact**.
2. Select **Automation**.
3. Select **Create** to accept the default settings.

### Step 7: Expand the connection and configure the List Advances Installmentss operation

1. Select the **+** icon between **Start** and **Error Handler**.
2. Expand **ecadvancesClient** to display its operations.

<ThemedImage
alt="SAP SuccessFactors Employee Central Advances connection expanded to display operations before selection"
sources={{
light: useBaseUrl('/img/connectors/catalog/hrms/sap.successfactors.ecadvances/ballerinax_sap_successfactors_ecadvances_screenshot_04_operations_panel.png'),
dark: useBaseUrl('/img/connectors/catalog/hrms/sap.successfactors.ecadvances/ballerinax_sap_successfactors_ecadvances_screenshot_04_operations_panel.png'),
}}
/>

3. Select **List Advances Installmentss**. The operation has no required parameters, so review the auto-generated result variable.

- **Result** : Name of the variable that stores the returned advances installment records — leave the default value, `ecadvancesWrapper`.

<ThemedImage
alt="SAP SuccessFactors Employee Central Advances List Advances Installmentss operation with all values entered before saving"
sources={{
light: useBaseUrl('/img/connectors/catalog/hrms/sap.successfactors.ecadvances/ballerinax_sap_successfactors_ecadvances_screenshot_05_operation_form.png'),
dark: useBaseUrl('/img/connectors/catalog/hrms/sap.successfactors.ecadvances/ballerinax_sap_successfactors_ecadvances_screenshot_05_operation_form.png'),
}}
/>

4. Select **Save**. The operation step appears in the automation flow between **Start** and **Error Handler**.

<ThemedImage
alt="Completed SAP SuccessFactors Employee Central Advances flow with the configured operation"
sources={{
light: useBaseUrl('/img/connectors/catalog/hrms/sap.successfactors.ecadvances/ballerinax_sap_successfactors_ecadvances_screenshot_06_completed_flow.png'),
dark: useBaseUrl('/img/connectors/catalog/hrms/sap.successfactors.ecadvances/ballerinax_sap_successfactors_ecadvances_screenshot_06_completed_flow.png'),
}}
/>

## Try it yourself

Try this sample in WSO2 Integration Platform.

[![Deploy to Devant](https://openindevant.choreoapps.dev/images/DeployDevant-White.svg)](https://console.devant.dev/new?gh=wso2/integration-samples/tree/main/integrator-default-profile/connectors/ecadvances_connector_sample)

[View source on GitHub](https://github.com/wso2/integration-samples/tree/main/integrator-default-profile/connectors/ecadvances_connector_sample)

## More code examples

The SAP SuccessFactors Employee Central connectors provide practical examples illustrating usage in various scenarios. Explore these [examples](https://github.com/ballerina-platform/module-ballerinax-sap.successfactors.employeecentral/tree/main/examples), covering use cases like syncing employee data and sending notifications.

1. [Google Sheets to SuccessFactors](https://github.com/ballerina-platform/module-ballerinax-sap.successfactors.employeecentral/tree/main/examples/google-sheets-to-successfactors) : Read employee records from a Google Sheets roster and create Personal Information records in SuccessFactors.
2. [SuccessFactors to Slack](https://github.com/ballerina-platform/module-ballerinax-sap.successfactors.employeecentral/tree/main/examples/successfactors-to-slack) : Poll SuccessFactors for newly onboarded employees and send welcome notifications to a Slack channel.
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
connector: true
connector_name: "sap.successfactors.ecadvances"
title: "SAP SuccessFactors Employee Central Advances"
description: "Overview of the ballerinax/sap.successfactors.ecadvances connector for WSO2 Integrator."
---

[SAP SuccessFactors Employee Central](https://www.sap.com/products/hcm/core-hr-payroll.html) 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 Advances provides a way to interact with the [SAP SuccessFactors Employee Central APIs](https://api.sap.com/package/SuccessFactorsEmployeeCentral/overview).

## Key Features

- Manage employee salary advance requests and eligibility
- Track advance accumulation and repayment schedules
- Query installment plans and advance history

## Actions

The connector exposes a single client for all ecadvances operations against the SAP SuccessFactors OData v2 API.

| Client | Actions |
|--------|---------|
| `Client` | AdvancesInstallments, AdvancesEligibility, AdvancesAccumulation, Advance |

See the **[Action Reference](action-reference.md)** for the full list of operations, parameters, and sample code for each client.

## Documentation

* **[Setup Guide](setup-guide.md)**: How to obtain the connection details required by the connector from your SAP SuccessFactors instance.

* **[Action Reference](action-reference.md)**: Full reference for all clients, operations, parameters, return types, and sample code.

* **[Example](example.md)**: Learn how to build and configure an integration using the **SAP SuccessFactors Employee Central Advances** connector, including connection setup, operation configuration, and execution flow.

## How to contribute

As an open source project, WSO2 welcomes contributions from the community.

To contribute to the code for this connector, please create a pull request in the following repository.

* [SAP SuccessFactors Employee Central Advances Connector GitHub repository](https://github.com/ballerina-platform/module-ballerinax-sap.successfactors.employeecentral)

Check the issue tracker for open issues that interest you. We look forward to receiving your contributions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
connector: true
connector_name: "sap.successfactors.ecadvances"
title: "Setup Guide"
description: "How to set up and configure the ballerinax/sap.successfactors.ecadvances connector."
---

import ThemedImage from '@theme/ThemedImage';
import useBaseUrl from '@docusaurus/useBaseUrl';

# Setup Guide

This guide walks you through getting the necessary details from SAP SuccessFactors so that the connector can authenticate and communicate with your Employee Central instance.

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](https://help.sap.com/viewer/d599f15995d348a1b45ba5603e2aba9b/LATEST/en-US/af2b8d5437494b12be88fe374eba75b6.html).

## 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:

```sh
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](/img/connectors/catalog/hrms/sap.successfactors/search-oauth2-client-applications.png)

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

| Field | Description |
|-------|-------------|
| Application Name | A name to identify this integration |
| Description | An optional description |
| X.509 Certificate | The 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.

<ThemedImage
alt="View a registered OAuth2 client application"
sources={{
light: useBaseUrl('/img/connectors/catalog/hrms/sap.successfactors/view-oauth2-client-application.png'),
dark: useBaseUrl('/img/connectors/catalog/hrms/sap.successfactors/view-oauth2-client-application.png'),
}}
/>

You now have everything the connector's SAML Bearer configuration needs: the API Key, the Company ID, the username to authenticate as, your `private_key.pem` and `certificate.pem` files, and the OAuth2 token endpoint (typically `https://<admin-center-host>/oauth/token`).

## Next steps

- [Action Reference](action-reference.md) - Available operations
Loading