Data Source Connector – Platform Replicate

Data Source Connector – Platform Replicate

Platform Replicate (previously Platform Sync) was originally created as the dedicated connector for our eForms Mobile Replicate add-on. However, its capabilities are not exclusive to that product.

You can use the Platform Replicate connector to connect any external database or custom system for which we do not have a live connector. While it is a bit more technical to configure, requiring you to build and host your own API endpoint, it allows you to bypass certain platform limitations, such as our 50,000-row limit on system data sources.

This article discusses when to use it, its pros and cons, and how to set it up.

Note: We assume you understand data sources, database systems, and API endpoints, as we use these terms throughout.


Key Benefits

Data Sovereinty

Your data does not need to be pushed to our platform. This resolves data sovereignty concerns, as no data is copied to our platform servers (unlike standard data source connectors).

Real-Time Data

Unlike standard connectors that run on a scheduled interval (e.g., every 15 minutes), Platform Replicate fetches rows each time the app syncs with the platform. This gives you access to your data exactly when needed.

This might come at the expense of large data usage or slow app response times for significant data sources, so experimentation and testing are advised when attempting a Platform Replicate implementation.

Bypass the 50k Row Limit

Because rows are delivered directly from your server to the user’s device, Platform Replicate connectors are not subject to the standard 50,000-row limit.

Filter Rows by User

The key advantage here is granular control. You can filter the data rows exposed to the app down to the individual user level based on their email. This is critical for ERP, CRM, and enterprise systems where permissions (“who gets to see what”) are strictly controlled.


 Performance Warning

When row counts become large, the app still has performance limits that vary heavily based on device specifications (Android vs. iOS).

Performance is dictated by overall file size, not just row count.

For example, 5,000 rows containing 100kb of text per row will run significantly slower than 50,000 rows containing only 1kb per row. Additionally, using “heavy” data sources across multiple sequential screens will degrade compounding performance as data accumulates in the device memory.

You must test the app on physical devices to find the optimal row count and screen mix for your specific dataset.


How It All Works

  1. When the app discovers a Data Source using a Platform Replicate connector, it performs an HTTP GET request against your target web service URL.
  2. The GET request contains the External ID of the requested Data Source, your account’s Private Token (for authentication), and the user’s email address (for row filtering).
  3. The app issues GET requests sequentially (one request per Data Source) to your service whenever it attempts a data synchronization.
  4. Security Requirement: You MUST expose your web service endpoint as SSL-secured HTTPS to protect app requests.

