# Sage X3

> What is known about connecting Sage X3 to BatteryPass, and what still has to be clarified.

> [!WARNING]
> Not checked: Sage names a GraphQL API for X3, but its reference is open to partners only, and we could not confirm
> sign-in or objects. Clarify the interface with Sage or your partner before a project.

> [!NOTE]
> This page describes an integration pattern. BatteryPass ships no connector for Sage X3 and has no partnership with
> Sage; nothing here is a vendor approval.

Whatever interface your X3 offers, the shape on the BatteryPass side stays the same: a middleware reads the serial
numbers of finished production, writes a file with the `generic-csv` preset and stages it as in
[units from production](https://passport.kabin.sh/docs/en/integrations/workflows/units-from-production); members commit and approve it in the
portal. Until the interface is clarified, a scheduled export of a file with these columns is a safe start.

## Interfaces and how they were checked

- **Vendor:** Sage
- **Cloud:** Sage X3
- **On-premise:** Sage X3

Not checked: Sage names a GraphQL API; the reference is open to partners only. Clarify with the vendor before the project.

An integration pattern, not a connector: BatteryPass ships no ERP connector and holds no vendor certification.

| Interface                                                            | Protocol | Sign-in                      | Events | Objects                                      | Checked     |
| -------------------------------------------------------------------- | -------- | ---------------------------- | ------ | -------------------------------------------- | ----------- |
| [`GraphQL API`](https://developer.sage.com/x3/graphql) (GraphQL API) | GraphQL  | OAuth 2.0 client credentials | none   | Product/material master, Batch/serial number | not checked |

**Notes**

- `GraphQL API`: Sign-in and objects not checked.

**Import presets: Generic CSV file** (`generic-csv`): For any ERP and for files a middleware writes itself: GTIN, serial number, manufacturing date, facility (name or GLN), model version and battery status, with German and English column names.

| Column in the export                                          | Field in BatteryPass                                      |
| ------------------------------------------------------------- | --------------------------------------------------------- |
| `GTIN` (also EAN, GTIN-13, GTIN-14)                           | GTIN (GS1) `identification.gtin`                          |
| `Serial number` (also Seriennummer, serial_number)            | Serial number `identification.serial_number`              |
| `Manufacturing date` (also Herstelldatum, manufacturing_date) | Manufacturing date `identification.manufacturing_date`    |
| `Facility` (also Produktionsstätte, Facility GLN, Werk-GLN)   | Place of manufacture `identification.manufacturing_place` |
| `Model version` (also Modellversion, model_version)           | Model version `model_version`                             |
| `Battery status` (also Batteriestatus, battery_status)        | Battery status `identification.battery_status`            |

## Workflows

- [Units from production](https://passport.kabin.sh/docs/en/integrations/workflows/units-from-production.md): Serial numbers from the production confirmation or goods receipt are staged as an import; members review, commit and approve before any passport appears. Key scopes: import
- [Passport links back into the ERP](https://passport.kabin.sh/docs/en/integrations/workflows/passport-links-to-erp.md): The middleware follows the change feed and writes the GS1 Digital Link and the passport status to the serial number record in the ERP, so labels and delivery papers carry it. Key scopes: read
- [Returns and repairs as lifecycle events](https://passport.kabin.sh/docs/en/integrations/workflows/returns-and-repairs.md): Completed repairs, inspections and component replacements from service or return orders appear as events in the unit's history. Key scopes: read, condition
