# SuccessFactors

![SuccessFactors-1-Logo.svg](https://assets.relyanceuat.xyz/images/docs/17128648417805/17128648407309.svg)
SuccessFactors by SAP is a cloud-based software suite that helps organizations manage their workforce efficiently. It offers tools for talent acquisition, performance management, learning and development, compensation, and employee engagement, supporting overall organizational success.

In order to integrate SuccessFactors with Relyance AI you will need to authorize Relyance AI with a SuccessFactors **API Server** URL and **API Key**.

#### SuccessFactors:

1. Go to [https://api.sap.com/loginservice](https://api.sap.com/loginservice) and sign in (or click on Register).
2. After logging in, go to SAP Business Accelerator Hub and under API Settings, click on **Show API Key** and copy the **API Key**.
3. Use the SuccessFactors **API Server** URL - please see: https://help.sap.com/docs/SAP_SUCCESSFACTORS_PLATFORM/d599f15995d348a1b45ba5603e2aba9b/af2b8d5437494b12be88fe374eba75b6.html

#### In the Relyance AI application:

1. Login to your Relyance account.
2. Navigate to the **Settings** Menu in the bottom left-hand side.
3. Select **Integrations**.
4. Click on the **Vendor Integration** tab.
5. Find the **SuccessFactors** integration card and click it to open its connections.
6. Under **Authentication Method**, choose **Custom**.
8. Paste the **API Server** and **API Key** into their respective fields.

![SuccessFactors-1.png](https://assets.relyanceuat.xyz/images/docs/17128648417805/18762014491789.png)

The **Authentication** step asks for:

- Using **Basic Auth** —
    - **API Server (Eg: sandbox.api.sap.com)**: required.
    - **Username**: required.
    - **Password**: required; held as a secret.
    - **Company ID (case sensitive)**: required.
- Using **OAuth2 (SAML2)** —
    - **Authentication URL**: required.
    - **Company ID**: required.
    - **API Key**: required; held as a secret.
    - **User ID**: required.
    - **Private Key**: required; held as a secret.
- Using **Sandbox** —
    - **API Server (Eg: sandbox.api.sap.com)**: required.
    - **API Key**: required; held as a secret.

9. Click **Authenticate**.
10. At this point, you should see the following result on the **Vendor** integrations page:

![SuccessFactors-2.png](https://assets.relyanceuat.xyz/images/docs/17128648417805/18762014495117.png)

11. Congratulations, you are now connected to **SuccessFactors**.

<!-- failure-modes:begin (generated from the integration catalog; do not hand-edit) -->

## If the connection reports Connected but returns nothing

These are the ways this integration comes back empty without reporting an error. Generated from the integration catalog, so it tracks what the connection actually asks for.

1. **A feature you enabled returns nothing.** Some scopes belong to a feature rather than to the connection: **Data subject requests** needs `General User Permission - User Search`, `Manage Foundation Objects Types - Query Permission - BenefitContact`. Turning the feature on after the connection exists does not widen the grant it already holds, so re-authenticate the connection.
2. **A credential rotated at the vendor is not picked up here.** **Password**, **API Key** and **Private Key** are stored when you save the connection, so regenerating the value at the vendor breaks the next scan until it is re-pasted here. Recording the expiry on the connection means Relyance warns you before it lapses.
3. **Check the address fields before suspecting the credentials.** **Authentication URL** identifies which tenant, region or host to talk to. A wrong value there fails authentication and looks exactly like a bad secret.

<!-- failure-modes:end -->

<!-- terraform-examples:begin (generated from the integration catalog; do not hand-edit) -->

## Manage this integration with Terraform

Connections for this integration can be managed as code with the [Relyance Terraform provider](https://registry.terraform.io/providers/Relyance/relyance/latest). Non-secret fields go in `auth.params`; secret fields go in `auth.secrets_wo`, which is write-only — never stored in Terraform state. Rotate secrets by bumping `auth.secrets_wo_version`.

### Username & password

```hcl
resource "relyance_integration_connection" "sapsuccessfactors_0" {
  vendor = "sapsuccessfactors"
  name   = "<your connection name>"

  auth = {
    method = "username-password"
    params = {
      api_server = "<api_server>"
      username = "<username>"
      company_id = "<company_id>"
      data_storage_location = "us"
    }
    # Secret fields are write-only: sent to Relyance, never stored in state.
    secrets_wo = {
      password = var.sapsuccessfactors_password
    }
    secrets_wo_version = 1
  }

  scans = { "data-inspection" = { enabled = true } }
}
```

### Key-pair authentication

```hcl
resource "relyance_integration_connection" "sapsuccessfactors_1" {
  vendor = "sapsuccessfactors"
  name   = "<your connection name>"

  auth = {
    method = "key-pair"
    params = {
      auth_url = "<auth_url>"
      company_id = "<company_id>"
      user_id = "<user_id>"
      data_storage_location = "us"
    }
    # Secret fields are write-only: sent to Relyance, never stored in state.
    secrets_wo = {
      client_id = var.sapsuccessfactors_client_id
      private_key = var.sapsuccessfactors_private_key
    }
    secrets_wo_version = 1
  }

  scans = { "data-inspection" = { enabled = true } }
}
```

### API key

```hcl
resource "relyance_integration_connection" "sapsuccessfactors_2" {
  vendor = "sapsuccessfactors"
  name   = "<your connection name>"

  auth = {
    method = "api-key"
    params = {
      api_server = "<api_server>"
      data_storage_location = "us"
    }
    # Secret fields are write-only: sent to Relyance, never stored in state.
    secrets_wo = {
      api_key = var.sapsuccessfactors_api_key
    }
    secrets_wo_version = 1
  }

  scans = { "data-inspection" = { enabled = true } }
}
```

<!-- terraform-examples:end -->
