Skip to Content

Sage 50 UK Connection Details

Introduction

Connector Version

This documentation is based on version 21.0.8662 of the connector.

Get Started

Sage 50 UK Version Support

The connector models data in Sage 50 UK 2012 and above as relational tables. Note that for v28 and later, you must install the Sdata adapter prior to using Sage 50 UK driver. See the Sage 50 UK documentation for more information.

Establish a Connection

Connect to Sage 50 UK

The connector connects to Sage 50 UK data through the SData REST API included in the Sage 50 UK installation. SData allows access to local company datasets as well as datasets on network drives.

After Configuring the Sage SData Service, connect with the below steps, the URL property should be set to the address of the company dataset desired. To obtain the address, do the following:

  1. If you have not already done so, open the Sage 50 UK software.
  2. Select Tools > Internet Options .
  3. Select the Sdatasettings tab.
  4. Click Details next to the Sage 50 software application you want to connect to. A window opens containing a list of company names along with the addresses to their corresponding datasets.
  5. Set the URL property to the value in the address field next to the company desired.

Authenticate to Sage 50 UK

The User and Password properties must be set to valid Sage 50 UK user credentials. These values are the same values used to log in to the Sage 50 UK software. To authenticate with HTTP digest to the SData service, set AuthScheme to Digest. Otherwise, Basic AuthScheme will be used.

Note

If the dataset you want to connect to is not displayed, the permissions on the Sage 50 UK folder location may not be correct. If you are connecting to a dataset on a networked drive, ensure:

  • You are using UNC paths to the folder on the machine you are using as your SData provider.
  • You set the SData service login rights to a user who has full rights over the network share or map drive.

Start the SData Service

