Create Sage 200-Connected Applications in Appsmith



Connect to Sage 200 Data via CData Connect Cloud in Appsmith and create custom business applications with real-time access to Sage 200 data.

Appsmith is an open-source internal tool builder that allows teams to quickly and easily build a UI to help improve their business operations. When combined with CData Connect Cloud, you gain immediate access to Sage 200 data for business applications. This article outlines the process of connecting to Sage 200 using Connect Cloud and creating a basic application from Sage 200 data within Appsmith.

CData Connect Cloud offers a pure SQL Server, cloud-to-cloud interface for Sage 200, enabling the creation of business applications directly from live Sage 200 data within Appsmith, all without the need for data replication to a native database. As you build applications, Appsmith generates SQL queries to gather data. With its inherent optimized data processing capabilities, CData Connect Cloud efficiently channels all supported SQL operations, including filters and JOINs, directly to Sage 200. This leverages server-side processing to swiftly deliver the requested Sage 200 data.

Configure Sage 200 Connectivity for Appsmith

Connectivity to Sage 200 from Appsmith is made possible through CData Connect Cloud. To work with Sage 200 data from Appsmith, we start by creating and configuring a Sage 200 connection.

  1. Log into Connect Cloud, click Connections and click Add Connection
  2. Select "Sage 200" from the Add Connection panel
  3. Enter the necessary authentication properties to connect to Sage 200.
    • Schema: Determines which Sage 200 edition you are connecting to. Specify either StandardUK or ProfessionalUK.
    • Subscription Key: Provides access to the APIs that are used to establish a connection. You will first need to log into the Sage 200 API website and subscribe to the API edition that matches your account. You can do so here: https://developer.columbus.sage.com/docs/services/api/uk. Afterwards, the subscription key may be found in your profile after logging into Sage 200.
  4. Click Create & Test
  5. Navigate to the Permissions tab in the Add Sage 200 Connection page and update the User-based permissions.

Add a Personal Access Token

When connecting to Connect Cloud through the REST API, the OData API, or the Virtual SQL Server, a Personal Access Token (PAT) is used to authenticate the connection to Connect Cloud. It is best practice to create a separate PAT for each service to maintain granularity of access.

  1. Click on the Gear icon () at the top right of the Connect Cloud app to open the settings page.
  2. On the Settings page, go to the Access Tokens section and click Create PAT.
  3. Give the PAT a name and click Create.
  4. The personal access token is only visible at creation, so be sure to copy it and store it securely for future use.

With the connection configured and a PAT generated, we are ready to connect to Sage 200 data from Appsmith.

Create an Appsmith Application from live Sage 200 Data

To establish a connection from Appsmith to the CData Connect Cloud Virtual SQL Server, follow these steps:

Connect to Sage 200 in Appsmith

  1. Log in to your Appsmith instance and create a new application.
  2. In the new application, open the Data page and select Bring your data.
  3. On this page, you can search for Microsoft SQL Server and select it as your data source.
  4. Enter a name for the new data source and then enter the following connection settings:
    • Host address: tds.cdata.com
    • Port: 14333
    • Database name: enter the Connection Name of the CData Connect Cloud data source you want to connect to (for example, Sage2001).
    • Username: enter your CData Connect Cloud username. This is displayed in the top-right corner of the CData Connect Cloud interface. For example, test@cdata.com.
    • Password: enter the PAT you previously generated.
  5. Click Test configuration to confirm a successful connection, then click Save to save the datasource.

Create a new query

With a connection configured to a datasource, we can add a SQL query to actually retrieve data from the data source.

  1. On the screen with the new data source, click New Query.
  2. This opens the Query Editor to enter a SQL query to select data. To assist with specifying a SQL query, use the Explorer of CData Connect Cloud to preview the SQL queries and the data you want to retrieve.
  3. After creating the SQL query, return to the Query Editor in Appsmith and enter the SQL query, then click Run.
  4. Once the query successfully runs, all that remains is to set up the Page to display the data retrieved.

Display Sage 200 data

  1. Open the UI tab and click New UI element.
  2. Choose a new UI element to grab, then drag and place the element on the page.
  3. Click Connect data on the new UI element, then select the query previously created.
  4. With the data connected, it is then displayed in the UI element.

Deploy the application

With the Sage 200 data connected to the UI elements in the application, we can deploy the Application. To do this, click Deploy in the top-right corner of Appsmith, then the application is opened in a seperate window displaying the Sage 200 data.

Get CData Connect Cloud

To get live data access to 100+ SaaS, Big Data, and NoSQL sources directly from your cloud applications, try CData Connect Cloud today!

Ready to get started?

Learn more about CData Connect Cloud or sign up for free trial access:

Free Trial