While the exact way you configure your Platform Replicate endpoint is entirely up to you (PHP, Python, Node.js, C#, etc.), the request and response structures must match our required JSON format exactly.


Setting up a Platform Replicate Data Source

Tip: For testing purposes, we recommend using a REST API mock service.

  1. Create a new Data Source or select an existing one.
  2. On the Rows page, manually define and organize your columns to match the output of your web service.
    Note: For column references to work, the column order here MUST perfectly match the order your web service returns. If you change the order in your API, you must update it here.
  3. On the Settings page, ensure the External ID field is set to a unique value. (Remember this value; you need it for your GET web service).
  4. Click Add Connector and select Platform Replicate.
  5. Enter your External ID and the Target GET URL of your web service endpoint.

(Optional) You can set a global Data Source Replicate URL for your organization under Organization Setup > Global Data Source URL and specify that the connector uses it. This allows you to reuse the same service endpoint across multiple data sources.


GET Request Essentials

The App issues GET requests to your service, passing values as query string parameters. Most integration settings, including the Integration Key (Private Token) and Provider ID (Company ID), can be found on your Organization Setup screen.

Above is the format of a typical request made by the app to your Platformn Replicate endpoint, with:

Given that this connector is REST-based, you can test your web service directly via your web browser using a REST plugin like the Postman plugin for Google Chrome.

Request Parameters

ParameterTypeDescription
idsRequired StringComma-separated list of External IDs for each Data Source the app wants to sync.
providerIdRequired IntegerYour Company ID. Use this with the integration key and email to authenticate.
integrationkeyRequired StringYour Private Token (found in Organization Setup).
emailRequired StringThe email address of the logged-in app user. Use this to filter returned rows based on permissions.
lastupdatedRequired DateTimeYYYY-MM-DDTHH:MI:SS. The last time the app checked for updates.

This is recommended for large Data Sources to save server resources and prevent exhausting mobile data allocations.

Use this for incremental syncs (returning only new/deleted rows). If nothing has changed, return a response with no DataSources property.

Note: On the first sync, this value will be at least 1 year old.
We suggest you monitor for this and return the complete data set in the Rows property of your response.
lastupdatedsStringComma-separated list of DateTime values in the format “YYYY-MM-DDTHH:MI:SS” that represent the last time the app requested an update for the corresponding data source. The values are listed in the same order as the external IDs in the IDs parameter.

Each date in the list represents the last time the app checked for updates for the specific data source. Use this to implement incremental row updates, passing back the new/updated and deleted rows since the app checked in. This is recommended for large Data Sources to save server resources and prevent exhausting mobile data allocations.

You can also use these values to determine whether anything needs to be updated since the app last pinged your service. If nothing has changed for the related data sources, you can return a response with no DataSources property defined.

The first time the app checks for rows for a specific data source, the related last updated value will be left blank in its position in the comma-separated list. In this case, we suggest you return the full data set in the Rows property of your response.

GET Response Syntax

Your web service MUST return a 400-level HTTP status if the GET fails. If successful, your response MUST be in JSON format.

Performance Tip:
We highly recommend enabling gzip or deflate compression on your server for the JSON response. The app sends an Accept-Encoding header, and compressing text data massively reduces download times.

How to apply response encoding is beyond our support scope – you’ll need to confirm this with your software developers.

If you use Microsoft IIS as your web server, Built-in GZip/Deflate Compression on IIS 7.x may help you check your compression settings.
HTTP Compression Test / WhatsMyIP.org may also help identify if your server response is indeed being compressed.

Sample JSON body
{
"DataSources": [
{
"Id": "JOBS",
"Rows": [
[
"10011",
"10011 - Test Generic Project",
"TEST",
"12345AA",
"19 Nov 2013",
"12 Somewhere Road"
],
[
"ZDS654",
"ZDS654 - Maintenance Costs to Excavator",
"TEST",
"",
"27 Nov 2013",
"24 Somewhere Else Road"
],
[
"ZDF662",
"ZDF662 - Maintenance Costs for Hitachi Excavator",
"TEST2",
"",
"28 Nov 2013",
"182 Another Place, Somewhere"
]
],
"NewRows": [],
"DeletedRows": []
}
],
"LastUpdated": "2024-02-11T15:45:50.4818098+10:00"
}

Root Response Structure

NodeTypeDescription
DataSourcesCollectionContains the requested Data Sources. If nothing has changed since the LastUpdated timestamp, omit this property entirely.

Then you can return a response with no DataSources property defined.
Or, if returning multiple data sources. Then, no Rows, NewRows, and
DeletedRows properties are set on those you do not wish to update.
LastUpdatedRequired DateTimeYYYY-MM-DDTHH:MI:SS. We recommend using your host server’s current date and time. The app will store this and send it back on the next GET request.

This provides a central point in time for incremental updates, particularly since the app will sync with your server’s time rather than rely on its unreliable device time.
The “T” in the required format is a delimiter.

DataSource Object Structure

NodeTypeDescription
IdRequired StringThe External ID of the DataSource. Must match the ID in the platform settings.
RowsCollectionA full data set that will completely replace all existing rows on the app. If you specify Rows, any values in NewRows or DeletedRows are ignored.
NewRowsCollectionIncremental updates/inserts to add to existing rows.
DeletedRowsCollectionIncremental deletes. Each row here only needs a single Val (the unique identifier) to remove it from the app.

Row Values (Val)

The “Rows” array is a collection of values (Val), representing individual columns.

  • Minimums: Every Row must contain at least two values.
  • Column 1 (Key): The first Val MUST be the unique identifier/key for that row. This is critical for incremental deletes.
  • Column 2 (Label): The second Val is the default displayable label text in the app.
NodeTypeDescription
ValRequired StringThe column value.
To display an image in the app, pass the HTTP URL of a PNG or JPG/JPEG.

Troubleshooting & Testing

Once you set up a Platform Replicate connector, the Data Source’s Rows page in the platform will automatically attempt to pull rows from your GET URL. It mimics the app’s request (including your logged-in user email), making it an easy way to verify your JSON formatting.

“Why does it work on iOS, but fail on Android?”

If Android devices fail to sync but iOS devices work, it is almost certainly an SSL certificate chain issue. Android enforces much stricter SSL validation than iOS.

If your web service endpoint is missing intermediate certificates from your Certificate Authority, Android will block the connection.

  1. Test: Open your default Android mobile browser and navigate directly to your Platform Replicate URL. If you see a “certificate authority is invalid” error, your chain is broken.
  2. Verify: Run your endpoint URL through SSL Labs. Look for a “chain incomplete” warning.
  3. Fix: Have your server administrator install the required intermediate certificates from your SSL provider (e.g., GoDaddy, Let’s Encrypt). Once the chain is complete, Android will successfully connect and sync.

Example Code

C# example that outlines the request and response structures as simple classes.

Even if you are not using C#, reviewing the properties and structure in code form can be very helpful in getting started with your own Platform Replicate service.

Platform Replicate – Request and Response Structure.cs
using System;
using System.Collections.Generic;

namespace Example.HostedGET
{
// Data Transfer Object (DTO) classes for web services linked to Hosted GET connectors on Data Sources.
// A Hosted GET service exposes the rows for a Data Source from an external system/database.
// The service must accept the request payload described in the DRows class below,
// and must respond with the payload described in the DRowsResponse class.

/// <summary>
/// Request DTO class for calls made by the app to Hosted GET web services.
/// </summary>
public class DRowsRequest
{
/// <summary>
/// Comma separated list of External Ids for each Data Source that the app wants to synchronise.
/// You set the External Id on the Data Source via the App Builder -> Data Sources -> Settings page in the platform.
/// </summary>
public string Ids { get; set; }

/// <summary>
/// Comma separated list of last updated values for each external id in Ids that the app wants to synchronise.
/// Values are listed in the same order as Ids and will contain a blank value if the related data source have not been requested before.
/// Use this to implement incremental app updates, passing back just the new/updated and delete rows since the time the app checked in.
/// This is recommended for large Data Sources to save server resources and prevent exhausting mobile data allocations.
/// </summary>
public string LastUpdateds { get; set; }

/// <summary>
/// Your unique Company Id, found on the Organisation Setup page in the platform
/// </summary>
public int ProviderId { get; set; }

/// <summary>
/// Your unique Integration Key, found on the Organisation Setup page in the platform
/// </summary>
public string IntegrationKey { get; set; }

/// <summary>
/// Email address of the logged in app user making the request
/// </summary>
public string Email { get; set; }
}

/// <summary>
/// Response DTO class for calls made by the app to Hosted GET web services.
/// </summary>
public class DRowsResponse
{
/// <summary>
/// Collection containing the DataSources that have been requested.
/// </summary>
public DSources DataSources { get; set; }

/// <summary>
/// The last time that the rows for this Data Source were updated.
/// We recommend that this be the current date and time on your host server at the time of processing the request.
/// This value is stored by the app and sent in the LastUpdateds field of the next Row Search request made by the app.
/// This gives a central point of time for incremental updates in particular, since the app will echo your server times rather than use its own unreliable device time.
/// </summary>
public DateTime LastUpdated { get; set; }
}

public class DSource
{
/// <summary>
/// The External Id of the DataSource for which the associated Row data applies. Must match the External Id configured in the Data Source -> Settings page on the platform.
/// </summary>
public string Id { get; set; }

/// <summary>
/// A collection of Rows that will completely replace all current Data Source rows on app.
/// If you specify Rows, then any values in NewRows and DeletedRows will be ignored.
/// </summary>
public Rows Rows { get; set; }

/// <summary>
/// A collection of Rows that should be added/updated onto the existing Data Source rows on the app.
/// Use this field to perform incremental inserts/updates of your Data Source.
/// </summary>
public Rows NewRows { get; set; }

/// <summary>
/// A collection of Row Items that should be deleted from the existing Data Source rows on the app.
/// Use this field to perform incremental deletes of your Data Source.
/// Each Row should contain a single Val element that is your unique identifier for the Row to delete.
/// </summary>
public Rows DeletedRows { get; set; }
}

public class DSources : List<DSource> { }

public class Rows : List<Row> { }

public class Row : List<string> { }

}