Middle
Search…
Record Types
Structure and link an app's data
A record type is a data set that an app will sync and store. Using foreign keys you are able to relate this data with other record types. Within a record type you build out the attributes associated with a record. When adding a new attribute you will need to define the attribute type. There are eight attribute types: primary id, foreign key, string, number, ISO Date, ISO Datetime, Boolean, and Array. In the key column you will want to enter the field name as it appears in the API in the source system Middle will be pulling from, such as primary_phone to represent a user's phone number. You are then able to provide any title or description you'd like to represent this attribute. To accomodate complicated data types, Middle allows you to build out arrays within records.
Building out the attributes on a record type

Syncs

Once you've setup a record type's attributes, you will then need to develop a way to grab this from the source system. There are three types of syncs that can be developed in Middle: recent record lookup, primary ID lookup, and complete transfer. You can use any combination of these sync to grab data for a record type. All of these syncs come with their own intricacies, but all accomodate in-browser coding to allow you to easily develop an integration within Middle's infrastructure. All coding is done in Python script.
Configuring and coding a recent record poll sync

Recent Record Poll Syncs

Recent record lookups run throughout the day and grab recently updated or created data. They are the best way to get a reliable feed of data to ensure your Middle data is correct and to perform workflows as records are updated and created. These types of syncs generally run off of a last modified datetime filter in the source system. When creating a recent record lookup, you are able to determine how frequently Middle will grab data and how much overlap there will be between syncs. This means that if Middle is syncing every 15 minutes, you can set an overlap of 45 minutes to look at the past hour of data. This helps to pickup anything that was missed on the previous sync.

Primary ID Lookups

When Middle grabs data via a recent record lookup or complete transfer, primary ID lookups allow Middle to also get data for any related records. For example, if Middle synced a sale record with an associated user, then a primary ID lookup would grab that user's data. Primary ID lookups ensure that Middle has all the data it needs to execute workflows.

Complete Transfers

Complete transfer simply allow you to grab all data from a data source or endpoints. Complete transfers are best suited for small data sets from which you need to have all data. On the account side, complete transfers can be setup to just run when triggered by an ad-hoc sync or they can be toggled on and run automatically at a defined interval.
Last modified 1mo ago