> For the complete documentation index, see [llms.txt](https://help.security.gallagher.com/knowledge-hub/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.security.gallagher.com/knowledge-hub/products/cc-software/configure/interface-options/enterprise-data-interface-edi.md). Agents can also search and read this documentation through its [MCP server](https://help.security.gallagher.com/knowledge-hub/~gitbook/mcp).

# Enterprise data interface (EDI)

Synchronize cardholder data between Command Centre and external data sources.

EDI allows configuration and synchronization of cardholder data with external systems. Use it to:

* **Replicate** a primary database, such as an HR database, into the Command Centre database.
* **Import** via `.CSV` or directly from database tables and views. Both MSSQL and Oracle are supported.
* **Map** existing employee fields (personal details, group memberships, licences, and so on) to Command Centre equivalents (Personal Data Fields, Access Groups, Competencies, and so on).
* Import from a **single or multiple sources**, and translate third-party values into meaningful descriptions on import.
* Run **manual one-off migrations** and **automatic updates** triggered by changes in the primary employee database.

![EDI data sources: a CSV file and a database both feeding cardholder data into Command Centre](https://328339335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6bM8WhlBE9BYizPWJaPN%2Fuploads%2Fgit-blob-6abe73a3953c221e10c99b47ebf2632ded8e546f%2FSECHUB-EDI-01-data-sources.png?alt=media)

### Availability and licensing

EDI was introduced in Command Centre v7.20.

<table><thead><tr><th>License string</th><th width="363.199951171875">Enables</th><th>License Information</th></tr></thead><tbody><tr><td><code>EnterpriseDataInterface=1</code></td><td>Run EDI manually.</td><td>Included with all licenses.</td></tr><tr><td><code>ScheduleEnterpriseDataInterface=1</code></td><td>Schedule an interface or add an interface to an execution sequence.</td><td>Purchasable</td></tr><tr><td><code>EDI-CardholderDatabase=1</code></td><td>Import cardholders from a database.</td><td>Purchasable</td></tr><tr><td><code>EDI-BookingDatabase=1</code></td><td>Import bookings from a database.</td><td>Purchasable</td></tr><tr><td><code>EDI-BookingFile=1</code></td><td>Import bookings from a file.</td><td>Purchasable</td></tr></tbody></table>

For more information on configuration and setup, please refer to the Configuration Client User Guide or application help file.

### Import cardholders from a Microsoft SQL Server database

Command Centre supports importing cardholders from a Microsoft SQL database. The user guide has no step-by-step instructions for it; its only information is a page listing the fields to fill in:

![EDI Data Location fields for a database source, here an Oracle example: Database Type, Server, Username, Password, Database Name, Data Source Name, Image Folder, Log Folder, and the optional stored procedures to run before and after processing; the server address and username are covered](https://328339335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6bM8WhlBE9BYizPWJaPN%2Fuploads%2Fgit-blob-9e33c4fca94a615fa02353f548567e6fbf1c64a1%2FSECHUB-TS-EDI-SQL-01-database-location-fields.png?alt=media)

The steps below come from a Gallagher Technical Support test in 2021.

**Preparation**

1. Microsoft SQL Server running: on the same machine as Command Centre or a separate one.
2. Command Centre installed.
3. Licence strings enabled in the licence: `EnterpriseDataInterface=1` and `EDI-CardholderDatabase=1`.

**Steps to import cardholders**

1. **Create a new database with a table of the cardholders you want to import.** It will be something like this:

   ![SQL Server Management Studio: the CardholderDB database with the dbo.cardholders table, a SELECT TOP 1000 query on ID, FirstName, LastName, Division, AccessGroup and CardType, and three result rows; the server name and login are covered](https://328339335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6bM8WhlBE9BYizPWJaPN%2Fuploads%2Fgit-blob-efb221b03e07b11986bd35d8757fe1dfaab1561e%2FSECHUB-TS-EDI-SQL-02-cardholder-table-ssms.png?alt=media)

   A few things to know:

   * EDI database import **does not** support Windows Authentication mode only. **It only supports SQL Authentication mode.** If you want both modes on the SQL Server, change it to **Mixed** mode first.
   * It depends on the role you log on to the SQL Server with, using SQL Authentication mode. If you log on as an admin, you should not need to change anything. If you log on as a user, enable these permissions for that user: **Connect, Select, Control**.

     Use an admin logon only to test the connection. For normal use, connect with a dedicated account that has the minimum privileges required, never an administrator account, as Gallagher's Command Centre Hardening Guide advises.

     ![Database Properties, Permissions page for CardholderDB: the user guest, with the Select permission granted by dbo; the server name and login are covered](https://328339335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6bM8WhlBE9BYizPWJaPN%2Fuploads%2Fgit-blob-ba95049198f1e49f150904f5f99458e969bde20a%2FSECHUB-TS-EDI-SQL-03-database-user-permissions.png?alt=media)
   * If the correct permissions are not enabled, the EDI cannot connect, and you may get an error message like this:

     ![Test connection failed: a network-related or instance-specific error occurred while establishing a connection to SQL Server (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)](https://328339335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6bM8WhlBE9BYizPWJaPN%2Fuploads%2Fgit-blob-d2567b070eed7f6aa9956ac15c398821f3ed2b24%2FSECHUB-TS-EDI-SQL-04-test-connection-failed.png?alt=media)
2. **Create a cardholder table for importing**, for example:

   ![Table rows: ID 10000 to 10002 with FirstName, LastName, Division Root Division, AccessGroup Access 24-7 and CardType Gallagher Card](https://328339335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6bM8WhlBE9BYizPWJaPN%2Fuploads%2Fgit-blob-09901ba48f5ae3c4f9d2bbe53b07a12cc281e6c9%2FSECHUB-TS-EDI-SQL-05-sample-cardholder-rows.png?alt=media)

   ![Table design: columns ID, FirstName, LastName, Division, AccessGroup and CardType, all of data type ntext](https://328339335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6bM8WhlBE9BYizPWJaPN%2Fuploads%2Fgit-blob-8c622c7f5fe58e40b8a3a92475e44b7dd468357a%2FSECHUB-TS-EDI-SQL-06-table-design.png?alt=media)

   **Note:** a column name cannot have a space in it, otherwise it will not work.

   The data type can be `ntext`, `varchar`, `char` or `text`, depending on how long the strings are. Any **Date and Time** data must be in **d/M/yyyy** format to match the Command Centre EDI configuration. Otherwise the EDI fails to run, with an error message like this:

   ![Alarm properties: Enterprise Data Interface "TestEDI" failed to run; Details: Unexpected exception. Error = Incorrect syntax near ','.](https://328339335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6bM8WhlBE9BYizPWJaPN%2Fuploads%2Fgit-blob-96d3f0162ee73ea523bffc4b6bd2c5d5a377722a%2FSECHUB-TS-EDI-SQL-07-error-incorrect-syntax.png?alt=media)
3. **Make sure the column names match the EDI settings.** In the database table:

   ![The table's column headers highlighted: ID, FirstName, LastName, Division, AccessGroup, CardType](https://328339335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6bM8WhlBE9BYizPWJaPN%2Fuploads%2Fgit-blob-c9ad6a22642fad27fd773ea8e31e0f48b19bdf3b%2FSECHUB-TS-EDI-SQL-08-table-column-names.png?alt=media)

   In the EDI **Data Format**:

   ![EDI Data Format tab: the fields ID, FirstName, LastName, Division, AccessGroup and CardType](https://328339335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6bM8WhlBE9BYizPWJaPN%2Fuploads%2Fgit-blob-9f57fd2892801b07a83490dcdaed9ced5d30a494%2FSECHUB-TS-EDI-SQL-09-edi-data-format-fields.png?alt=media)

   If a name does not match, the EDI fails to run:

   ![Alarm properties: Enterprise Data Interface "TestEDI" failed to run; Details: Unexpected exception. Error = Invalid column name 'Division'.](https://328339335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6bM8WhlBE9BYizPWJaPN%2Fuploads%2Fgit-blob-bf624e3f6899e03f7c44bd04b57875d5f2ebac82%2FSECHUB-TS-EDI-SQL-10-error-invalid-column-name.png?alt=media)
4. **Set up the EDI in Command Centre.** On the **Data Location** tab, select **Database** from the drop-down box:

   ![Configure Enterprise Data Interface - TestEDI, Data Location tab: Location type drop-down with Local file, Network Share and Database, Database selected; the server name and username are covered](https://328339335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6bM8WhlBE9BYizPWJaPN%2Fuploads%2Fgit-blob-6c42c225e54d104f4b2c1f3e339a82ce2aebed58%2FSECHUB-TS-EDI-SQL-11-location-type-database.png?alt=media)

   The interface changes to this:

   ![SQL Server Management Studio beside the EDI Data Location tab, with arrows from the CardholderDB database and the dbo.cardholders table to the Server, Database Name and Data Source Name fields; Database Type Microsoft SQL Server, Log Folder C:\GallagherEDI\Failed; the server name and username are covered](https://328339335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6bM8WhlBE9BYizPWJaPN%2Fuploads%2Fgit-blob-ff0b9442d93cdbc59af1471f759f97555e59b9a9%2FSECHUB-TS-EDI-SQL-12-database-fields.png?alt=media)

   **Note:** the user guide says: "Enter the server name or IP address into the Server field (maximum 64 characters)".

   ![The Server field with an IP address in it (covered)](https://328339335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6bM8WhlBE9BYizPWJaPN%2Fuploads%2Fgit-blob-72bd8e092e4befd400e12a38528c2c8ff44e0a42%2FSECHUB-TS-EDI-SQL-13-server-ip-address.png?alt=media)

   In the 2021 test, the server's IP address gave this error:

   ![Test connection failed: a network-related or instance-specific error, error: 40 - Could not open a connection to SQL Server](https://328339335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6bM8WhlBE9BYizPWJaPN%2Fuploads%2Fgit-blob-32a47eed276715256ef597d9ac704ca447b12ff2%2FSECHUB-TS-EDI-SQL-14-ip-test-connection-failed.png?alt=media)

   ![Alarm properties: Enterprise Data Interface "TestEDI" failed to run; Details: the same network-related or instance-specific error, error: 40](https://328339335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6bM8WhlBE9BYizPWJaPN%2Fuploads%2Fgit-blob-f541b5d31f14dbf49f5d738546449a2b6a06643f%2FSECHUB-TS-EDI-SQL-15-alarm-network-error-40.png?alt=media)

   Put the **full SQL Server name** in the Server field instead:

   ![SQL Server Properties, General page: the Name row (the full SQL Server name, covered), Microsoft SQL Server Express (64-bit), Windows Server 2016 Standard, version 14.0.1000.169](https://328339335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6bM8WhlBE9BYizPWJaPN%2Fuploads%2Fgit-blob-9811923c19477b2e418938535551f36c9c404a97%2FSECHUB-TS-EDI-SQL-16-sql-server-name.png?alt=media)
5. **Test the connection.** Once this is done correctly, the connection test should succeed:

   ![EDI Data Location with Microsoft SQL Server, the full server name and username (both covered), Database Name CardholderDB, Data Source Name cardholders; Test Connection shows "Test connection succeeded"](https://328339335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6bM8WhlBE9BYizPWJaPN%2Fuploads%2Fgit-blob-51ee9e9f887c819e813fd845cb49767a4aaf5313%2FSECHUB-TS-EDI-SQL-17-test-connection-succeeded.png?alt=media)
6. **Complete the other EDI configuration** as for a normal CSV import: Data Format, Mapping, Operator and Access Groups if you need them. Save it and run it. The cardholders should now be imported into Command Centre:

   ![Cardholder list with the three test cardholders imported (two other names are covered), and the event Enterprise Data Interface "TestEDI" processed successfully](https://328339335-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F6bM8WhlBE9BYizPWJaPN%2Fuploads%2Fgit-blob-9f88b468fabfcc0af733966654e11310b8459688%2FSECHUB-TS-EDI-SQL-18-cardholders-imported.png?alt=media)

EDI also underpins the **Booking Interface** (importing room and resource bookings). See [Facility Management Interfaces](https://help.security.gallagher.com/knowledge-hub/products/cc-software/configure/interface-options/facility-management-interfaces.md).

***

🔗 **Related**

* [Facility Management Interfaces](https://help.security.gallagher.com/knowledge-hub/products/cc-software/configure/interface-options/facility-management-interfaces.md). The Booking Interface builds on EDI.
* [Cardholder Sync](https://help.security.gallagher.com/knowledge-hub/products/cc-software/configure/interface-options/facility-management-interfaces/cardholder-sync.md). Another cardholder synchronization path.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.security.gallagher.com/knowledge-hub/products/cc-software/configure/interface-options/enterprise-data-interface-edi.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
