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

# Sage 50 UK

# Connector Details

| Name           | Value                                                                                                                                                                                                                                                                                                             |
| :------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Platform       | [Sage 50 UK](https://api)                                                                                                                                                                                                                                                                                         |
| Auth Type      | API Keys                                                                                                                                                                                                                                                                                                          |
| Direction      | Bidirectional                                                                                                                                                                                                                                                                                                     |
| Tap Metrics    | <p>Usage: <Tooltip tip="medium"><Icon icon="user" iconType="regular" color="#fff" size="14px" /><Icon icon="user" iconType="regular" color="#fff" size="14px" /><Icon icon="user" iconType="regular" color="#fff" size="14px" /><Icon icon="user" iconType="regular" color="#A9A9A9" size="14px" /></Tooltip></p> |
| Target Metrics | <p>Usage: <Tooltip tip="low"><Icon icon="user" iconType="regular" color="#fff" size="14px" /><Icon icon="user" iconType="regular" color="#fff" size="14px" /><Icon icon="user" iconType="regular" color="#A9A9A9" size="14px" /><Icon icon="user" iconType="regular" color="#A9A9A9" size="14px" /></Tooltip></p> |

# Tenant setup guide

Use the guide below to guide your users on how to configure the Sage 50 connector.

## Initial credential configuration

Before installing the connector locally, you will need to gather your credentials:

* **Username and password**: You will need to create a user reserved for this integration. This is because the connector is not allowed to run by Sage if its user is logged in, so if you use the username and password for an active user, the connector will not run. To create a new user:
  * Log in as the admin (MANAGER)
  * Go to Settings > User Management > Users
  * Click New, and create a new user.
* **DSN**: Sage data is stored in an underlying database, which the connector uses to read data from Sage. Sage 50 comes pre-installed with a DSN pointing to the underlying database. This default DSN looks like `SageLine50v29`, where `29` is your version of Sage. To confirm your DSN is present and accessible:
  * Click the Search button on the bottom left of your Windows toolbar
  * Search for `ODBC` and Select `ODBC Data Sources (64-bit)`
  * Click `System DSN`. You should see a DSN starting with `SageLine50` that matches your version. This is the proper DSN name to configure your connector.
  * If you'd like to create a new DSN (not required), you can follow [this walkthrough](https://www.youtube.com/watch?v=iJBrTkCkkX0) to generate a new DSN.
* **Company file path**: This will be the full file path to your Sage 50 program data, ending in `accdata`. You can find your company file path from inside Sage:
  * Log into Sage, and navigate to `Help` > `About` on the top bar.
  * In the top left Program Details section, there is a `Data Directory` file path. Click that link.
  * This will take you to your Sage program folder, which should contain an `accdata` folder.
  * Click into `accdata`. You can then select the ribbon at the top, and copy-paste your company file path. It should look something like the below:

```
C:\\ProgramData\\Sage\\Accounts\\2024\\DemoData\\accdata
```

Once you have these credentials, provide them to support. In return, you will get the connector file, which is an `exe` windows program that you will run, and a connector password.

## Run the connector

Now you have all you need to run the connector.

1. Download the Connector launcher file.

<Info>The Sage 50 connector is packaged as an .exe file.</Info>

2. Run the launcher `.exe` file. This will automatically register the connector as a service and kick off the setup process.
3. The connector will open a pop-up requesting your connector password. Enter your connector password and click OK.

That's it! Your connector is now running and ready to sync your Sage data.

# Supported Objects

## Write

The Sage 50 connector supports writing of several objects out of the box. The expected payloads and mappings are documented below.

<Info>
  In addition to the fields listed below, all objects support the optional `externalid` field. <br />
  This is used to associate the created record in Sage with your own id. This field is not mapped to Sage 50, and only persists within hotglue.
</Info>

### Products

Payload file: `products.json`

| Field          | Description                |
| -------------- | -------------------------- |
| `stock_code`   | Unique product stock code  |
| `description`  | Product description        |
| `nominal_code` | Nominal code               |
| `unit_of_sale` | Unit of sale (e.g. `Each`) |

<Accordion title="Sample payload">
  ```json theme={null}
  [
      {
          "stock_code": "FIFA25",
          "description": "FIFA 2025 Edition",
          "nominal_code": "4000",
          "unit_of_sale": "Each"
      }
  ]
  ```
</Accordion>

### Vendors

Payload file: `vendors.json`

| Field            | Description                                                                                                                |
| ---------------- | -------------------------------------------------------------------------------------------------------------------------- |
| `account_ref`    | The unique account ref for this vendor, will be used for referencing this vendor in transactions. Limited to 8 characters. |
| `name`           | Name of the vendor                                                                                                         |
| `address_1`      | Address line 1                                                                                                             |
| `address_2`      | Address line 2                                                                                                             |
| `address_3`      | Address line 3                                                                                                             |
| `address_4`      | Address line 4                                                                                                             |
| `address_5`      | Address line 5                                                                                                             |
| `contact_name`   | Vendor contact name                                                                                                        |
| `telephone`      | Telephone Number                                                                                                           |
| `fax`            | Fax Number                                                                                                                 |
| `analysis_1`     |                                                                                                                            |
| `analysis_2`     |                                                                                                                            |
| `analysis_3`     |                                                                                                                            |
| `terms`          |                                                                                                                            |
| `def_nom_code`   | Default nominal code for transactions                                                                                      |
| `vat_reg_number` | Vendor VAT number                                                                                                          |
| `country_code`   | Country code                                                                                                               |
| `currency`       | Currency code for this vendor (e.g. `GBP`)                                                                                 |

<Accordion title="Sample payload">
  ```json theme={null}
  [
      {
          "account_ref": "2",
          "name": "NVIDIA",
          "address_1": "2788 San Tomas Expy",
          "address_2": "Santa Clara, CA 95051",
          "contact_name": "Jensen Huang",
          "telephone": "408 486 2000"
      }
  ]
  ```
</Accordion>

### Customers

Payload file: `customers.json`

| Field            | Description                                                                                                                    |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------ |
| `account_ref`    | The unique account ref for this customer, will be used for referencing this customer in transactions. Limited to 8 characters. |
| `name`           | Name of the customer                                                                                                           |
| `address_1`      | Address line 1                                                                                                                 |
| `address_2`      | Address line 2                                                                                                                 |
| `address_3`      | Address line 3                                                                                                                 |
| `address_4`      | Address line 4                                                                                                                 |
| `address_5`      | Address line 5                                                                                                                 |
| `contact_name`   | Customer contact name                                                                                                          |
| `telephone`      | Telephone Number                                                                                                               |
| `fax`            | Fax Number                                                                                                                     |
| `analysis_1`     |                                                                                                                                |
| `analysis_2`     |                                                                                                                                |
| `analysis_3`     |                                                                                                                                |
| `terms`          |                                                                                                                                |
| `def_nom_code`   | Default nominal code for transactions                                                                                          |
| `vat_reg_number` | Customer VAT number                                                                                                            |
| `country_code`   | Country code                                                                                                                   |
| `currency`       | Currency code for this customer (e.g. `GBP`)                                                                                   |

<Accordion title="Sample payload">
  ```json theme={null}
  [
      {
          "account_ref": "2",
          "name": "NVIDIA",
          "address_1": "2788 San Tomas Expy",
          "address_2": "Santa Clara, CA 95051",
          "contact_name": "Jensen Huang",
          "telephone": "408 486 2000"
      }
  ]
  ```
</Accordion>

### VendorInvoices

Payload file: `vendorinvoices.json`

| Field                   | Description                                            |
| ----------------------- | ------------------------------------------------------ |
| `account_ref`           | Account ref of the vendor associated with this invoice |
| `date`                  | Date of invoice                                        |
| `posted_date`           | Posted date of invoice                                 |
| `date_due`              | Due date of invoice                                    |
| `inv_ref`               | Invoice ref number                                     |
| `tax_amount`            | Tax amount                                             |
| `discount`              | Discount amount                                        |
| `discount_nominal_code` | Discount nominal code                                  |
| `items`                 | Array of line items (see below for line item fields)   |
| `items.nominal_code`    | Nominal code                                           |
| `items.tax_code`        | Tax code                                               |
| `items.net_amount`      | Net amount                                             |
| `items.tax_amount`      | Tax amount                                             |
| `items.details`         | Description of line item                               |
| `items.project_id`      | Project ID                                             |
| `items.department_id`   | Department ID                                          |
| `items.cost_code`       | Cost Code                                              |

<Accordion title="Sample payload">
  ```json theme={null}
  [
      {
          "account_ref": "1",
          "externalid": "89979",
          "date": "2025-01-31T00:00:00.000Z",
          "posted_date": "2025-01-31T15:06:45.000Z",
          "date_due": "2025-02-14T00:00:00.000Z",
          "inv_ref": "HGT-3",
          "currency": "GBP",
          "items": [
              {
                  "nominal_code": "4000",
                  "net_amount": 44.50,
                  "details": "22 Bananas"
              },
              {
                  "nominal_code": "4000",
                  "net_amount": 22.00,
                  "details": "11 Pears"
              }
          ]
      }
  ]
  ```
</Accordion>

### CustomerInvoices

Payload file: `customerinvoices.json`

| Field                   | Description                                              |
| ----------------------- | -------------------------------------------------------- |
| `account_ref`           | Account ref of the customer associated with this invoice |
| `date`                  | Date of invoice                                          |
| `posted_date`           | Posted date of invoice                                   |
| `date_due`              | Due date of invoice                                      |
| `inv_ref`               | Invoice ref number                                       |
| `tax_amount`            | Tax amount                                               |
| `discount`              | Discount amount                                          |
| `discount_nominal_code` | Discount nominal code                                    |
| `items`                 | Array of line items (see below for line item fields)     |
| `items.nominal_code`    | Nominal code                                             |
| `items.tax_code`        | Tax code                                                 |
| `items.net_amount`      | Net amount                                               |
| `items.tax_amount`      | Tax amount                                               |
| `items.details`         | Description of line item                                 |
| `items.project_id`      | Project ID                                               |
| `items.department_id`   | Department ID                                            |
| `items.cost_code`       | Cost Code                                                |

<Accordion title="Sample payload">
  ```json theme={null}
  [
      {
          "account_ref": "1",
          "externalid": "89979",
          "date": "2025-01-31T00:00:00.000Z",
          "posted_date": "2025-01-31T15:06:45.000Z",
          "date_due": "2025-02-14T00:00:00.000Z",
          "inv_ref": "HGT-3",
          "currency": "GBP",
          "items": [
              {
                  "nominal_code": "4000",
                  "net_amount": 44.50,
                  "details": "22 Bananas"
              },
              {
                  "nominal_code": "4000",
                  "net_amount": 22.00,
                  "details": "11 Pears"
              }
          ]
      }
  ]
  ```
</Accordion>

### CustomerNotes

Payload file: `customernotes.json`

| Field                 | Description                                                  |
| --------------------- | ------------------------------------------------------------ |
| `account_ref`         | Account ref of the customer associated with this credit note |
| `date`                | Date of credit note                                          |
| `posted_date`         | Posted date of credit note                                   |
| `inv_ref`             | Credit note ref number                                       |
| `tax_amount`          | Tax amount                                                   |
| `items`               | Array of line items (see below for line item fields)         |
| `items.nominal_code`  | Nominal code                                                 |
| `items.tax_code`      | Tax code                                                     |
| `items.net_amount`    | Net amount                                                   |
| `items.tax_amount`    | Tax amount                                                   |
| `items.details`       | Description of line item                                     |
| `items.project_id`    | Project ID                                                   |
| `items.department_id` | Department ID                                                |
| `items.cost_code`     | Cost Code                                                    |

<Accordion title="Sample payload">
  ```json theme={null}
  [
      {
          "account_ref": "1",
          "externalid": "1616",
          "date": "2025-01-31T00:00:00.000Z",
          "posted_date": "2025-01-31T15:06:45.000Z",
          "inv_ref": "CRED001",
          "currency": "GBP",
          "items": [
              {
                  "nominal_code": "4000",
                  "net_amount": 50,
                  "details": "Credit Note for Jan"
              }
          ]
      }
  ]
  ```
</Accordion>

## Read

<Accordion title="Supported objects for read">
  ## Audit Trail (Transactions)

  * **Audit - Header**: `AUDIT_HEADER`
  * **Audit - Journal**: `AUDIT_JOURNAL`
  * **Audit - Split**: `AUDIT_SPLIT`
  * **Audit - Usage**: `AUDIT_USAGE`
  * **Audit - VAT**: `AUDIT_VAT`
  * **Audit History - Header**: `AUDIT_HISTORY_HEADER`
  * **Audit History - Journal**: `AUDIT_HISTORY_JOURNAL`
  * **Audit History - Split**: `AUDIT_HISTORY_SPLIT`
  * **Audit History - Usage**: `AUDIT_HISTORY_USAGE`
  * **Clear Audit Trail Event**: `CLEAR_AUDIT_TRAIL_EVENT`
  * **Cleared Transaction Range**: `CLEARED_TRAN_RANGE`
  * **Deleted Records**: `DELETED_RECORDS`
  * **Dispute Reason**: `DISPUTE_REASON`

  ## Bank

  * **Bank**: `BANK`
  * **Bank Statement**: `BANK_STATEMENT`
  * **Bank Statement - Line**: `BANK_STATEMENT_LINE`
  * **Recurring Entries**: `RECURRING`
  * **Remittance**: `REMITTANCE`

  ## Calendar

  * **Calendar Event**: `CALENDAR_EVENT`
  * **Calendar Event - Label**: `CALENDAR_EVENT_LABEL`
  * **Calendar Event - Location**: `CALENDAR_EVENT_LOCATION`
  * **Calendar Event - Recurrence Pattern**: `CALENDAR_EVENT_RECURRENCE_PATTERN`

  ## Category

  * **Category**: `CATEGORY`
  * **Category - Title**: `CAT_TITLE`

  ## Charities/Funds

  * **Fund**: `FUND`
  * **Fund Type**: `FUND_TYPE`
  * **SOFA (Statement of Financial Activities) Category**: `SOFA_CATEGORY`

  ## CIS (Construction Industry Scheme)

  * **CIS Return**: `CIS_RETURN`
  * **CIS Return - Transactions**: `CIS_RETURN_TRANSACTION`
  * **CIS Settings**: `CIS_SETTINGS`
  * **CIS Subcontractor**: `CIS_SUBCONTRACTOR`
  * **CIS Subcontractor - Legacy**: `CIS_SUBCONTRACTOR_LEGACY`
  * **CIS Subcontractor - Return**: `CIS_SUBCONTRACTOR_RETURN`
  * **CIS Subcontractor - Tax History**: `CIS_SUBCONTRACTOR_TAX_HISTORY`

  ## Company

  * **Company**: `COMPANY`
  * **Company Delivery Address**: `COMPANY_DEL_ADDR`

  ## Contact History

  * **Contact History**: `CONTACT_HISTORY`
  * **Contact History - Major Type**: `CONTACT_HISTORY_MAJOR_TYPE`
  * **Contact History - Contact Outcome**: `CONTACT_HISTORY_CONTACT_OUTCOME`
  * **Contact History - Contact Type**: `CONTACT_HISTORY_CONTACT_TYPE`

  ## International

  * **EC Sales - Fill**: `ECSALES_FILL`
  * **EC Sales - Header**: `ECSALES_HEADER`
  * **EC Sales - Split**: `ECSALES_SPLIT`
  * **EC Sales - VAT Description**: `EC_VAT_DESCRIPTION`
  * **Intrastat**: `INTRASTAT`

  ## Invoice

  * **Invoice**: `INVOICE`
  * **Invoice - Item**: `INVOICE_ITEM`
  * **Update Ledgers**: `UPDATE_LEDGER`

  ## Multi-use/Miscellaneous

  * **Account Status**: `ACCOUNT_STATUS`
  * **Communication Address**: `COMMUNICATION_ADDRESS`
  * **Country Code**: `COUNTRY_CODE`
  * **Currency**: `CURRENCY`
  * **Department**: `DEPARTMENT`
  * **Letter Type**: `LETTER_TYPE`
  * **Price**: `PRICE`
  * **Price List**: `PRICE_LIST`
  * **Tax Code**: `TAX_CODE`

  ## Nominal

  * **Accrual**: `ACCRUAL`
  * **Chart of Accounts**: `CHART_LIST`
  * **Financial Budget**: `FINANCIAL_BUDGET`
  * **Fixed Assets**: `FIXED_ASSET`
  * **Fixed Assets - Category**: `FIXED_ASSET_CAT`
  * **Nominal Ledger**: `NOMINAL_LEDGER`
  * **Period Values**: `PERIOD`
  * **Prepayments**: `PREPAYMENT`

  ## Payment

  * **Payment Information**: `PAYMENT_INFO`
  * **Payment Method**: `PAYMENT_METHOD`
  * **ProTX Payment**: `PROTX_PAYMENT`
  * **Supplier Payment Info**: `SUPPLIER_PAYMENT_INFO`

  ## Projects

  * **Project**: `PROJECT`
  * **Project - Budget**: `PROJECT_BUDGET`
  * **Project - Cost Code**: `PROJECT_COST_CODE`
  * **Project - Cost Type**: `PROJECT_COST_TYPE`
  * **Project - Only Transactions**: `PROJECT_ONLY_TRAN`
  * **Project - Relationship**: `PROJECT_RELATIONSHIP`
  * **Project - Resource**: `PROJECT_RESOURCE`
  * **Project - Resource Type**: `PROJECT_RESOURCE_TYPE`
  * **Project - Revenue Code**: `PROJECT_REVENUE_CODE`
  * **Project - Status**: `PROJECT_STATUS`
  * **Project - Transactions**: `PROJECT_TRAN`

  ## Purchase Ledger (Suppliers)

  * **Goods Received Note Items (GRN)**: `GRN_ITEM`
  * **Purchase Delivery Address**: `PURCHASE_DEL_ADDR`
  * **Purchase Ledger (Suppliers)**: `PURCHASE_LEDGER`
  * **Purchase Order**: `PURCHASE_ORDER`
  * **Purchase Order Items**: `POP_ITEM`
  * **Supplier Payment Info**: `SUPPLIER_PAYMENT_INFO`

  ## Sales Ledger (Customers)

  * **Credit Bureau**: `CREDIT_BUREAU`
  * **Direct Debit Payment Requests**: `DIRECT_DEBIT_PAYMENT_REQUESTS`
  * **Goods Despatched Note Items (GDN)**: `GDN_ITEM`
  * **Payment Information**: `PAYMENT_INFO`
  * **Sagepay - Pay-by Link**: `SAGEPAY_PAY_BY_LINK`
  * **Sales Delivery Address**: `SALES_DEL_ADDR`
  * **Sales Ledger (Customers)**: `SALES_LEDGER`
  * **Sales Order**: `SALES_ORDER`
  * **Sales Order Items**: `SOP_ITEM`

  ## Stock

  * **Stock**: `STOCK`
  * **Stock - Allocation**: `STOCK_ALLOCATION`
  * **Stock - Category**: `STOCK_CAT`
  * **Stock - Component**: `STOCK_COMP`
  * **Stock - Transactions**: `STOCK_TRAN`

  ## VAT

  * **eSubmission Settings**: `ESUBMISSION_SETTINGS`
  * **Return of Trading Details (RTD) Summary**: `RTD_SUMMARY`
  * **VAT - Adjustment**: `VAT_ADJUSTMENT`
  * **VAT - Details**: `VAT_DETAILS`
  * **VAT - Reverse Charge - Details**: `VAT_REV_CHARGE_DETAIL`
  * **VAT - Reverse Charge - Header**: `VAT_REV_CHARGE_HEADER`
  * **VAT - Reverse Charge - Return**: `VAT_REV_CHARGE_RETURN`
  * **VAT - VAT Summary**: `VAT_SUMMARY`
  * **VAT - VAT Return**: `VAT_RETURN`
  * **VAT - VAT Return Receipt**: `VAT_RETURN_RECEIPT`
</Accordion>
