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

# How the Fieldglass integration works

> From connection to sync, field mapping, reading records and sending changes.

```mermaid theme={null}
flowchart LR
  FG[Your Fieldglass] -->|sync and events| ID[Integration data]
  ID -->|field mapping| MD[sherpa master data]
  MD --> K[Kora and sherpa workflows]
  ID --> K
  K -->|upload| FG
```

## 1. Sync

After you connect, sherpa reads your Fieldglass lists on a schedule and stores them as integration data: sites, cost centres, legal entities, suppliers, users, workers, work orders and the rest of the lists under [Read](https://docs.sherpahq.ai/integrations/fieldglass/connectors.md#read).

| | Interval |
| - | - |
| Work orders | 15 minutes to daily. From 1 minute with sherpa's copy of Work Order Delta Download. |
| Other lists | Hourly to weekly |

With [events](https://docs.sherpahq.ai/integrations/fieldglass/connectors.md#events) set up, Fieldglass also tells sherpa when a job posting, job seeker, work order or worker changes. When a work order or worker changes, sherpa reads the work orders straight away, without waiting for the next interval. sherpa never copies a record from what an event carries. An event updates a request sherpa sent, or makes sherpa read Fieldglass again.

The schedule keeps running with events. Lists such as sites and cost centres send no events, and an event can be lost.

Integration data is a copy of what Fieldglass returned. Reading changes no records in Fieldglass. sherpa only sets the last run date of its own variant.

## 2. Field mapping

sherpa turns integration data into its own master data. For each list, sherpa takes one sample record and its agent proposes how each Fieldglass field maps to sherpa. You review the proposal before it is used.

A field maps to one of two things:

* **A sherpa field**, when sherpa already has a field for it.
* **A custom field**, when it is specific to your Fieldglass.

Example, for a cost centre:

| Fieldglass field | Sample value | Maps to | Type |
| - | - | - | - |
| `Cost Center Code` | `CC-4410` | Code | sherpa field |
| `Cost Center Name` | `Marketing DE` | Name | sherpa field |
| `Legal Entity` | `1010` | Legal entity | sherpa field |
| `Currency` | `EUR` | Currency | sherpa field |
| `GL Account` | `640100` | GL account | Custom field |
| `Project WBS` | `P-2291-03` | Project WBS | Custom field |

## 3. Reading records

When someone asks Kora for a cost centre, a site or a work order, sherpa answers from two sources:

* **sherpa master data**, for records that were mapped.
* **Integration data**, kept current by the sync, for the Fieldglass values behind them.

Kora doesn't call Fieldglass for each question. Answers are as fresh as the last sync.

## 4. Sending a change

There are two ways a change reaches Fieldglass. Both send through the uploads under [Write](https://docs.sherpahq.ai/integrations/fieldglass/connectors.md#write), and both need a person's approval before anything is sent.

### Through Kora

A member with the permission **Send changes to the VMS** asks Kora to manage a Fieldglass record. For example, a revision of an existing work order.

![A sketch of sherpa's chat asking for approval before sending a work order change to Fieldglass](https://mintcdn.com/sherpa/SU7B9_aSCruyfEcD/images/fieldglass/chat-approval.png?fit=max\&auto=format\&n=SU7B9_aSCruyfEcD\&q=85\&s=ab1ad67c3aa9b8895008ac55c692d92e)

```mermaid theme={null}
flowchart LR
  A[Member asks Kora] --> B[Kora drafts the change]
  B --> C[Member approves]
  C --> D[sherpa uploads to Fieldglass]
  D --> E[Approval in Fieldglass]
  E --> F[sherpa shows the result]
```

### Through a workflow

After intake, the engagement's workflow creates the records in Fieldglass as its steps are reached. For example, a job posting once the request is approved, and a work order once a candidate is chosen.

```mermaid theme={null}
flowchart LR
  I[Intake] --> JP[Create job posting]
  JP --> JA{Approved in Fieldglass?}
  JA -->|Yes| S[Suppliers submit candidates]
  S --> C[Candidate chosen]
  C --> WO[Create work order]
  WO --> WA{Approved in Fieldglass?}
  WA -->|Yes| W[Worker starts]
```

### Following a change

Every change is kept as a request, with its status, approvers and history. It is in the **Requests** tab beside the chat. Requires the permission **View the VMS**.

Each request has its own id, such as `REQ-7K2M9XQ4`.

* **In the chat**, the send leaves a receipt: what was sent, when, and how the request stood when Fieldglass answered. The receipt doesn't change. Each later change adds one line, for example that the request was submitted, who it waits for, or that it was approved.
* **In the Requests tab**, open a request to see how it stands now, who it waits for, and its history. Beside a person who is in sherpa and not yet in the conversation, **Loop in** asks Kora to bring them in. People who aren't in sherpa decide in Fieldglass. Nothing is approved or rejected from the tab.
* **On its own page**, a request shows the same as the tab. The receipt, the lines and sherpa's messages link to it. It has a **Refresh** button.
* **In Slack and Microsoft Teams**, a conversation in one thread gets the same line for each change, with a button to the request's page, when the person who asked is active in that thread. They then get no direct message for that change.

## References

* [SAP Fieldglass Connector Library](https://help.sap.com/doc/e7d299ced5014db7bf04be1237c8efdc/cloud/en-US/SAPFieldglassConnectorLibrary.pdf)
* [SAP Fieldglass Approvals API](https://help.sap.com/doc/d63a5197c77a4a35a05e1c338bd7d15d/cloud/en-US/SAPFieldglassApprovalsAPITechnicalSpecifications.pdf)

Questions: [help@sherpahq.ai](mailto:help@sherpahq.ai).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.