The Sage 50 UK connector connects to Sage 50 UK via the Sage SData service (which is Sage's Web toolkit for connecting to Sage instances) that is built into the Sage 50 UK software. SData allows for remote access to Sage software applications. By default, Sage UK 2015 instances will have SData turned on and ready for use.

You can follow the steps below to verify that the SData service is started.

  1. If you have not already done so, open Sage 50.
  2. Navigate to Tools > Internet Options. The Internet Options window is displayed.
  3. Select the Sdatasettings tab. A list is displayed of Sage software applications that are currently available.
  4. To turn the SData service on for the application, select the On option.
  5. If the SData Service Status does not read "SData is currently running", click the Advanced button.
  6. In the dialog that is displayed, specify the Port Number desired when making the connection and click the Restart button.
  7. If the Windows Firewall button is enabled, click this button to unblock the port. If you have any additional firewalls on the machine, ensure that they are configured to allow connections to be made on the specified port number.

Once you apply any changes, you can then establish a connection to your Sage 50 UK software.

Enable HTTPS Support

The Sage SData service provides secure and encrypted connections via HTTPS. Data confidentiality and the authenticity of the server are provided by digital certificates. If you do not have a certificate, use IIS to generate a self-signed certificate.

You can follow the steps below to configure the SData service to use a certificate; the connector will validate this certificate against the system trust store by default. If you generated a self-signed certificate, you can add the certificate to this certificate store or set SSLServerCert.

See Advanced Features for more information on configuring the connector for HTTPS.

Fulfill the Certificate Requirements

The certificate has the following requirements:

  • The certificate must have a full valid trust chain.
  • The common name (CN) for the certificate must match the machine/domain name where the SData service is running. To ensure that the CN is correct, generate the self-signed certificate on the machine where Sage 50 SData is running.
  • The certificate must be added to the personal My certificate store for the Local Machine account.
Configure the SData Service for TLS/SSL

You can then configure the SData service to use the certificate:

  1. Navigate to C:\Program Files (x86)\Common Files\Sage SData and open Sage.SData.Service.Config.UI.exe.

  2. Click the Advanced button. The SData Configuration window is displayed.

  3. Select the Enable HTTPS Access option and select the port desired.

  4. If you have any firewalls on your machine, make sure the ports specified are not blocked.

  5. Click the button next to the Certificate box.

  6. In the resulting dialog, select the certificate. If you select a certificate and do not see the certificate name populated in the Certificate textbox, this is most likely due to missing extended properties within the certificate. The extended properties include thumbprint, thumbprint algorithm, key usage, and enhanced key usage.

    Use IIS to avoid this issue: IIS automatically populates these fields when generating a self-signed certificate.

  7. Click OK to restart the server.

  8. Verify that the Enable HTTPS option is selected in the SData configuration window.

Troubleshooting

If the SData configuration window is closed and reopened but the Enable HTTPS option is not enabled, this is most likely caused by the Sage.SData.Service.exe.config file not being updated properly. Follow the steps below to use the alternate configuration file below.

You will need the certificate thumbprint. Note that the thumbprint data includes spaces. The thumbprint data can be obtained using Windows services. You can also access the thumbprint in the SData configuration window:

  1. If you have not already done so, open the Sage.SData.Service.Config.UI.exe application and open the advanced settings.
  2. Click the button next to the Certificate box.
  3. In the Windows security dialog, click "Click here to view certificate properties". The Certificate Details window is displayed.
  4. On the Details tab, copy the value in the Thumbprint field.

Use this value in the CertificateLookupValue setting in the configuration file. For example:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="Sage.SData.Service.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<section name="Sage.Integration.Server.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
<section name="Sage.Common.Syndication.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
</configSections>
<applicationSettings>
<Sage.SData.Service.Properties.Settings>
<setting name="DigestTimeout" serializeAs="String">
<value>12000000000</value>
</setting>
<setting name="EnableBasicAuthentication" serializeAs="String">
<value>True</value>
</setting>
<setting name="WebAppPath" serializeAs="String">
<value />
</setting>
<setting name="EnableSSL" serializeAs="String">
<value>True</value>
</setting>
<setting name="Port" serializeAs="String">
<value>443</value>
</setting>
</Sage.SData.Service.Properties.Settings>
<Sage.Integration.Server.Properties.Settings>
<setting name="EnableBroadcast" serializeAs="String">
<value>False</value>
</setting>
</Sage.Integration.Server.Properties.Settings>
<Sage.Common.Syndication.Properties.Settings>
<setting name="IPAddress" serializeAs="String">
<value />
</setting>
<setting name="Server" serializeAs="String">
<value>sdata</value>
</setting>
<setting name="EnableSSLPort" serializeAs="String">
<value>True</value>
</setting>
<setting name="Port" serializeAs="String">
<value>5493</value>
</setting>
<setting name="SettingsProviderType" serializeAs="String">
<value>Sage.Common.Syndication.ConfigurationSyndicationSettings, Sage.Common.Syndication</value>
</setting>
<setting name="PathPrefix" serializeAs="String">
<value />
</setting>
<setting name="DoNotUseRegistry" serializeAs="String">
<value>False</value>
</setting>
<setting name="EnableStandardPort" serializeAs="String">
<value>True</value>
</setting>
<setting name="SSLPort" serializeAs="String">
<value>5494</value>
</setting>
<setting name="CertificateLookupValue" serializeAs="String">
<value>ENTER YOUR CERTIFICATE THUMBPRINT HERE</value>
</setting>
<setting name="CertificateLookupType" serializeAs="String">
<value>Thumbprint</value>
</setting>
</Sage.Common.Syndication.Properties.Settings>
</applicationSettings>
</configuration>

Important Notes

Configuration Files and Their Paths

  • All references to adding configuration files and their paths refer to files and locations on the Harmony Agent where the connector is installed. These paths are to be adjusted as appropriate depending on the agent and the operating system. If multiple agents are used in an agent group, identical files will be required on each agent.

Advanced Features

This section details a selection of advanced features of the Sage 50 UK connector.

User Defined Views

The connector allows you to define virtual tables, called user defined views, whose contents are decided by a pre-configured query. These views are useful when you cannot directly control queries being issued to the drivers. See User Defined Views for an overview of creating and configuring custom views.

SSL Configuration

Use SSL Configuration to adjust how connector handles TLS/SSL certificate negotiations. You can choose from various certificate formats; see the SSLServerCert property under "Connection String Options" for more information.

Proxy

To configure the connector using Private Agent proxy settings, select the Use Proxy Settings checkbox on the connection configuration screen.

User Defined Views

The Sage 50 UK connector allows you to define a virtual table whose contents are decided by a pre-configured query. These are called User Defined Views, which are useful in situations where you cannot directly control the query being issued to the driver, e.g. when using the driver from Jitterbit. The User Defined Views can be used to define predicates that are always applied. If you specify additional predicates in the query to the view, they are combined with the query already defined as part of the view.

There are two ways to create user defined views:

  • Create a JSON-formatted configuration file defining the views you want.
  • DDL statements.

Define Views Using a Configuration File

User Defined Views are defined in a JSON-formatted configuration file called UserDefinedViews.json. The connector automatically detects the views specified in this file.

You can also have multiple view definitions and control them using the UserDefinedViews connection property. When you use this property, only the specified views are seen by the connector.

This User Defined View configuration file is formatted as follows:

  • Each root element defines the name of a view.
  • Each root element contains a child element, called query, which contains the custom SQL query for the view.

For example:

{
    "MyView": {
        "query": "SELECT * FROM TradingAccounts WHERE MyColumn = 'value'"
    },
    "MyView2": {
        "query": "SELECT * FROM MyTable WHERE Id IN (1,2,3)"
    }
}

Use the UserDefinedViews connection property to specify the location of your JSON configuration file. For example:

"UserDefinedViews", "C:\Users\yourusername\Desktop\tmp\UserDefinedViews.json"

Schema for User Defined Views

User Defined Views are exposed in the UserViews schema by default. This is done to avoid the view's name clashing with an actual entity in the data model. You can change the name of the schema used for UserViews by setting the UserViewsSchemaName property.

Work with User Defined Views

For example, a SQL statement with a User Defined View called UserViews.RCustomers only lists customers in Raleigh:

SELECT * FROM Customers WHERE City = 'Raleigh';

An example of a query to the driver:

SELECT * FROM UserViews.RCustomers WHERE Status = 'Active';

Resulting in the effective query to the source:

SELECT * FROM Customers WHERE City = 'Raleigh' AND Status = 'Active';

That is a very simple example of a query to a User Defined View that is effectively a combination of the view query and the view definition. It is possible to compose these queries in much more complex patterns. All SQL operations are allowed in both queries and are combined when appropriate.

SSL Configuration

Customize the SSL Configuration

By default, the connector attempts to negotiate SSL/TLS by checking the server's certificate against the system's trusted certificate store.

To specify another certificate, see the SSLServerCert property for the available formats to do so.

Data Model

The Sage 50 UK connector models Sage 50 UK entities in relational Tables and Views.

Tables

Tables describes the available tables.

Views

Views are tables that cannot be modified. Typically, read-only data are shown as views.

Tables

The connector models the data in Sage 50 UK into a list of tables that can be queried using standard SQL statements.

Generally, querying Sage 50 UK tables is the same as querying a table in a relational database. Sometimes there are special cases, for example, including a certain column in the WHERE clause might be required to get data for certain columns in the table. This is typically needed for situations where a separate request must be made for each row to get certain columns. These types of situations are clearly documented at the top of the table page linked below.

Sage 50 UK Connector Tables

Name Description
Commodities Create, Update and Query Commodities (Products and Services) within Sage UK 50 Accounts.
Contacts Create, Update, Delete, and Query Contacts within Sage UK 50 Accounts.
PurchaseOrders Create, Update, Delete, and Query PurchaseOrders within Sage UK 50 Accounts.
SalesCredits Query SalesCredits within Sage UK 50 Accounts.
SalesInvoices Query SalesInvoices within Sage UK 50 Accounts.
SalesOrders Create, Update, Delete, and Query SalesOrders within Sage UK 50 Accounts.
TradingAccounts Create, Update, Delete, and Query TradingAccounts within Sage UK 50 Accounts.

Commodities

Create, Update and Query Commodities (Products and Services) within Sage UK 50 Accounts.

Table Specific Information

The Commodities table allows you to select, insert, and update Commodities (Products and Services) within a Sage 50 UK company dataset.

Select

The Commodities table returns the products and services for a Sage 50 UK company dataset.

SELECT * FROM Commodities WHERE ProductCode LIKE 'ABC%'
Insert

To create a new Commodity record, the Description field is required.

INSERT INTO Commodities (ProductCode, Description, SupplierReference, CatalogueNumber, WebDescription, Cost)

VALUES ('MNP', 'MyNewProduct', 'UNI001', 'U143', 'My Web Description', 5.49)
Update

Any field that is not read-only can be updated.

UPDATE Commodities SET Description ='My New Description' WHERE CommodityUUID='8c47b43a-7115-7419-9679-7c72586e67d1'
Columns
Name Type ReadOnly Description
CommodityUUID [KEY] String True Commodity UUID
CommodityIdentifierType String False Commodity CommodityIdentifier Type
ProductCode String False Commodity Product Code
Reference2 String False Commodity Reference2
Status String False Commodity Status
Description String False Commodity Description
WebDescription String False Commodity Web Description
AlternativeDescription2 String False Commodity Alternative Description 2
Type String True Commodity Type (Category)
BuyingAllowedFlag Boolean False Commodity Buying Allowed Flag
SellingAllowedFlag Boolean False Commodity Selling Allowed Flag
CatalogueNumber String False Commodity Catalogue (Part) Number
SupplierReference String False Commodity Supplier reference
ManufacturerCompany String False Commodity Manufacturer Company
Weight Decimal False Commodity Weight
Classification String False Commodity Classification
Cost Decimal False Commodity Cost
InStock Decimal True Commodity Amount in Stock
Allocated Decimal True Commodity Amount Allocated
FreeStock Decimal True Commodity Free Stock
OnOrder Decimal True Commodity Amount on Order
SalesPrice Decimal True Commodity Sales Price in base currency
UnitDescription String True Commodity UnitOfMeasure Description
Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
Updated Datetime An input used internally to filter records updated at a specific datetime.

Contacts

Create, Update, Delete, and Query Contacts within Sage UK 50 Accounts.

Table Specific Information

The Contacts table allows you to select, insert, update, and delete contacts within a Sage 50 UK company dataset.

Select

The Contacts table returns the contacts contained within a Sage 50 UK company dataset.

SELECT * FROM Contacts WHERE TradingAccountReference = 'ABC123'
Insert

To create a new Contacts record, the TradingAccountReference and Type fields are required.

INSERT INTO Contacts (Title, FirstName, MiddleName, FamilyName, Suffix, TradingAccountReference, Type, PostalAddressAddress1, PostalAddressTownCity, PostalAddressStateRegion, PostalAddressZipPostCode, PostalAddressType, PostalAddressDescription, Phone1Text, Phone1Type, Phone2Text, Phone2Type, EmailAddress)

VALUES (True, 'Dr.', 'INSERT', 'ME', 'NOW', 'Jr.', 'CNTCTEST', 'Customer Delivery Contact', '123 Main St', 'Durham', 'NC', '12345', 'Shipping', 'NEW Description', '123-456-7890', 'Business Phone', '555-666-7777', 'Fax', 'test@cdata.com')
Update

Any field that is not read-only can be updated. Requirements exist for some fields of a Contact record:

  • To update an existing postal address, PostalAddressUUID is required. Otherwise if postal address is null, specify the details and leave the UUID empty.
  • To update an existing Phone1, Phone1UUID is required. Otherwise if Phone1 is empty, specify the details and leave the UUID empty.
  • To update an existing Phone2, Phone2UUID is required. Otherwise if Phone2 is empty, specify the details and leave the UUID empty.
  • To update an existing email address, EmailUUID is required. Otherwise if email is empty, specify the details and leave the UUID empty.
UPDATE Contacts SET EmailAddress='test@server.com', Phone1Text='999-999-9999'
WHERE ContactUUID='96df2e1e-72c6-4b52-b39a-eeb42c840f87' AND Phone1UUID='bd621624-f78e-4dec-abf3-b8b94d8fe7a3' AND EmailUUID='a3f6ff1b-a80b-4019-ae5e-b1fa1bb4044d'
Delete

Deleting a Contact record will also delete all postal addresses, phone numbers, and emails associated with the Contact.

DELETE FROM Contacts WHERE ContactUUID='96df2e1e-72c6-4b52-b39a-eeb42c840f87'
Columns
Name Type ReadOnly Description
ContactUUID [KEY] String True Contact UUID
TradingAccountReference String False Contact Trading Account Reference
Reference2 String False Contact Reference2
Type String False Contact Type
FullName String False Contact Full Name. In the form: [Title] [FirstName] [MiddleName] [FamilyName] [Suffix].
Title String False Contact Title
FirstName String False Contact First Name
MiddleName String False Contact Middle Name
FamilyName String False Contact Family Name
Suffix String False Contact Suffix
TaxReference String False Contact Tax Reference
PrimacyIndicator Boolean False Contact Primacy Indicator
PostalAddressUUID String True Contact PostalAddress UUID
PostalAddressActive Boolean False Contact PostalAddress Active Flag
PostalAddressReference String False Contact PostalAddress Reference
PostalAddressName String False Contact PostalAddress Name
PostalAddressDescription String False Contact PostalAddress Description
PostalAddressAddress1 String False Contact PostalAddress Address 1
PostalAddressAddress2 String False Contact PostalAddress Address 2
PostalAddressTownCity String False Contact PostalAddress TownCity
PostalAddressCounty String False Contact PostalAddress StateRegion
PostalAddressZipPostCode String False Contact PostalAddress ZipPost Code
PostalAddressCountry String False Contact PostalAddress Country
PostalAddressPrimacyIndicator Boolean False Contact PostalAddress Primacy Indicator
PostalAddressType String False Contact PostalAddress Type
Phone1UUID String True Contact PhoneNumber UUID
Phone1Active Boolean False Contact PhoneNumber Active Flag
Phone1Reference String False Contact PhoneNumber Reference
Phone1Reference2 String False Contact PhoneNumber Reference2
Phone1Type String False Contact PhoneNumber Type
Phone1Name String False Contact PhoneNumber Name
Phone1Text String False Contact PhoneNumber Text
Phone1PrimacyIndicator Boolean False Contact PhoneNumber Primacy Indicator
Phone2UUID String True Contact PhoneNumber UUID
Phone2Active Boolean False Contact PhoneNumber Active Flag
Phone2Reference String False Contact PhoneNumber reference
Phone2Reference2 String False Contact PhoneNumber Reference2
Phone2Type String False Contact PhoneNumber Type
Phone2Name String False Contact PhoneNumber Name
Phone2Text String False Contact PhoneNumber Text
Phone2PrimacyIndicator Boolean False Contact PhoneNumber Primacy Indicator
EmailUUID String True Contact Email UUID
EmailActive Boolean False Contact Email Active Flag
EmailReference String False Contact Email Reference
EmailReference2 String False Contact Email Reference
EmailType String False Contact Email Type
EmailAddress String False Contact Email Address
EmailUrl String False Contact Email mailto:URL
EmailPrimacyIndicator Boolean False Contact Email Primacy Indicator
EmailLabel String False Contact Email Label
Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
Updated Datetime An input used internally to filter records updated at a specific datetime.

PurchaseOrders

Create, Update, Delete, and Query PurchaseOrders within Sage UK 50 Accounts.

Table Specific Information

The PurchaseOrders table allows you to select, insert, update, and delete purchase orders within a Sage 50 UK company dataset.

Select

The PurchaseOrders table returns the purchase orders for a Sage 50 UK company dataset.

SELECT * FROM PurchaseOrders WHERE Date >= '1/1/2015' AND Date < '2/1/2015'
Insert

To create a new PurchaseOrder record, the TradingAccountUUID field is required.

Purchase Order Line Items are specified via an XML aggregate within the ItemsAggregate column. The columns that may be used in these aggregates are defined in the PurchaseOrderLineItems table.

The following example demonstrates how to insert a new PurchaseOrder with two line items:

INSERT INTO PurchaseOrders (TradingAccountUUID, DeliveryDate, PostalAddressName, PostalAddressType, PostalAddressAddress1, PostalAddressTownCity, PostalAddressStateRegion, ItemsAggregate)
VALUES ('b83c940f-9d2b-4a35-bf42-28bbe07ef994', '05/05/2015', 'Purchase Order Billing Address', 'Billing', '123 Main St', 'Chapel Hill', 'NC',
'<PurchaseOrderLineItems>
<Row><CommodityUUID>0a47b43d-7115-4863-9689-1a53666e67c8</CommodityUUID><Quantity>1</Quantity><ActualPrice>1.99</ActualPrice></Row>
<Row><CommodityUUID>586df2bb-7702-4228-b464-e8d509148547</CommodityUUID><Quantity>4</Quantity><ActualPrice>4.99</ActualPrice></Row>
</PurchaseOrderLineItems>')
Update

Any field that is not read-only can be updated.

When updating a PurchaseOrder record, PostalAddressUUID is required when updating a postal address. Note that purchase order line items cannot be updated nor deleted.

UPDATE PurchaseOrders SET PostalAddressZipPostCode='12345'

WHERE PurchaseOrderUUID='1b47b43a-7115-4863-9679-1a78636e67c1' AND PostalAddressUUID='28915e09-b2a1-47e1-b193-741b32ba8ba0'
Delete

Deleting a PurchaseOrder record will also delete all line items and postal addresses associated with the PurchaseOrder.

DELETE FROM PurchaseOrders WHERE PurchaseOrderUUID='1b47b43a-7115-4863-9679-1a78636e67c1'
Columns
Name Type ReadOnly Description
PurchaseOrderUUID [KEY] String True PurchaseOrder UUID
TradingAccountUUID String False Trading Account UUID associated with the PurchaseOrder
ContactUUID String True PurchaseOrder Seller Contact UUID
PurchaseOrderNumber String False PurchaseOrder Reference
Reference2 String False PurchaseOrder Reference2
Status String False PurchaseOrder Status
StatusFlagText String False PurchaseOrder Status Flag Text
SupplierReference String False PurchaseOrder Supplier Reference
CopyFlag Boolean False PurchaseOrder Copy Flag
DeliveryDate Date False PurchaseOrder Delivery Date
CarrierNetPrice Decimal False PurchaseOrder Carrier Net Price
CarrierTaxPrice Decimal False PurchaseOrder Carrier Tax Price
CarrierTotalPrice Decimal False PurchaseOrder Carrier Gross Price
CarrierReference String False PurchaseOrder Carrier reference
Currency String False PurchaseOrder Currency
OCCurrencyExchangeRate Decimal False PurchaseOrder Operating Company Currency Exchange Rate
OCCurrencyExchangeRateOperator String False PurchaseOrder Operating Company Currency Exchange Rate Operator
Date Date False PurchaseOrder Date
User String False PurchaseOrder User
LineCount Decimal True PurchaseOrder Line Count
Text1 String False PurchaseOrder Text1
Text2 String False PurchaseOrder Text2
NetTotal Decimal True PurchaseOrder Net Total
TaxTotal Decimal True PurchaseOrder Tax Total
GrossTotal Decimal True PurchaseOrder Gross Total
OnOrder String False PurchaseOrder On Order Status
ItemsAggregate String False An aggregate of the line item data, which is used for adding a purchase order and its line items.
PostalAddressUUID String True PurchaseOrder PostalAddress UUID
PostalAddressActive Boolean False PurchaseOrder PostalAddress Active Flag
PostalAddressReference String False PurchaseOrder PostalAddress Reference
PostalAddressName String False PurchaseOrder PostalAddress Name
PostalAddressDescription String False PurchaseOrder PostalAddress Description
PostalAddressAddress1 String False PurchaseOrder PostalAddress Address 1
PostalAddressAddress2 String False PurchaseOrder PostalAddress Address 2
PostalAddressAddress3 String False PurchaseOrder PostalAddress Address 3
PostalAddressAddress4 String False PurchaseOrder PostalAddress Address 4
PostalAddressTownCity String False PurchaseOrder PostalAddress TownCity
PostalAddressCounty String False PurchaseOrder PostalAddress County
PostalAddressStateRegion String False PurchaseOrder PostalAddress StateRegion
PostalAddressZipPostCode String False PurchaseOrder PostalAddress ZipPost Code
PostalAddressCountry String False PurchaseOrder PostalAddress Country
PostalAddressPrimacyIndicator Boolean False PurchaseOrder PostalAddress Primacy Indicator
PostalAddressType String False PurchaseOrder PostalAddress Type. Sample values: Billing, Shipping.
Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
Updated Datetime An input used internally to filter records updated at a specific datetime.

SalesCredits

Query SalesCredits within Sage UK 50 Accounts.

Table Specific Information

The SalesCredits table allows you to select, insert, update, and delete sales credits within a Sage 50 UK company dataset.

Select

The SalesCredits table returns the sales credits for a Sage 50 UK company dataset.

SELECT * FROM SalesCredits WHERE Date >= '1/1/2015' AND Date < '2/1/2015'
Insert

To create a new SalesCredits record, the TradingAccountUUID field is required.

Sales Credit Line Items are specified via an XML aggregate within the ItemsAggregate column. The columns that may be used in these aggregates are defined in the SalesCreditLineItems table.

The following example demonstrates how to insert a new PurchaseOrder with two line items:

INSERT INTO SalesCredits (TradingAccountUUID, Type,  PostalAddress1Name, PostalAddress1Type, PostalAddress1Address1, PostalAddress1TownCity, PostalAddress1StateRegion, PostalAddress2Name, PostalAddress2Type, PostalAddress2Address1, PostalAddress2TownCity, PostalAddress2StateRegion, ItemsAggregate)
VALUES ('b83c940f-9d2b-4a35-bf42-28bbe07ef994', 'Product Credit Note',  'Sales Order Delivery Address', 'Shipping', '123 Main St', 'Chapel Hill', 'NC', 'Sales Order Billing Address', 'Billing', '987 Center Road', 'Chapel Hill', 'NC',
'<SalesCreditLineItems>
<Row><CommodityUUID>03ecf74f-0f08-4667-8a59-07e6338a8b32</CommodityUUID><Quantity>1</Quantity><ActualPrice>2.99</ActualPrice></Row>
<Row><CommodityUUID>0a47b43d-7115-4863-9689-1a53666e67c8</CommodityUUID><Quantity>2</Quantity><ActualPrice>3.99</ActualPrice></Row>
</SalesCreditLineItems>')
Update

Any field that is not read-only can be updated.

When updating a SalesCredits record, PostalAddress1UUID or PostalAddress2UUID are required when updating the respective postal address. Note that sales credit line items cannot be updated nor deleted.

UPDATE SalesCredits SET PostalAddress2ZipPostCode='12345'

WHERE SalesCreditUUID='392235af-f45a-4c43-a275-897130e4fdc4' AND PostalAddress2UUID='28915e09-b2a1-47e1-b193-741b32ba8ba0'
Delete

Deleting a SalesCredit record will also delete all line items and postal addresses associated with the SalesCredit.

DELETE FROM SalesCredits WHERE SalesCreditUUID='392235af-f45a-4c43-a275-897130e4fdc4'
Columns
Name Type ReadOnly Description
SalesCreditUUID [KEY] String True SalesCredit UUID
TradingAccountUUID String False SalesCredit Trading Account UUID
ContactUUID String True SalesCredit Buyer Contact UUID
CreditNumber String False SalesCredit Reference
SalesOrderNumber String False SalesCredit Invoice Reference
Status String False SalesCredit Status
Type String False SalesCredit Type
CustomerOrderNumber String False SalesCredit Customer Reference
CopyFlag Boolean False SalesCredit Copy Flag
Date Date False SalesCredit Date
TaxDate Date False SalesCredit Tax Date
CarrierNetPrice Decimal False SalesCredit Carrier Net Price
CarrierTaxPrice Decimal False SalesCredit Carrier Tax Price
CarrierTotalPrice Decimal False SalesCredit Carrier Gross Price
Currency String False SalesCredit Currency
OCCurrencyExchangeRate Decimal False SalesCredit OperatingCompany Currency Exchange Rate
OCCurrencyExchangeRateOperator String False SalesCredit OperatingCompany Currency Exchange Rate Operator
LineCount Decimal False SalesCredit Line Count
SettlementDiscountAmount Decimal False SalesCredit Settlement Discount Amount
SettlementDiscountPercent Decimal False SalesCredit Settlement Discount Percent
SettlementDiscountIncludedInTotal Boolean False SalesCredit Settlement Discount Included In Total
InvoiceDiscountAmount Decimal False SalesCredit Invoice Discount Amount
InvoiceDiscountPercent Decimal False SalesCredit Invoice Discount Percent
NetTotal Decimal True SalesCredit Net Total
TaxTotal Decimal True SalesCredit Tax Total
GrossTotal Decimal True SalesCredit Gross Total
Text1 String False SalesCredit Text1
Text2 String False SalesCredit Text2
User String False SalesCredit User
ItemsAggregate String False An aggregate of the line item data, which can be used for adding a purchase order and its line items.
PostalAddress1UUID String True SalesCredit PostalAddress UUID
PostalAddress1Active Boolean False SalesCredit PostalAddress Active Flag
PostalAddress1Reference String False SalesCredit PostalAddress Reference
PostalAddress1Name String False SalesCredit PostalAddress Name
PostalAddress1Description String False SalesCredit PostalAddress Description
PostalAddress1Address1 String False SalesCredit PostalAddress Address 1
PostalAddress1Address2 String False SalesCredit PostalAddress Address 2
PostalAddress1Address3 String False SalesCredit PostalAddress Address 3
PostalAddress1Address4 String False SalesCredit PostalAddress Address 4
PostalAddress1TownCity String False SalesCredit PostalAddress TownCity
PostalAddress1County String False SalesCredit PostalAddress County
PostalAddress1StateRegion String False SalesCredit PostalAddress StateRegion
PostalAddress1ZipPostCode String False SalesCredit PostalAddress ZipPost Code
PostalAddress1Country String False SalesCredit PostalAddress Country
PostalAddress1PrimacyIndicator Boolean False SalesCredit PostalAddress Primacy Indicator
PostalAddress1Type String False SalesCredit PostalAddress Type. Sample values: Billing, Shipping.
PostalAddress2UUID String True SalesCredit PostalAddress UUID
PostalAddress2Active Boolean False SalesCredit PostalAddress Active Flag
PostalAddress2Reference String False SalesCredit PostalAddress Reference
PostalAddress2Name String False SalesCredit PostalAddress Name
PostalAddress2Description String False SalesCredit PostalAddress Description
PostalAddress2Address1 String False SalesCredit PostalAddress Address 1
PostalAddress2Address2 String False SalesCredit PostalAddress Address 2
PostalAddress2Address3 String False SalesCredit PostalAddress Address 3
PostalAddress2Address4 String False SalesCredit PostalAddress Address 4
PostalAddress2TownCity String False SalesCredit PostalAddress TownCity
PostalAddress2County String False SalesCredit PostalAddress County
PostalAddress2StateRegion String False SalesCredit PostalAddress StateRegion
PostalAddress2ZipPostCode String False SalesCredit PostalAddress ZipPost Code
PostalAddress2Country String False SalesCredit PostalAddress Country
PostalAddress2PrimacyIndicator Boolean False SalesCredit PostalAddress Primacy Indicator
PostalAddress2Type String False SalesCredit PostalAddress Type. Sample values: Billing, Shipping.
Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
Updated Datetime An input used internally to filter records updated at a specific datetime.

SalesInvoices

Query SalesInvoices within Sage UK 50 Accounts.

Table Specific Information

The SalesInvoices table allows you to select, insert, update, and delete sales invoices within a Sage 50 UK company dataset.

Select

The SalesInvoices table returns the sales invoices for a Sage 50 UK company dataset.

SELECT * FROM SalesInvoices WHERE Date >= '1/1/2015' AND Date < '2/1/2015'
Insert

To create a new SalesInvoices record, the TradingAccountUUID field is required.

Sales Invoice Line Items are specified via an XML aggregate within the ItemsAggregate column. The columns that may be used in these aggregates are defined in the SalesInvoiceLineItems table.

Note

For text column in SalesInvoiceLineItems, length of the string must be equal or less than 61 characters, otherwise driver will use first 61 characters.

The following example demonstrates how to insert a new SalesInvoice with two line items:

INSERT INTO SalesInvoices (TradingAccountUUID, Type, PostalAddress1Name, PostalAddress1Type, PostalAddress1Address1, PostalAddress1TownCity, PostalAddress1StateRegion, PostalAddress2Name, PostalAddress2Type, PostalAddress2Address1, PostalAddress2TownCity, PostalAddress2StateRegion, ItemsAggregate)
VALUES ('b83c940f-9d2b-4a35-bf42-28bbe07ef994', 'Product Invoice', 'Sales Order Delivery Address', 'Shipping', '123 Main St', 'Chapel Hill', 'NC', 'Sales Order Billing Address', 'Billing', '987 Center Road', 'Chapel Hill', 'NC', '<SalesInvoiceLineItems> <Row><CommodityUUID>03ecf74f-0f08-4667-8a59-07e6338a8b32</CommodityUUID><Quantity>2</Quantity><ActualPrice>2.99</ActualPrice></Row> <Row><CommodityUUID>0a47b43d-7115-4863-9689-1a53666e67c8</CommodityUUID><Quantity>1</Quantity><ActualPrice>4.99</ActualPrice></Row>
</SalesInvoiceLineItems>')
Update

Any field that is not read-only can be updated.

When updating a SalesInvoices record, PostalAddress1UUID and PostalAddress2UUID are required when updating a postal address (respectively). Note that sales invoice line items cannot be updated nor deleted.

UPDATE SalesInvoices SET PostalAddress2ZipPostCode='12345'

WHERE SalesInvoiceUUID='392235af-f45a-4c43-a275-897130e4fdc4' AND PostalAddress2UUID='28915e09-b2a1-47e1-b193-741b32ba8ba0'
Delete

Deleting a SalesInvoice record will also delete all line items and postal addresses associated with the SalesInvoice.

DELETE FROM SalesInvoices WHERE SalesInvoiceUUID='392235af-f45a-4c43-a275-897130e4fdc4'
Columns
Name Type ReadOnly Description
SalesInvoiceUUID [KEY] String True SalesInvoice UUID
TradingAccountUUID String False SalesOrder Trading Account UUID
ContactUUID String True SalesOrder Buyer Contact UUID
InvoiceNumber String False SalesInvoice Reference
SalesOrderNumber String False SalesInvoice Reference2
Status String False SalesInvoice Status
Type String False SalesInvoice Type
CustomerOrderNumber String False SalesInvoice Customer Reference
Date Date False SalesInvoice Date
TaxDate Date False SalesInvoice Tax Date
CarrierNetPrice Decimal False SalesInvoice Carrier Net Price
CarrierTaxPrice Decimal False SalesInvoice Carrier Tax Price
CarrierTotalPrice Decimal False SalesInvoice Carrier Gross Price
Currency String False SalesInvoice Currency
OCCurrencyExchangeRate Decimal False SalesInvoice Operating Company Currency Exchange Rate
OCCurrencyExchangeRateOperator String False SalesInvoice Operating Company Currency Exchange Rate Operator
LineCount Decimal True SalesInvoice Line Count
SettlementDiscountAmount Decimal False SalesInvoice Settlement Discount Amount
SettlementDiscountPercent Decimal False SalesInvoice Settlement Discount Percent
SettlementDiscountIncludedInTotal Boolean False SalesInvoice Settlement Discount Included In Total
InvoiceDiscountAmount Decimal False SalesInvoice Invoice Discount Amount
InvoiceDiscountPercent Decimal False SalesInvoice Invoice Discount Percent
NetTotal Decimal True SalesInvoice Net Total
TaxTotal Decimal True SalesInvoice Tax Total
GrossTotal Decimal True SalesInvoice Gross Total
Text1 String False SalesInvoice Text1
Text2 String False SalesInvoice Text2
User String False SalesInvoice User
PaymentDue Date True SalesInvoice Payment Due
ItemsAggregate String False An aggregate of the line item data, which can be used for adding a purchase order and its line items.
PostalAddress1UUID String True SalesOrder PostalAddress UUID
PostalAddress1Active Boolean False SalesOrder PostalAddress Active Flag
PostalAddress1Reference String False SalesOrder PostalAddress Reference
PostalAddress1Name String False SalesOrder PostalAddress Name
PostalAddress1Description String False SalesOrder PostalAddress Description
PostalAddress1Address1 String False SalesOrder PostalAddress Address 1
PostalAddress1Address2 String False SalesOrder PostalAddress Address 2
PostalAddress1Address3 String False SalesOrder PostalAddress Address 3
PostalAddress1Address4 String False SalesOrder PostalAddress Address 4
PostalAddress1TownCity String False SalesOrder PostalAddress TownCity
PostalAddress1County String False SalesOrder PostalAddress County
PostalAddress1StateRegion String False SalesOrder PostalAddress StateRegion
PostalAddress1ZipPostCode String False SalesOrder PostalAddress ZipPost Code
PostalAddress1Country String False SalesOrder PostalAddress Country
PostalAddress1PrimacyIndicator Boolean False SalesOrder PostalAddress Primacy Indicator
PostalAddress1Type String False SalesOrder PostalAddress Type. Sample values: Billing, Shipping.
PostalAddress2UUID String True SalesOrder PostalAddress UUID
PostalAddress2Active Boolean False SalesOrder PostalAddress Active Flag
PostalAddress2Reference String False SalesOrder PostalAddress Reference
PostalAddress2Name String False SalesOrder PostalAddress Name
PostalAddress2Description String False SalesOrder PostalAddress Description
PostalAddress2Address1 String False SalesOrder PostalAddress Address 1
PostalAddress2Address2 String False SalesOrder PostalAddress Address 2
PostalAddress2Address3 String False SalesOrder PostalAddress Address 3
PostalAddress2Address4 String False SalesOrder PostalAddress Address 4
PostalAddress2TownCity String False SalesOrder PostalAddress TownCity
PostalAddress2County String False SalesOrder PostalAddress County
PostalAddress2StateRegion String False SalesOrder PostalAddress StateRegion
PostalAddress2ZipPostCode String False SalesOrder PostalAddress ZipPost Code
PostalAddress2Country String False SalesOrder PostalAddress Country
PostalAddress2PrimacyIndicator Boolean False SalesOrder PostalAddress Primacy Indicator
PostalAddress2Type String False SalesOrder PostalAddress Type. Sample values: Billing, Shipping.
Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
Updated Datetime An input used internally to filter records updated at a specific datetime.

SalesOrders

Create, Update, Delete, and Query SalesOrders within Sage UK 50 Accounts.

Table Specific Information

The SalesOrders table allows you to select, insert, update, and delete sales orders within a Sage 50 UK company dataset.

Select

The SalesOrders table returns the sales orders for a Sage 50 UK company dataset.

SELECT * FROM SalesOrders WHERE Date >= '1/1/2015' AND Date < '2/1/2015'
Insert

To create a new SalesOrder record, the TradingAccountUUID field is required.

Sales Order Line Items are specified via an XML aggregate within the ItemsAggregate column. The columns that may be used in these aggregates are defined in the SalesOrderLineItems table. Note: a CommodityUUID must be set when adding a SalesOrderLineItem, as only existing Commodities can be referenced (to create a new Commodity, the Commodities table can be used).

The following example demonstrates how to insert a new SalesOrder with two line items:

INSERT INTO SalesOrders (TradingAccountUUID, DueDate, PostalAddress1Name, PostalAddress1Type, PostalAddress1Address1, PostalAddress1TownCity, PostalAddress1StateRegion, ItemsAggregate)
VALUES ('b83c940f-9d2b-4a35-bf42-28bbe07ef994', True, '05/05/2015', 'Sales Order Delivery Address', 'Shipping', '123 Main St', 'Chapel Hill', 'NC',
'<SalesOrderLineItems>
<Row><CommodityUUID>0a47b43d-7115-4863-9689-1a53666e67c8</CommodityUUID><Quantity>1</Quantity><ActualPrice>1.99</ActualPrice></Row>
<Row><CommodityUUID>586df2bb-7702-4228-b464-e8d509148547</CommodityUUID><Quantity>4</Quantity><ActualPrice>4.99</ActualPrice></Row>
</SalesOrderLineItems>')
Update

Any field that is not read-only can be updated.

When updating a SalesOrder record, PostalAddress1UUID and PostalAddress2UUID are required when updating the respective postal address. Note that sales order line items cannot be updated nor deleted.

UPDATE SalesOrders SET PostalAddress1ZipPostCode='12345'

WHERE SalesOrderUUID='957af245-4678-4ca9-904a-162dcce87e5b' AND PostalAddress1UUID='28915e09-b2a1-47e1-b193-741b32ba8ba0'
Delete

Deleting a SalesOrder record will also delete all line items and postal addresses associated with the SalesOrder.

DELETE FROM SalesOrders WHERE SalesOrderUUID='957af245-4678-4ca9-904a-162dcce87e5b'
Columns
Name Type ReadOnly Description
SalesOrderUUID [KEY] String True SalesOrder UUID
TradingAccountUUID String False SalesOrder Trading Account UUID
ContactUUID String True SalesOrder Buyer Contact UUID
SalesOrderNumber String False SalesOrder Reference
InvoiceNumber String False SalesOrder Invoice Reference
AllocationStatus String False SalesOrder Allocation Status
DeliveryStatus String False SalesOrder Delivery Status
InvoiceStatus String False SalesOrder Invoice Status
CustomerReference String False SalesOrder Customer reference
Type String False SalesOrder Type
CopyFlag Boolean False SalesOrder Copy Flag
DueDate Date False SalesOrder Due Date
CarrierNetPrice Decimal False SalesOrder Carrier Net Price
CarrierTaxPrice Decimal False SalesOrder Carrier Tax Price
CarrierTotalPrice Decimal False SalesOrder Carrier Gross Price
CarrierReference String False SalesOrder Carrier Reference
Currency String False SalesOrder Currency
OCCurrency String False SalesOrder Operating Company Currency
OCCurrencyExchangeRate Decimal False SalesOrder Operating Company Currency Exchange Rate
OCCurrencyExchangeRateOperator String False SalesOrder Operating Company Currency Exchange Rate Operator
Date Date False SalesOrder Date
User String False SalesOrder User
LineCount Decimal False SalesOrder Line Count
OrderDiscountType String False SalesOrder Order Discount Type
OrderDiscountAmount Decimal False SalesOrder Order Discount Amount
OrderDiscountPercent Decimal False SalesOrder Order Discount Percent
Text1 String False SalesOrder Text1
Text2 String False SalesOrder Text2
NetTotal Decimal False SalesOrder Net Total
TaxTotal Decimal False SalesOrder Tax Total
GrossTotal Decimal False SalesOrder Gross Total
ItemsAggregate String False An aggregate of the line item data, which can be used for adding a purchase order and its line items.
PostalAddress1UUID String True SalesOrder PostalAddress UUID
PostalAddress1Active Boolean False SalesOrder PostalAddress Active Flag
PostalAddress1Reference String False SalesOrder PostalAddress Reference
PostalAddress1Name String False SalesOrder PostalAddress Name
PostalAddress1Description String False SalesOrder PostalAddress Description
PostalAddress1Address1 String False SalesOrder PostalAddress Address 1
PostalAddress1Address2 String False SalesOrder PostalAddress Address 2
PostalAddress1Address3 String False SalesOrder PostalAddress Address 3
PostalAddress1Address4 String False SalesOrder PostalAddress Address 4
PostalAddress1TownCity String False SalesOrder PostalAddress TownCity
PostalAddress1County String False SalesOrder PostalAddress County
PostalAddress1StateRegion String False SalesOrder PostalAddress StateRegion
PostalAddress1ZipPostCode String False SalesOrder PostalAddress ZipPost Code
PostalAddress1Country String False SalesOrder PostalAddress Country
PostalAddress1PrimacyIndicator Boolean False SalesOrder PostalAddress Primacy Indicator
PostalAddress1Type String False SalesOrder PostalAddress Type. Sample values: Billing, Shipping.
PostalAddress2UUID String True SalesOrder PostalAddress UUID
PostalAddress2Active Boolean False SalesOrder PostalAddress Active Flag
PostalAddress2Reference String False SalesOrder PostalAddress Reference
PostalAddress2Name String False SalesOrder PostalAddress Name
PostalAddress2Description String False SalesOrder PostalAddress Description
PostalAddress2Address1 String False SalesOrder PostalAddress Address 1
PostalAddress2Address2 String False SalesOrder PostalAddress Address 2
PostalAddress2Address3 String False SalesOrder PostalAddress Address 3
PostalAddress2Address4 String False SalesOrder PostalAddress Address 4
PostalAddress2TownCity String False SalesOrder PostalAddress TownCity
PostalAddress2County String False SalesOrder PostalAddress County
PostalAddress2StateRegion String False SalesOrder PostalAddress StateRegion
PostalAddress2ZipPostCode String False SalesOrder PostalAddress ZipPost Code
PostalAddress2Country String False SalesOrder PostalAddress Country
PostalAddress2PrimacyIndicator Boolean False SalesOrder PostalAddress Primacy Indicator
PostalAddress2Type String False SalesOrder PostalAddress Type. Sample values: Billing, Shipping.
Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
Updated Datetime An input used internally to filter records updated at a specific datetime.

TradingAccounts

Create, Update, Delete, and Query TradingAccounts within Sage UK 50 Accounts.

Table Specific Information

The TradingAccounts table allows you to select, insert, and update trading accounts within a Sage 50 UK company dataset.

Select

The TradingAccounts table returns the trading account information for a Sage 50 UK company dataset.

SELECT * FROM TradingAccounts
Insert

To create a new Trading Account record, the Name and CustomerSupplierFlag fields are required.

INSERT INTO TradingAccounts (Name, CustomerSupplierFlag, OpenedDate, Website, FinanceBalance, FinanceLimit, Analysis1, Analysis2, Analysis3)

VALUES ('My Trading Account', 'Customer', '05/10/2015', 'www.cdata.com', 100.00, 1000.00, 'Trade', 'Jenkins', 'National')
Update

Any field that is not read-only can be updated.

UPDATE TradingAccounts SET Analysis3='International' WHERE TradingAccountUUID='90c7afb4-ad34-41a2-b71d-ef49cc489872'
Delete
DELETE FROM TradingAccounts WHERE TradingAccountUUID='90c7afb4-ad34-41a2-b71d-ef49cc489872'

Note: When additional resources are tied to the account, the record is not deleted. However, the Sage API will still return an

OK response, signalling the record has been deleted. The actual error message can be viewed by attempting to delete the account within the software itself.

Columns
Name Type ReadOnly Description
TradingAccountUUID [KEY] String True TradingAccount UUID
CustomerSupplierFlag String False TradingAccount Customer Supplier Flag
CompanyPersonFlag String False TradingAccount Company Person Flag. Valid values: Company or Person
OpenedDate Date False TradingAccount Opened Date
TradingAccountReference String True TradingAccount Reference
Status String False TradingAccount Status
Name String False TradingAccount Name
Type String False TradingAccount Type
Website String False TradingAccount Web site
DeliveryRule Boolean False TradingAccount Delivery Rule
Currency String False TradingAccount Currency
TaxReference String False TradingAccount Tax reference
TaxationCountry String False TradingAccount Taxation Country
FinanceBalance Decimal False TradingAccount Finance Balance
FinanceLimit Decimal False TradingAccount Finance Limit
FinanceStatusFlag Boolean False TradingAccount Finance Status Flag
FinanceStatusText String False TradingAccount Finance Status Text
SettlementDiscountType String False TradingAccount Settlement Discount Type
SettlementDiscountPercent Decimal False TradingAccount Settlement Discount Percent
SettlementDiscountTerms String False TradingAccount Settlement Discount Terms
SettlementDiscountIncludedInTotal Boolean False TradingAccount Settlement Discount Included In Total
PaymentTerms String False TradingAccount Payment Terms
OrderLineDiscountPercent Decimal False TradingAccount Order Line Discount Percent
InvoiceDiscountPercent Decimal False TradingAccount Invoice Discount Percent
PrimacyIndicator Boolean False TradingAccount Primacy Indicator
Balance Decimal False TradingAccount Balance
CreditLimit Decimal False TradingAccount Credit Limit
MTDTurnover Decimal True TradingAccount Month To Date Turnover
YTDTurnover Decimal True TradingAccount Year To Date Turnover
PriorYTDTurnover Decimal True TradingAccount Prior Year To Date Turnover
FirstInvoiceDate Date True TradingAccount First Invoice Date
LastInvoiceDate Date True TradingAccount Last Invoice Date
LastPaymentDate Date True TradingAccount Last Payment Date
LastCreditReviewDate Date False TradingAccount Last Credit Review Date
TradingTerms String True TradingAccount Trading Terms
StandardDiscount Decimal False TradingAccount Standard Discount
AccountOnHold Boolean False TradingAccount On Hold
Analysis1 String False TradingAccount Analysis (Custom) Field 1
Analysis2 String False TradingAccount Analysis (Custom) Field 2
Analysis3 String False TradingAccount Analysis (Custom) Field 3
CanChargeCredit Boolean True TradingAccount Can Charge Credit
NextCreditReviewDate Date False TradingAccount Next Credit Review Date
AdditionalDiscount String True TradingAccount Additional Discount Type
CreditAppliedDate Date False TradingAccount Credit Applied date
Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
Updated Datetime An input used internally to filter records updated at a specific datetime.

Views

Views are composed of columns and pseudo columns. Views are similar to tables in the way that data is represented; however, views do not support updates. Entities that are represented as views are typically read-only entities. Often, a stored procedure is available to update the data if such functionality is applicable to the data source.

Queries can be executed against a view as if it were a normal table, and the data that comes back is similar in that regard. To find out more about tables and stored procedures, please navigate to their corresponding entries in this help document.

Sage 50 UK Connector Views

Name Description
BankAccounts Query BankAccounts within Sage UK 50 Accounts.
FinancialAccounts Query Financial Accounts within Sage UK 50 Accounts.
Interactions Query Interactions within Sage UK 50 Accounts.
Prices Query Prices within Sage UK 50 Accounts.
Projects Query Projects within Sage UK 50 Accounts.
PurchaseOrderDeliveries Query PurchaseOrderDeliveries within Sage UK 50 Accounts.
PurchaseOrderDeliveryLineItems Query PurchaseOrderDeliveryLineItems within Sage UK 50 Accounts.
PurchaseOrderLineItems Query PurchaseOrderLines within Sage UK 50 Accounts.
Receipts Query Receipts within Sage UK 50 Accounts.
SalesCreditLineItems Query SalesCreditLineItems within Sage UK 50 Accounts.
SalesInvoiceLineItems Query SalesInvoiceLineItems within Sage UK 50 Accounts.
SalesOrderDeliveries Query SalesOrderDeliveries within Sage UK 50 Accounts.
SalesOrderDeliveryLineItems Query SalesOrderDeliveryLineItems within Sage UK 50 Accounts.
SalesOrderLineItems Query SalesOrderLineItems within Sage UK 50 Accounts.
TaxCodes Query Tax Codes within Sage UK 50 Accounts.
TradingActivities Query TradingActivities within Sage UK 50 Accounts.

BankAccounts

Query BankAccounts within Sage UK 50 Accounts.

Table Specific Information
Select

The BankAccounts table returns the bank accounts for a Sage 50 UK company dataset.

SELECT * FROM BankAccounts
Columns
Name Type Description
BankAccountUUID [KEY] String BankAccount UUID
TradingAccountUUID String BankAccount Trading Account UUID
Type String BankAccount Type
TradingAccountReference String BankAccount Reference to the associated Trading Account
Name String BankAccount Name
BranchIdentifier String BankAccount Branch Identifier
AccountNumber String BankAccount Account Number
IBANNumber String BankAccount IBAN Number
BICSwiftCode String BankAccount BIC Swift Code
RollNumber String BankAccount Roll Number
Currency String BankAccount Currency
OperatingCompanyCurrency String BankAccount OperatingCompany Currency
Website String BankAccount Web site
CompanyReference String BankAccount Company Reference. Example values: 'Operating Company Bank Account', 'Supplier Bank Account', 'Customer Bank Account'
PaymentAllowedFlag Boolean BankAccount Payment Allowed Flag
ReceiptAllowedFlag Boolean BankAccount Receipt Allowed Flag
Reference2 String BankAccount Reference2
Balance Decimal BankAccount Balance
Limit Decimal BankAccount Limit
PrimacyIndicator Boolean BankAccount Primacy Indicator
PostalAddressUUID String BankAccount PostalAddress UUID
PostalAddressActive Boolean BankAccount PostalAddress Active Flag
PostalAddressTradingAccountReference String BankAccount PostalAddress Reference
PostalAddressName String BankAccount PostalAddress Name
PostalAddressDescription String BankAccount PostalAddress Description
PostalAddressAddress1 String BankAccount PostalAddress Address 1
PostalAddressAddress2 String BankAccount PostalAddress Address 2
PostalAddressAddress3 String BankAccount PostalAddress Address 3
PostalAddressAddress4 String BankAccount PostalAddress Address 4
PostalAddressTownCity String BankAccount PostalAddress TownCity
PostalAddressCounty String BankAccount PostalAddress County
PostalAddressStateRegion String BankAccount PostalAddress StateRegion
PostalAddressZipPostCode String BankAccount PostalAddress ZipPost Code
PostalAddressCountry String BankAccount PostalAddress Country
PostalAddressPrimacyIndicator Boolean BankAccount PostalAddress Primacy Indicator
PostalAddressType String BankAccount PostalAddress Type
Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
Updated Datetime An input used internally to filter records updated at a specific datetime.

FinancialAccounts

Query Financial Accounts within Sage UK 50 Accounts.

Columns
Name Type Description
FinancialAccountUUID [KEY] String FinancialAccount UUID
NominalCode String FinancialAccount Nominal Code
AccountName String FinancialAccount Type
Currency String FinancialAccount Currency
Balance Decimal FinancialAccount Balance
PrimacyIndicator Boolean FinancialAccount Primacy Indicator
Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
Updated Datetime An input used internally to filter records updated at a specific datetime.

Interactions

Query Interactions within Sage UK 50 Accounts.

Table Specific Information
Select

The Interactions table returns the customer interaction information for a Sage 50 UK company dataset.

SELECT * FROM Interactions
Columns
Name Type Description
InteractionUUID [KEY] String Interaction UUID
TradingAccountUUID String Interaction Trading Account UUID
Type String Interaction Type
Status String Interaction Status
TradingAccountReference String Interaction Reference
Description String Interaction Description
User String Interaction User
Date Date Interaction Date
Time Time Interaction Time
EndDate Date Interaction End Date
EndTime Time Interaction End Time
Recurrence Boolean Interaction Recurrence
PrivacyFlag Boolean Interaction Privacy Flag
PromisedPaymentDate Date Interaciton Promised Payment Date
FollowUpDate Date Interaction Follow Up Date
Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
Updated Datetime An input used internally to filter records updated at a specific datetime.

Prices

Query Prices within Sage UK 50 Accounts.

Table Specific Information
Select

The Prices table returns the product and services pricing information for a Sage 50 UK company dataset.

SELECT * FROM Prices WHERE Price < 10.00
Columns
Name Type Description
PriceUUID [KEY] String Price UUID
ProductCode String Price Reference
Price Decimal Price
IncludesTax Boolean Price Includes Tax
Currency String Price Currency
DecimalPlaces Decimal Price Decimal Places
CustomerSupplierFlag String Price Customer Supplier Flag
OCCurrency String PurchaseOrderDelivery Operating Company Currency
OCCurrencyExchangeRate Decimal PurchaseOrderDelivery Operating Company Currency Exchange Rate
OCCurrencyExchangeRateOperator String PurchaseOrderDelivery Operating Company Currency Exchange Rate Operator
Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
Updated Datetime An input used internally to filter records updated at a specific datetime.

Projects

Query Projects within Sage UK 50 Accounts.

Table Specific Information
Select

The Projects table returns project information for a Sage 50 UK company dataset.

SELECT * FROM Projects
Columns
Name Type Description
ProjectUUID [KEY] String Project UUID
ProjectReference String Project Reference
TradingAccountReference String Project Reference2
Name String Project Name
Description String Project Description
Status String Project Status
StartDate Date Project Start Date
EndDate Date Project End Date
Currency String Project Currency
OperatingCompanyCurrency String Project OperatingCompany Currency
OperatingCompanyCurrencyExchangeRate Decimal Project OperatingCompany Currency Exchange Rate
OperatingCompanyCurrencyExchangeRateOperator String Project OperatingCompany Currency Exchange Rate Operator
CurrentCostBalance Decimal Project Current Cost Balance
LastCostTransactionDate Date Project Last Cost Transaction Date
CurrentRevenueBalance Decimal Project Current Revenue Balance
LastRevenueTransactionDate Date Project Last Revenue Transaction Date
CurrentCostBudget Decimal Project Current Cost Budget
CurrentRevenueBudget Decimal Project Current Revenue Budget
CurrentCommittedCostBalance Decimal Project Current Committed Cost Balance
Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
Updated Datetime An input used internally to filter records updated at a specific datetime.

PurchaseOrderDeliveries

Query PurchaseOrderDeliveries within Sage UK 50 Accounts.

Table Specific Information
Select

The PurchaseOrderDeliveries table returns purchase order delivery information for a Sage 50 UK company dataset.

SELECT * FROM PurchaseOrderDeliveries
Columns
Name Type Description
PODeliveryUUID [KEY] String PurchaseOrderDelivery UUID
PurchaseOrderUUID String PurchaseOrderDelivery PurchaseOrder UUID
TradingAccountUUID String PurchaseOrderDelivery Trading Account UUID
GoodsReceivedNumber String PurchaseOrderDelivery Reference
SupplierReference String PurchaseOrderDelivery Supplier reference
CarrierReference String PurchaseOrderDelivery Carrier reference
Currency String PurchaseOrderDelivery Currency
OCCurrency String PurchaseOrderDelivery Operating Company Currency
OCCurrencyExchangeRate Decimal PurchaseOrderDelivery Operating Company Currency Exchange Rate
OCCurrencyExchangeRateOperator String PurchaseOrderDelivery Operating Company Currency Exchange Rate Operator
RequestedDeliveryDate Date PurchaseOrderDelivery Requested Delivery Date
ActualDeliveryDate Date PurchaseOrderDelivery Actual Delivery Date
LineCount Decimal PurchaseOrderDelivery Line Count
PostalAddressUUID String PurchaseOrderDelivery PostalAddress UUID
PostalAddressActive Boolean PurchaseOrderDelivery PostalAddress Active Flag
PostalAddressReference String PurchaseOrderDelivery PostalAddress Reference
PostalAddressName String PurchaseOrderDelivery PostalAddress Name
PostalAddressDescription String PurchaseOrderDelivery PostalAddress Description
PostalAddressAddress1 String PurchaseOrderDelivery PostalAddress Address 1
PostalAddressAddress2 String PurchaseOrderDelivery PostalAddress Address 2
PostalAddressAddress3 String PurchaseOrderDelivery PostalAddress Address 3
PostalAddressAddress4 String PurchaseOrderDelivery PostalAddress Address 4
PostalAddressTownCity String PurchaseOrderDelivery PostalAddress TownCity
PostalAddressCounty String PurchaseOrderDelivery PostalAddress County
PostalAddressStateRegion String PurchaseOrderDelivery PostalAddress StateRegion
PostalAddressZipPostCode String PurchaseOrderDelivery PostalAddress ZipPost Code
PostalAddressCountry String PurchaseOrderDelivery PostalAddress Country
PostalAddressPrimacyIndicator Boolean PurchaseOrderDelivery PostalAddress Primacy Indicator
PostalAddressType String PurchaseOrderDelivery PostalAddress Type. Sample values: Billing, Shipping.
Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
Updated Datetime An input used internally to filter records updated at a specific datetime.

PurchaseOrderDeliveryLineItems

Query PurchaseOrderDeliveryLineItems within Sage UK 50 Accounts.

Table Specific Information
Select

The PurchaseOrderDeliveryLineItems table returns purchase order delivery line item information for a Sage 50 UK company dataset.

SELECT * FROM PurchaseOrderDeliveryLineItems WHERE GoodsReceivedNumber = '123'
Columns
Name Type Description
PODeliveryLineItemUUID [KEY] String PurchaseOrderDeliveryLine UUID
CommodityUUID String PurchaseOrderDeliveryLine Commodity UUID
CommodityProductCode String PurchaseOrderDeliveryLine Commodity Product Code
CommodityName String PurchaseOrderDeliveryLine Commodity Name
GoodsReceivedNumber String PurchaseOrderDeliveryLine Reference
Reference2 String PurchaseOrderDeliveryLine Reference2
LineNumber Decimal PurchaseOrderDeliveryLine Number
Text String PurchaseOrderDeliveryLine Text
RequestedQuantity Decimal PurchaseOrderDeliveryLine Requested Quantity
DeliveredQuantity Decimal PurchaseOrderDeliveryLine Delivered Quantity
UnitDescription String PurchaseOrderLine UnitOfMeasure Description
Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
Updated Datetime An input used internally to filter records updated at a specific datetime.

PurchaseOrderLineItems

Query PurchaseOrderLines within Sage UK 50 Accounts.

Table Specific Information
Select

The PurchaseOrderLineItems table returns purchase order line item information for a Sage 50 UK company dataset.

SELECT * FROM PurchaseOrderLineItems WHERE PurchaseOrderNumber = 'PO123'
Columns
Name Type Description
PurchaseOrderLineItemUUID [KEY] String PurchaseOrderLine UUID
CommodityUUID String PurchaseOrderLine Commodity UUID
CommodityProductCode String PurchaseOrderLine Commodity Product Code
CommodityName String PurchaseOrderLine Commodity Name
PurchaseOrderNumber String PurchaseOrderLine Reference
LineNumber Decimal PurchaseOrderLine Number
DueDate Date PurchaseOrderLine Due Date
Description String PurchaseOrderLine Text
Quantity Decimal PurchaseOrderLine Quantity
InitialPrice Decimal PurchaseOrderLine Initial Price
ActualPrice Decimal PurchaseOrderLine Actual Price
NetTotal Decimal PurchaseOrderLine Net Total
DiscountTotal Decimal PurchaseOrderLine Discount Total
TaxTotal Decimal PurchaseOrderLine Tax Total
GrossTotal Decimal PurchaseOrderLine Gross Total
UnitDescription String PurchaseOrderLine UnitOfMeasure Description
Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
Updated Datetime An input used internally to filter records updated at a specific datetime.

Receipts

Query Receipts within Sage UK 50 Accounts.

Table Specific Information
Select

The Receipts table returns the receipt information for a Sage 50 UK company dataset.

SELECT * FROM Receipts
Columns
Name Type Description
ReceiptUUID [KEY] String Receipt UUID
TradingAccountUUID String Receipt Trading Account UUID
BankAccountUUID String Receipt BankAccount UUID
Type String Receipt Type
Reference String Receipt Reference
Reference2 String Receipt Reference2
Date Date Receipt Date
TradingAccountReference String Receipt TradingAccount reference
Currency String Receipt Currency
OCCurrency String Receipt OperatingCompany Currency
OCCurrencyExchangeRate Decimal Receipt OperatingCompany Currency Exchange Rate
OCCurrencyExchangeRateOperator String Receipt OperatingCompany Currency Exchange Rate Operator
OCCurrencyExchangeRateDate Date Receipt OperatingCompany Currency Exchange Rate Date
BACurrency String Receipt Bank Account Currency
BACurrencyExchangeRate Decimal Receipt Bank Account Currency Exchange Rate
BACurrencyExchangeRateOperator String Receipt Bank Account Currency Exchange Rate Operator
TaxTotal Decimal Receipt Tax Total
GrossTotal Decimal Receipt Gross Total
Description String Receipt Description
LineCount Decimal Receipt Line Count
User String Receipt User
Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
Updated Datetime An input used internally to filter records updated at a specific datetime.

SalesCreditLineItems

Query SalesCreditLineItems within Sage UK 50 Accounts.

Table Specific Information
Select

The SalesCreditLineItems table returns sales credit line item information for a Sage 50 UK company dataset.

SELECT * FROM SalesCreditLineItems WHERE CreditNumber = 'CR123'
Columns
Name Type Description
SalesCreditLineItemsUUID [KEY] String SalesCreditLine UUID
CommodityUUID String SalesCreditLine Commodity UUID
CommodityProductCode String SalesCreditLine Commodity Product Code
CommodityName String SalesCreditLine Commodity Name
CreditNumber String SalesCredit Reference
Reference2 String SalesCreditLine Reference2
Type String SalesCreditLine Type
Number Decimal SalesCreditLine Number
Description String SalesCreditLine Text
DeliveryDate Date SalesCreditLine Delivery Date
Quantity Decimal SalesCreditLine Quantity
InitialPrice Decimal SalesCreditLine Initial Price
InvoiceLineDiscountAmount Decimal SalesCreditLine Invoice Line Discount Amount
InvoiceLineDiscountPercent Decimal SalesCreditLine Invoice Line Discount Percent
ActualPrice Decimal SalesCreditLine Actual Price
NetTotal Decimal SalesCreditLine Net Total
DiscountTotal Decimal SalesCreditLine Discount Total
TaxTotal Decimal SalesCreditLine Tax Total
GrossTotal Decimal SalesCreditLine Gross Total
UnitDescription String SalesCreditLine UnitOfMeasure Description
Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
Updated Datetime An input used internally to filter records updated at a specific datetime.

SalesInvoiceLineItems

Query SalesInvoiceLineItems within Sage UK 50 Accounts.

Table Specific Information
Select

The SalesInvoiceLineItems table returns sales invoice line item information for a Sage 50 UK company dataset.

SELECT * FROM SalesInvoiceLineItems WHERE InvoiceNumber = 'INV123'
Columns
Name Type Description
SalesInvoiceLineItemUUID [KEY] String SalesInvoiceLine UUID
CommodityUUID String SalesInvoiceLine Commodity UUID
CommodityProductCode String SalesInvoiceLine Commodity Product Code
CommodityName String SalesInvoiceLine Commodity Name
InvoiceNumber String SalesInvoice Reference
Reference2 String SalesInvoice Reference2
Type String SalesInvoiceLine Type
LineNumber Integer SalesInvoiceLine Number
Text String SalesInvoiceLine Text
DeliveryDate Date SalesInvoiceLine Delivery Date
Quantity Decimal SalesInvoiceLine Quantity
InitialPrice Decimal SalesInvoiceLine Initial Price
InvoiceLineDiscountAmount Decimal SalesInvoiceLine Invoice Line Discount Amount
InvoiceLineDiscountPercent Decimal SalesInvoiceLine Invoice Line Discount Percent
ActualPrice Decimal SalesInvoiceLine Actual Price
NetTotal Decimal SalesInvoiceLine Net Total
ChargesTotal Decimal SalesInvoiceLine Charges Total
DiscountTotal Decimal SalesInvoiceLine Discount Total
TaxTotal Decimal SalesInvoiceLine Tax Total
GrossTotal Decimal SalesInvoiceLine Gross Total
UnitDescription String SalesInvoiceLine UnitOfMeasure Description
TaxCodeUUID String SalesOrderLine Tax Code UUID
TaxCodeReference String SalesOrderLine Tax Code
TaxCodeValue Decimal SalesOrderLine Tax Code Value
TaxCodeDescription String SalesOrderLine Tax Code Description
TaxCodeType String SalesOrderLine Tax Code Type
Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
Updated Datetime An input used internally to filter records updated at a specific datetime.

SalesOrderDeliveries

Query SalesOrderDeliveries within Sage UK 50 Accounts.

Table Specific Information
Select

The SalesOrderDeliveries table returns sales order delivery information for a Sage 50 UK company dataset.

SELECT * FROM SalesOrderDeliveries
Columns
Name Type Description
SODeliveryUUID [KEY] String SalesOrderDelivery UUID
SalesOrderUUID String SalesOrderDelivery SalesOrder UUID
TradingAccountUUID String SalesOrderDelivery Trading Account UUID
SalesOrderNumber String SalesOrderDelivery Reference
TradingAccountReference String SalesOrderDelivery Reference2
CustomerReference String SalesOrderDelivery Customer reference
CarrierReference String SalesOrderDelivery Carrier reference
Currency String SalesOrderDelivery Currency
OCCurrency String SalesOrderDelivery Operating Company Currency
CustomerCurrencyExchangeRate Decimal SalesOrderDelivery Customer Trading Account Currency Exchange Rate
CustomerCurrencyExchangeRateOperator String SalesOrderDelivery Customer Trading Account Currency Exchange Rate Operator
RequestedDeliveryDate Date SalesOrderDelivery Requested Delivery Date
ActualDeliveryDate Date SalesOrderDelivery Actual Delivery Date
LineCount Decimal SalesOrderDelivery Line Count
PostalAddressUUID String SalesOrderDelivery PostalAddress UUID
PostalAddressActive Boolean SalesOrderDelivery PostalAddress Active Flag
PostalAddressReference String SalesOrderDelivery PostalAddress Reference
PostalAddressName String SalesOrderDelivery PostalAddress Name
PostalAddressDescription String SalesOrderDelivery PostalAddress Description
PostalAddressAddress1 String SalesOrderDelivery PostalAddress Address 1
PostalAddressAddress2 String SalesOrderDelivery PostalAddress Address 2
PostalAddressAddress3 String SalesOrderDelivery PostalAddress Address 3
PostalAddressAddress4 String SalesOrderDelivery PostalAddress Address 4
PostalAddressTownCity String SalesOrderDelivery PostalAddress TownCity
PostalAddressCounty String SalesOrderDelivery PostalAddress County
PostalAddressStateRegion String SalesOrderDelivery PostalAddress StateRegion
PostalAddressZipPostCode String SalesOrderDelivery PostalAddress ZipPost Code
PostalAddressCountry String SalesOrderDelivery PostalAddress Country
PostalAddressPrimacyIndicator Boolean SalesOrderDelivery PostalAddress Primacy Indicator
PostalAddressType String SalesOrderDelivery PostalAddress Type. Sample values: Billing, Shipping.
Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
Updated Datetime An input used internally to filter records updated at a specific datetime.

SalesOrderDeliveryLineItems

Query SalesOrderDeliveryLineItems within Sage UK 50 Accounts.

Table Specific Information
Select

The SalesOrderDeliveryLineItems table returns sales order delivery line item information for a Sage 50 UK company dataset.

SELECT * FROM SalesOrderDeliveryLineItems WHERE GoodsDespatchedNumber = '987'
Columns
Name Type Description
SODeliveryLineItemUUID [KEY] String SalesOrderDeliveryLine UUID
CommodityUUID String SalesOrderDeliveryLine Commodity UUID
CommodityProductCode String SalesOrderDeliveryLine Commodity Product Code
CommodityName String SalesOrderDeliveryLine Commodity Name
SalesOrderNumber String SalesOrderDeliveryLine Sales Order Number
GoodsDespatchedNumber String SalesOrderDeliveryLine Reference
Reference2 String SalesOrderDeliveryLine Reference2
LineNumber Decimal SalesOrderDeliveryLine Number
Text String SalesOrderDeliveryLine Text
RequestedDeliveryDate Date SalesOrderDeliveryLine Requested Delivery Date
ActualDeliveryDate Date SalesOrderDeliveryLine Actual Delivery Date
RequestedQuantity Decimal SalesOrderDeliveryLine Requested Quantity
DeliveredQuantity Decimal SalesOrderDeliveryLine Delivered Quantity
UnitDescription String SalesOrderDeliveryLine UnitOfMeasure Description
Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
Updated Datetime An input used internally to filter records updated at a specific datetime.

SalesOrderLineItems

Query SalesOrderLineItems within Sage UK 50 Accounts.

Table Specific Information
Select

The SalesOrderLineItems table returns sales order line item information for a Sage 50 UK company dataset.

SELECT * FROM SalesOrderLineItems WHERE SalesOrderNumber = 'SO123'
Columns
Name Type Description
SalesOrderLineItemUUID [KEY] String SalesOrderLine UUID
CommodityUUID String SalesOrderLine Commodity UUID
CommodityProductCode String SalesOrderLine Commodity Product Code
CommodityName String SalesOrderLine Commodity Name
SalesOrderNumber String SalesOrderLine Reference
Reference2 String SalesOrderLine Reference2
LineNumber Decimal SalesOrderLine Number
Type String SalesOrderLine Type
Description String SalesOrderLine Text
DueDate Date SalesOrderLine Due Date
CarrierReference String SalesOrderLine Carrier reference
Quantity Decimal SalesOrderLine Quantity
InitialPrice Decimal SalesOrderLine Initial Price
OrderLineDiscountAmount Decimal SalesOrderLine Order Line Discount Amount
OrderLineDiscountPercent Decimal SalesOrderLine Order Line Discount Perecent
ActualPrice Decimal SalesOrderLine Actual Price
NetTotal Decimal SalesOrderLine Net Total
DiscountTotal Decimal SalesOrderLine Discount Total
TaxTotal Decimal SalesOrderLine Tax Total
GrossTotal Decimal SalesOrderLine Gross Total
UnitDescription String SalesOrderLine UnitOfMeasure Description
TaxCodeUUID String SalesOrderLine Tax Code UUID
TaxCodeReference String SalesOrderLine Tax Code
TaxCodeValue Decimal SalesOrderLine Tax Code Value
TaxCodeDescription String SalesOrderLine Tax Code Description
TaxCodeType String SalesOrderLine Tax Code Type
Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
Updated Datetime An input used internally to filter records updated at a specific datetime.

TaxCodes

Query Tax Codes within Sage UK 50 Accounts.

Columns
Name Type Description
TaxCodeUUID [KEY] String Tax Code UUID
TaxCode String Tax Code Reference
Description String Tax Code Description
Type String Tax Code Type
Value Decimal Tax Code Value
Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
Updated Datetime An input used internally to filter records updated at a specific datetime.

TradingActivities

Query TradingActivities within Sage UK 50 Accounts.

Table Specific Information
Select

The TradingActivities table returns the trading activity information for a Sage 50 UK company dataset.

SELECT * FROM TradingActivities
Columns
Name Type Description
TradingActivityUUID [KEY] String TradingActivity UUID
ApplicationID String TradingActivity Application ID
Deleted Boolean TradingActivity Deleted
Label String TradingActivity Label
Reference String TradingActivity Reference
TransactionType String TradingActivity TransactionType
Date Date TradingActivity Date
Details String TradingActivity Details
AmountNet Decimal TradingActivity NetAmount
AmountTax Decimal TradingActivity TaxAmount
AmountGross Decimal TradingActivity GrossAmount
Currency String TradingActivity Currency
AmountPaid Decimal TradingActivity PaidAcmount
TradingAccountReference String TradingActivity AccountReference
DueDate Date TradingActivity Due Date
HeaderNumber String TradingActivity Header Number
Pseudo-Columns

Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.

Name Type Description
Updated Datetime An input used internally to filter records updated at a specific datetime.

Stored Procedures

Stored procedures are available to complement the data available from the Data Model. It may be necessary to update data available from a view using a stored procedure because the data does not provide for direct, table-like, two-way updates. In these situations, the retrieval of the data is done using the appropriate view or table, while the update is done by calling a stored procedure. Stored procedures take a list of parameters and return back a dataset that contains the collection of tuples that constitute the response.

Sage 50 UK Connector Stored Procedures

Name Description
ComputePrice Computes the Price based on a trading account and a commodity provided.

ComputePrice

Computes the Price based on a trading account and a commodity provided.

Input
Name Type Description
TradingAccount String The UUID of the corresponding trading account.
Commodity String The UUID of the commodity/ies participating in the transaction. In case multiple commodities are to be entered seperate by comma (, ).
Quantity String The UUID of the quantity/ies for each commodity in the transaction. In case multiple commodities, their corresponding quantities are to be entered seperate by comma (, ).
Result Set Columns
Name Type Description
NetTotal Double The net total amount.
ProfitTotal Double The profit total amount.
GrossTotal Double The gross total amount.
Success Boolean If the request is sucessful.
TaxTotal Double The tax total amount.
DiscountTotal Double The discount total amount.

System Tables

You can query the system tables described in this section to access schema information, information on data source functionality, and batch operation statistics.

Schema Tables

The following tables return database metadata for Sage 50 UK:

Data Source Tables

The following tables return information about how to connect to and query the data source:

  • sys_connection_props: Returns information on the available connection properties.
  • sys_sqlinfo: Describes the SELECT queries that the connector can offload to the data source.

Query Information Tables

The following table returns query statistics for data modification queries:

  • sys_identity: Returns information about batch operations or single updates.

sys_catalogs

Lists the available databases.

The following query retrieves all databases determined by the connection string:

SELECT * FROM sys_catalogs
Columns
Name Type Description
CatalogName String The database name.

sys_schemas

Lists the available schemas.

The following query retrieves all available schemas:

SELECT * FROM sys_schemas
Columns
Name Type Description
CatalogName String The database name.
SchemaName String The schema name.

sys_tables

Lists the available tables.

The following query retrieves the available tables and views:

SELECT * FROM sys_tables
Columns
Name Type Description
CatalogName String The database containing the table or view.
SchemaName String The schema containing the table or view.
TableName String The name of the table or view.
TableType String The table type (table or view).
Description String A description of the table or view.
IsUpdateable Boolean Whether the table can be updated.

sys_tablecolumns

Describes the columns of the available tables and views.

The following query returns the columns and data types for the TradingAccounts table:

SELECT ColumnName, DataTypeName FROM sys_tablecolumns WHERE TableName='TradingAccounts'
Columns
Name Type Description
CatalogName String The name of the database containing the table or view.
SchemaName String The schema containing the table or view.
TableName String The name of the table or view containing the column.
ColumnName String The column name.
DataTypeName String The data type name.
DataType Int32 An integer indicating the data type. This value is determined at run time based on the environment.
Length Int32 The storage size of the column.
DisplaySize Int32 The designated column's normal maximum width in characters.
NumericPrecision Int32 The maximum number of digits in numeric data. The column length in characters for character and date-time data.
NumericScale Int32 The column scale or number of digits to the right of the decimal point.
IsNullable Boolean Whether the column can contain null.
Description String A brief description of the column.
Ordinal Int32 The sequence number of the column.
IsAutoIncrement String Whether the column value is assigned in fixed increments.
IsGeneratedColumn String Whether the column is generated.
IsHidden Boolean Whether the column is hidden.
IsArray Boolean Whether the column is an array.

sys_procedures

Lists the available stored procedures.

The following query retrieves the available stored procedures:

SELECT * FROM sys_procedures
Columns
Name Type Description
CatalogName String The database containing the stored procedure.
SchemaName String The schema containing the stored procedure.
ProcedureName String The name of the stored procedure.
Description String A description of the stored procedure.
ProcedureType String The type of the procedure, such as PROCEDURE or FUNCTION.

sys_procedureparameters

Describes stored procedure parameters.

The following query returns information about all of the input parameters for the SelectEntries stored procedure:

SELECT * FROM sys_procedureparameters WHERE ProcedureName='SelectEntries' AND Direction=1 OR Direction=2
Columns
Name Type Description
CatalogName String The name of the database containing the stored procedure.
SchemaName String The name of the schema containing the stored procedure.
ProcedureName String The name of the stored procedure containing the parameter.
ColumnName String The name of the stored procedure parameter.
Direction Int32 An integer corresponding to the type of the parameter: input (1), input/output (2), or output(4). input/output type parameters can be both input and output parameters.
DataTypeName String The name of the data type.
DataType Int32 An integer indicating the data type. This value is determined at run time based on the environment.
Length Int32 The number of characters allowed for character data. The number of digits allowed for numeric data.
NumericPrecision Int32 The maximum precision for numeric data. The column length in characters for character and date-time data.
NumericScale Int32 The number of digits to the right of the decimal point in numeric data.
IsNullable Boolean Whether the parameter can contain null.
IsRequired Boolean Whether the parameter is required for execution of the procedure.
IsArray Boolean Whether the parameter is an array.
Description String The description of the parameter.
Ordinal Int32 The index of the parameter.

sys_keycolumns

Describes the primary and foreign keys.

The following query retrieves the primary key for the TradingAccounts table:

SELECT * FROM sys_keycolumns WHERE IsKey='True' AND TableName='TradingAccounts'
Columns
Name Type Description
CatalogName String The name of the database containing the key.
SchemaName String The name of the schema containing the key.
TableName String The name of the table containing the key.
ColumnName String The name of the key column.
IsKey Boolean Whether the column is a primary key in the table referenced in the TableName field.
IsForeignKey Boolean Whether the column is a foreign key referenced in the TableName field.
PrimaryKeyName String The name of the primary key.
ForeignKeyName String The name of the foreign key.
ReferencedCatalogName String The database containing the primary key.
ReferencedSchemaName String The schema containing the primary key.
ReferencedTableName String The table containing the primary key.
ReferencedColumnName String The column name of the primary key.

sys_foreignkeys

Describes the foreign keys.

The following query retrieves all foreign keys which refer to other tables:

SELECT * FROM sys_foreignkeys WHERE ForeignKeyType = 'FOREIGNKEY_TYPE_IMPORT'
Columns
Name Type Description
CatalogName String The name of the database containing the key.
SchemaName String The name of the schema containing the key.
TableName String The name of the table containing the key.
ColumnName String The name of the key column.
PrimaryKeyName String The name of the primary key.
ForeignKeyName String The name of the foreign key.
ReferencedCatalogName String The database containing the primary key.
ReferencedSchemaName String The schema containing the primary key.
ReferencedTableName String The table containing the primary key.
ReferencedColumnName String The column name of the primary key.
ForeignKeyType String Designates whether the foreign key is an import (points to other tables) or export (referenced from other tables) key.

sys_indexes

Describes the available indexes. By filtering on indexes, you can write more selective queries with faster query response times.

The following query retrieves all indexes that are not primary keys:

SELECT * FROM sys_indexes WHERE IsPrimary='false'
Columns
Name Type Description
CatalogName String The name of the database containing the index.
SchemaName String The name of the schema containing the index.
TableName String The name of the table containing the index.
IndexName String The index name.
ColumnName String The name of the column associated with the index.
IsUnique Boolean True if the index is unique. False otherwise.
IsPrimary Boolean True if the index is a primary key. False otherwise.
Type Int16 An integer value corresponding to the index type: statistic (0), clustered (1), hashed (2), or other (3).
SortOrder String The sort order: A for ascending or D for descending.
OrdinalPosition Int16 The sequence number of the column in the index.

sys_connection_props

Returns information on the available connection properties and those set in the connection string.

When querying this table, the config connection string should be used:

jdbc:cdata:sage50uk:config:

This connection string enables you to query this table without a valid connection.

The following query retrieves all connection properties that have been set in the connection string or set through a default value:

SELECT * FROM sys_connection_props WHERE Value <> ''
Columns
Name Type Description
Name String The name of the connection property.
ShortDescription String A brief description.
Type String The data type of the connection property.
Default String The default value if one is not explicitly set.
Values String A comma-separated list of possible values. A validation error is thrown if another value is specified.
Value String The value you set or a preconfigured default.
Required Boolean Whether the property is required to connect.
Category String The category of the connection property.
IsSessionProperty String Whether the property is a session property, used to save information about the current connection.
Sensitivity String The sensitivity level of the property. This informs whether the property is obfuscated in logging and authentication forms.
PropertyName String A camel-cased truncated form of the connection property name.
Ordinal Int32 The index of the parameter.
CatOrdinal Int32 The index of the parameter category.
Hierarchy String Shows dependent properties associated that need to be set alongside this one.
Visible Boolean Informs whether the property is visible in the connection UI.
ETC String Various miscellaneous information about the property.

sys_sqlinfo

Describes the SELECT query processing that the connector can offload to the data source.

Collaborative Query Processing

When working with data sources that do not support SQL-92, you can query the sys_sqlinfo view to determine the query capabilities of the underlying APIs, expressed in SQL syntax. The connector offloads as much of the SELECT statement processing as possible to the server and then processes the rest of the query in memory.

Discovering the Data Source's SELECT Capabilities

Below is an example data set of SQL capabilities. The following result set indicates the SELECT functionality that the connector can offload to the data source or process client side. Your data source may support additional SQL syntax. Some aspects of SELECT functionality are returned in a comma-separated list if supported; otherwise, the column contains NO.

Name Description Possible Values
AGGREGATE_FUNCTIONS Supported aggregation functions. AVG, COUNT, MAX, MIN, SUM, DISTINCT
COUNT Whether COUNT function is supported. YES, NO
IDENTIFIER_QUOTE_OPEN_CHAR The opening character used to escape an identifier. [
IDENTIFIER_QUOTE_CLOSE_CHAR The closing character used to escape an identifier. ]
SUPPORTED_OPERATORS A list of supported SQL operators. =, >, <, >=, <=, <>, !=, LIKE, NOT LIKE, IN, NOT IN, IS NULL, IS NOT NULL, AND, OR
GROUP_BY Whether GROUP BY is supported, and, if so, the degree of support. NO, NO_RELATION, EQUALS_SELECT, SQL_GB_COLLATE
STRING_FUNCTIONS Supported string functions. LENGTH, CHAR, LOCATE, REPLACE, SUBSTRING, RTRIM, LTRIM, RIGHT, LEFT, UCASE, SPACE, SOUNDEX, LCASE, CONCAT, ASCII, REPEAT, OCTET, BIT, POSITION, INSERT, TRIM, UPPER, REGEXP, LOWER, DIFFERENCE, CHARACTER, SUBSTR, STR, REVERSE, PLAN, UUIDTOSTR, TRANSLATE, TRAILING, TO, STUFF, STRTOUUID, STRING, SPLIT, SORTKEY, SIMILAR, REPLICATE, PATINDEX, LPAD, LEN, LEADING, KEY, INSTR, INSERTSTR, HTML, GRAPHICAL, CONVERT, COLLATION, CHARINDEX, BYTE
NUMERIC_FUNCTIONS Supported numeric functions. ABS, ACOS, ASIN, ATAN, ATAN2, CEILING, COS, COT, EXP, FLOOR, LOG, MOD, SIGN, SIN, SQRT, TAN, PI, RAND, DEGREES, LOG10, POWER, RADIANS, ROUND, TRUNCATE
TIMEDATE_FUNCTIONS Supported date/time functions. NOW, CURDATE, DAYOFMONTH, DAYOFWEEK, DAYOFYEAR, MONTH, QUARTER, WEEK, YEAR, CURTIME, HOUR, MINUTE, SECOND, TIMESTAMPADD, TIMESTAMPDIFF, DAYNAME, MONTHNAME, CURRENT_DATE, CURRENT_TIME, CURRENT_TIMESTAMP, EXTRACT
REPLICATION_SKIP_TABLES Indicates tables skipped during replication.
REPLICATION_TIMECHECK_COLUMNS A string array containing a list of columns which will be used to check for (in the given order) to use as a modified column during replication.
IDENTIFIER_PATTERN String value indicating what string is valid for an identifier.
SUPPORT_TRANSACTION Indicates if the provider supports transactions such as commit and rollback. YES, NO
DIALECT Indicates the SQL dialect to use.
KEY_PROPERTIES Indicates the properties which identify the uniform database.
SUPPORTS_MULTIPLE_SCHEMAS Indicates if multiple schemas may exist for the provider. YES, NO
SUPPORTS_MULTIPLE_CATALOGS Indicates if multiple catalogs may exist for the provider. YES, NO
DATASYNCVERSION The Data Sync version needed to access this driver. Standard, Starter, Professional, Enterprise
DATASYNCCATEGORY The Data Sync category of this driver. Source, Destination, Cloud Destination
SUPPORTSENHANCEDSQL Whether enhanced SQL functionality beyond what is offered by the API is supported. TRUE, FALSE
SUPPORTS_BATCH_OPERATIONS Whether batch operations are supported. YES, NO
SQL_CAP All supported SQL capabilities for this driver. SELECT, INSERT, DELETE, UPDATE, TRANSACTIONS, ORDERBY, OAUTH, ASSIGNEDID, LIMIT, LIKE, BULKINSERT, COUNT, BULKDELETE, BULKUPDATE, GROUPBY, HAVING, AGGS, OFFSET, REPLICATE, COUNTDISTINCT, JOINS, DROP, CREATE, DISTINCT, INNERJOINS, SUBQUERIES, ALTER, MULTIPLESCHEMAS, GROUPBYNORELATION, OUTERJOINS, UNIONALL, UNION, UPSERT, GETDELETED, CROSSJOINS, GROUPBYCOLLATE, MULTIPLECATS, FULLOUTERJOIN, MERGE, JSONEXTRACT, BULKUPSERT, SUM, SUBQUERIESFULL, MIN, MAX, JOINSFULL, XMLEXTRACT, AVG, MULTISTATEMENTS, FOREIGNKEYS, CASE, LEFTJOINS, COMMAJOINS, WITH, LITERALS, RENAME, NESTEDTABLES, EXECUTE, BATCH, BASIC, INDEX
PREFERRED_CACHE_OPTIONS A string value specifies the preferred cacheOptions.
ENABLE_EF_ADVANCED_QUERY Indicates if the driver directly supports advanced queries coming from Entity Framework. If not, queries will be handled client side. YES, NO
PSEUDO_COLUMNS A string array indicating the available pseudo columns.
MERGE_ALWAYS If the value is true, The Merge Mode is forcibly executed in Data Sync. TRUE, FALSE
REPLICATION_MIN_DATE_QUERY A select query to return the replicate start datetime.
REPLICATION_MIN_FUNCTION Allows a provider to specify the formula name to use for executing a server side min.
REPLICATION_START_DATE Allows a provider to specify a replicate startdate.
REPLICATION_MAX_DATE_QUERY A select query to return the replicate end datetime.
REPLICATION_MAX_FUNCTION Allows a provider to specify the formula name to use for executing a server side max.
IGNORE_INTERVALS_ON_INITIAL_REPLICATE A list of tables which will skip dividing the replicate into chunks on the initial replicate.
CHECKCACHE_USE_PARENTID Indicates whether the CheckCache statement should be done against the parent key column. TRUE, FALSE
CREATE_SCHEMA_PROCEDURES Indicates stored procedures that can be used for generating schema files.

The following query retrieves the operators that can be used in the WHERE clause:

SELECT * FROM sys_sqlinfo WHERE Name='SUPPORTED_OPERATORS'

Note that individual tables may have different limitations or requirements on the WHERE clause; refer to the Data Model section for more information.

Columns
Name Type Description
NAME String A component of SQL syntax, or a capability that can be processed on the server.
VALUE String Detail on the supported SQL or SQL syntax.

sys_identity

Returns information about attempted modifications.

The following query retrieves the Ids of the modified rows in a batch operation:

SELECT * FROM sys_identity
Columns
Name Type Description
Id String The database-generated ID returned from a data modification operation.
Batch String An identifier for the batch. 1 for a single operation.
Operation String The result of the operation in the batch: INSERTED, UPDATED, or DELETED.
Message String SUCCESS or an error message if the update in the batch failed.

Advanced Configurations Properties

The advanced configurations properties are the various options that can be used to establish a connection. This section provides a complete list of the options you can configure. Click the links for further details.

Authentication

Property Description
AuthScheme The scheme used for authentication. Accepted entries are Basic, Digest, or None.
URL URL to the Sage 50 UK SData service. For example, http://MySite:5493/sdata/accounts50/GCRM/MyDatasetId/.
User The Sage 50 UK user account used to authenticate.
Password The password used to authenticate the user.

SSL

Property Description
SSLServerCert The certificate to be accepted from the server when connecting using TLS/SSL.

Schema

Property Description
Location A path to the directory that contains the schema files defining tables, views, and stored procedures.
BrowsableSchemas This property restricts the schemas reported to a subset of the available schemas. For example, BrowsableSchemas=SchemaA, SchemaB, SchemaC.
Tables This property restricts the tables reported to a subset of the available tables. For example, Tables=TableA, TableB, TableC.
Views Restricts the views reported to a subset of the available tables. For example, Views=ViewA, ViewB, ViewC.

Miscellaneous

Property Description
MaxRows Limits the number of rows returned rows when no aggregation or group by is used in the query. This helps avoid performance issues at design time.
Other These hidden properties are used only in specific use cases.
Pagesize The maximum number of results to return per page from Sage 50 UK.
PseudoColumns This property indicates whether or not to include pseudo columns as columns to the table.
Timeout The value in seconds until the timeout error is thrown, canceling the operation.

Authentication

This section provides a complete list of authentication properties you can configure.

Property Description
AuthScheme The scheme used for authentication. Accepted entries are Basic, Digest, or None.
URL URL to the Sage 50 UK SData service. For example, http://MySite:5493/sdata/accounts50/GCRM/MyDatasetId/.
User The Sage 50 UK user account used to authenticate.
Password The password used to authenticate the user.

AuthScheme

The scheme used for authentication. Accepted entries are Basic, Digest, or None.

Possible Values

Basic, Digest, None

Data Type

string

Default Value

Basic

Remarks

Together with Password and User, this field is used to authenticate against the Sage 50 UK Accounts service. Basic is the default option.

  • Basic: Set this to use HTTP Basic authentication.
  • Digest: Set this to use HTTP Digest authentication.

URL

URL to the Sage 50 UK SData service. For example, http://MySite:5493/sdata/accounts50/GCRM/MyDatasetId/.

Data Type

string

Default Value

""

Remarks

URL to the Sage 50 UK SData service. For example, http://MySite:5493/sdata/accounts50/GCRM/MyDatasetId/.

The URL can be obtained directly from your Sage 50 UK Accounts software by navigating to Tools > Internet Options > SData Settings > Details (Next to Sage 50 UK Accounts). The address can then be copied for the company dataset desired.

User

The Sage 50 UK user account used to authenticate.

Data Type

string

Default Value

""

Remarks

Together with Password, this field is used to authenticate against the Sage 50 UK server.

Password

The password used to authenticate the user.

Data Type

string

Default Value

""

Remarks

The User and Password are together used to authenticate with the server.

SSL

This section provides a complete list of SSL properties you can configure.

Property Description
SSLServerCert The certificate to be accepted from the server when connecting using TLS/SSL.

SSLServerCert

The certificate to be accepted from the server when connecting using TLS/SSL.

Data Type

string

Default Value

""

Remarks

If using a TLS/SSL connection, this property can be used to specify the TLS/SSL certificate to be accepted from the server. Any other certificate that is not trusted by the machine is rejected.

This property can take the following forms:

Description Example
A full PEM Certificate (example shortened for brevity) -----BEGIN CERTIFICATE----- MIIChTCCAe4CAQAwDQYJKoZIhv......Qw== -----END CERTIFICATE-----
A path to a local file containing the certificate C:\cert.cer
The public key (example shortened for brevity) -----BEGIN RSA PUBLIC KEY----- MIGfMA0GCSq......AQAB -----END RSA PUBLIC KEY-----
The MD5 Thumbprint (hex values can also be either space or colon separated) ecadbdda5a1529c58a1e9e09828d70e4
The SHA1 Thumbprint (hex values can also be either space or colon separated) 34a929226ae0819f2ec14b4a3d904f801cbb150d

If not specified, any certificate trusted by the machine is accepted.

Certificates are validated as trusted by the machine based on the System's trust store. The trust store used is the 'javax.net.ssl.trustStore' value specified for the system. If no value is specified for this property, Java's default trust store is used (for example, JAVA_HOME\lib\security\cacerts).

Use '*' to signify to accept all certificates. Note that this is not recommended due to security concerns.

Schema

This section provides a complete list of schema properties you can configure.

Property Description
Location A path to the directory that contains the schema files defining tables, views, and stored procedures.
BrowsableSchemas This property restricts the schemas reported to a subset of the available schemas. For example, BrowsableSchemas=SchemaA, SchemaB, SchemaC.
Tables This property restricts the tables reported to a subset of the available tables. For example, Tables=TableA, TableB, TableC.
Views Restricts the views reported to a subset of the available tables. For example, Views=ViewA, ViewB, ViewC.

Location

A path to the directory that contains the schema files defining tables, views, and stored procedures.

Data Type

string

Default Value

%APPDATA%\Sage50UK Data Provider\Schema

Remarks

The path to a directory which contains the schema files for the connector (.rsd files for tables and views, .rsb files for stored procedures). The folder location can be a relative path from the location of the executable. The Location property is only needed if you want to customize definitions (for example, change a column name, ignore a column, and so on) or extend the data model with new tables, views, or stored procedures.

If left unspecified, the default location is "%APPDATA%\Sage50UK Data Provider\Schema" with %APPDATA% being set to the user's configuration directory:

Platform %APPDATA%
Windows The value of the APPDATA environment variable
Mac ~/Library/Application Support
Linux ~/.config

BrowsableSchemas

This property restricts the schemas reported to a subset of the available schemas. For example, BrowsableSchemas=SchemaA,SchemaB,SchemaC.

Data Type

string

Default Value

""

Remarks

Listing the schemas from databases can be expensive. Providing a list of schemas in the connection string improves the performance.

Tables

This property restricts the tables reported to a subset of the available tables. For example, Tables=TableA,TableB,TableC.

Data Type

string

Default Value

""

Remarks

Listing the tables from some databases can be expensive. Providing a list of tables in the connection string improves the performance of the connector.

This property can also be used as an alternative to automatically listing views if you already know which ones you want to work with and there would otherwise be too many to work with.

Specify the tables you want in a comma-separated list. Each table should be a valid SQL identifier with any special characters escaped using square brackets, double-quotes or backticks. For example, Tables=TableA,[TableB/WithSlash],WithCatalog.WithSchema.`TableC With Space`.

Note that when connecting to a data source with multiple schemas or catalogs, you will need to provide the fully qualified name of the table in this property, as in the last example here, to avoid ambiguity between tables that exist in multiple catalogs or schemas.

Views

Restricts the views reported to a subset of the available tables. For example, Views=ViewA,ViewB,ViewC.

Data Type

string

Default Value

""

Remarks

Listing the views from some databases can be expensive. Providing a list of views in the connection string improves the performance of the connector.

This property can also be used as an alternative to automatically listing views if you already know which ones you want to work with and there would otherwise be too many to work with.

Specify the views you want in a comma-separated list. Each view should be a valid SQL identifier with any special characters escaped using square brackets, double-quotes or backticks. For example, Views=ViewA,[ViewB/WithSlash],WithCatalog.WithSchema.`ViewC With Space`.

Note that when connecting to a data source with multiple schemas or catalogs, you will need to provide the fully qualified name of the table in this property, as in the last example here, to avoid ambiguity between tables that exist in multiple catalogs or schemas.

Miscellaneous

This section provides a complete list of miscellaneous properties you can configure.

Property Description
MaxRows Limits the number of rows returned rows when no aggregation or group by is used in the query. This helps avoid performance issues at design time.
Other These hidden properties are used only in specific use cases.
Pagesize The maximum number of results to return per page from Sage 50 UK.
PseudoColumns This property indicates whether or not to include pseudo columns as columns to the table.
Timeout The value in seconds until the timeout error is thrown, canceling the operation.

MaxRows

Limits the number of rows returned rows when no aggregation or group by is used in the query. This helps avoid performance issues at design time.

Data Type

int

Default Value

-1

Remarks

Limits the number of rows returned rows when no aggregation or group by is used in the query. This helps avoid performance issues at design time.

Other

These hidden properties are used only in specific use cases.

Data Type

string

Default Value

""

Remarks

The properties listed below are available for specific use cases. Normal driver use cases and functionality should not require these properties.

Specify multiple properties in a semicolon-separated list.

Integration and Formatting
Property Description
DefaultColumnSize Sets the default length of string fields when the data source does not provide column length in the metadata. The default value is 2000.
ConvertDateTimeToGMT Determines whether to convert date-time values to GMT, instead of the local time of the machine.
RecordToFile=filename Records the underlying socket data transfer to the specified file.

Pagesize

The maximum number of results to return per page from Sage 50 UK.

Data Type

int

Default Value

1000

Remarks

The Pagesize property affects the maximum number of results to return per page from Sage 50 UK. Setting a higher value may result in better performance at the cost of additional memory allocated per page consumed.

PseudoColumns

This property indicates whether or not to include pseudo columns as columns to the table.

Data Type

string

Default Value

""

Remarks

This setting is particularly helpful in Entity Framework, which does not allow you to set a value for a pseudo column unless it is a table column. The value of this connection setting is of the format "Table1=Column1, Table1=Column2, Table2=Column3". You can use the "*" character to include all tables and all columns; for example, "*=*".

Timeout

The value in seconds until the timeout error is thrown, canceling the operation.

Data Type

int

Default Value

60

Remarks

If Timeout = 0, operations do not time out. The operations run until they complete successfully or until they encounter an error condition.

If Timeout expires and the operation is not yet complete, the connector throws an exception.