> ## Documentation Index
> Fetch the complete documentation index at: https://developers.techwolf.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# How It Works

## Data Flow

* The SAP BTP Skill Sync brokers all communication between TechWolf and SAP
  SuccessFactors through three Integration Flows deployed in the customer's SAP
  Integration Suite. Every request passes through a customer-owned iFlow, so
  TechWolf never calls SuccessFactors APIs directly.
* The iFlows authenticate to SuccessFactors using an OAuth 2 SAML Bearer
  Assertion, backed by a customer-managed X.509 certificate stored in the BTP
  Keystore. TechWolf authenticates to the iFlows using OAuth 2 Client
  Credentials, backed by the Process Integration Runtime service key created
  during installation
  ([Employees <Icon icon="link" iconType="solid" />](/integrations/sap-btp-skill-sync/installation-employees)
  /
  [Jobs <Icon icon="link" iconType="solid" />](/integrations/sap-btp-skill-sync/installation-jobs)).
* Employee and Job Skills are synchronized in a bidirectional flow, where
  Employee and Job Skill data updates in the TechWolf SkillEngine API are
  synchronized in real-time to SAP SuccessFactors using the iFlows, following a
  push strategy.
  * TechWolf-originated Employee Skill Profile updates are pushed to SAP
    SuccessFactors Growth Portfolios using the **Update Employee Growth
    Portfolio** Integration Flow.
  * TechWolf-originated Job Skill Profile updates are pushed to SAP
    SuccessFactors Job Role Skill Mappings using the **Update
    RoleSkillMappingEntity** Integration Flow.
* SAP SuccessFactors updates to Job Skill Profiles are synced at regular
  intervals to the SkillEngine API using a TechWolf-initiated pull strategy.
  * The frequency by which SAP SuccessFactors Skills are synchronized to
    TechWolf is configurable, but bi-hourly by default.
  * TechWolf pulls the current state of the Job Role Skill Mappings from SAP
    SuccessFactors using the **Query RoleSkillMappingEntity** Integration
    Flow.
  * Job Skills synced by the SAP BTP Skill Sync are tracked using the `source`
    field in the
    [Job Skill Profile Feedback endpoint <Icon icon="link" iconType="solid" />](/reference/latest/Jobs/JobProfile/patch-job-architecture-jobs-job-external-id-skill-profile)
    payload, tagged as `"sap-integration"`. To retrieve these sources from a
    Job, use the
    [List Job Profile Data endpoint <Icon icon="link" iconType="solid" />](</reference/latest/Jobs/Job Profile Data/get-job-architecture-jobs-job-external-id-profile-data>).
    Items with `"data_type": "skill_profile_feedback"` and
    `"source": "sap-integration"` indicate Skills synced by the SAP BTP Skill
    Sync.
* Employee Skills synced by the SAP BTP Skill Sync are tracked using the
  `source` field in the
  [Employee Skill Profile Feedback endpoint <Icon icon="link" iconType="solid" />](/reference/latest/Employees/EmployeeProfile/patch-employees-external-id-skill-profile)
  payload, tagged as `"sap-integration"`. To retrieve these sources in an
  Employee's profile, use the query parameter `?include=sources` in the
  [Employee Skill Profile Feedback endpoint <Icon icon="link" iconType="solid" />](/reference/latest/Employees/EmployeeProfile/patch-employees-external-id-skill-profile),
  which returns the Skill's `source_event` with
  `"event_type": "skill_profile_feedback"` and `"source": "sap-integration"`.
* Every iFlow-brokered call carries the TechWolf **AIR key** in its request
  header so SAP SuccessFactors can attribute traffic to the TechWolf Skill Sync
  partner solution.

In summary: TechWolf uses the three iFlows in your SAP Integration Suite as the
single integration surface to SuccessFactors. Job Skill Profiles sync
bidirectionally (real-time push from TechWolf, bi-hourly pull into TechWolf).
Employee Skill Profiles sync in near-real time from TechWolf to SuccessFactors
via the Talent Intelligence Hub REST API. The latest state of the Employee
Growth Portfolios is also propagated to TechWolf through a file-based sync. All
file-based integrations are managed through the SAP Integration Center.

## Configuration Options

### Sync Direction

The integration supports three sync direction options, specifying which data
flow directions are allowed:

1. **TechWolf - SAP Bidirectional Sync** (default): Two-way sync between
   TechWolf and SAP SuccessFactors; changes made in TechWolf Skill Profiles are
   synchronized to their corresponding SAP SuccessFactors Skill Profiles, and
   vice versa.

2. **TechWolf to SAP Unidirectional Sync**: Skills flow from TechWolf to SAP
   SuccessFactors only; changes made in TechWolf Skill Profiles are copied to
   their corresponding SAP SuccessFactors Skill Profiles, while changes made in
   SAP SuccessFactors are discarded and overwritten with the state of the
   TechWolf Skill Profiles.

3. **SAP to TechWolf Unidirectional Sync**: Skills flow from SAP SuccessFactors
   to TechWolf only; changes made in SAP SuccessFactors Skill Profiles are
   copied to their corresponding TechWolf Skill Profiles, while changes made in
   TechWolf are discarded and overwritten with the state of the SAP
   SuccessFactors Skill Profiles.

### Initial Load Merge Strategy

For the correct functioning of the normal operation of the integration, the
Skill Profiles in both systems should be initially aligned. The integration will
do this initial alignment itself automatically when the integration is first
enabled, or when it is re-enabled after having been paused, or when it
encounters an entity it had no knowledge about yet.

The initial alignment can happen in different ways; we support three such merge
strategy options:

1. **Merge Systems**: Combines Skills from both SAP SuccessFactors and TechWolf
   systems. Skills present in SAP SuccessFactors but not in TechWolf will be
   synced to TechWolf, and vice versa. This preserves existing Skill data in
   both systems. TechWolf takes precedence over SAP SuccessFactors in case of
   conflicting values (e.g. conflicting proficiency levels).

2. **Push TechWolf**: Replaces all Skills in SAP SuccessFactors with the Skill
   data from TechWolf. This strategy clears existing SAP SuccessFactors Skills
   before importing TechWolf data.

3. **Push SAP**: Replaces all Skills in TechWolf with the Skill data from SAP
   SuccessFactors. This strategy clears existing TechWolf Skills before
   importing SAP SuccessFactors data.
