Collect: Coming soon, Offline Entities!

Entities represent the people, places and things that are important to your workflow. They can be created or updated by form submissions, directly from Central or via Central’s API. Entities enable longitudinal data collection, form linking, case management, and more.

How Entities work today

Currently, Entity processing happens on the server only. This means that when a user fills out a form that creates or updates an Entity, that same user doesn’t see the new or updated Entity until they have sent the form submission to the server and then downloaded form updates to their device.

For people working in an environment with fast Internet connectivity, the updates will appear when forms automatically update (typically 15 minutes) or near real-time when manually refreshing. If they’re working offline, however, they may not see Entity changes that they have made themselves for some time. For example, if I register a participant while offline, I won’t be able to pick that participant from a list in another form until I submit the registration and update the form(s) that use the participant list.

What offline Entities will enable

Making it possible to create or update entities immediately while offline will help meet a lot of goals that currently either require connectivity or some other tools like a paper tally sheet. Here’s what will be possible, even if Collect is entirely offline:

  • a bed net distributor's map can update to only show households that still need nets
  • a lab technician can be warned if they scan a blood sample vial’s barcode twice
  • a volunteer can register a person in need and immediately document any distributed aid
  • an agronomist can only fill out forms about diseased crops found in last week's survey
  • a vaccinator can see their daily progress towards their households visited goal

Multiple updates to the same entity

Entity creation and updates will happen at form finalization time. Multiple updates to the same entity will be possible while offline and the order of submission finalization will determine the order that the updates are applied. Collect will make a best effort to send submissions in the order that they were created. If they do arrive out of order on Central, they will be marked as conflicts and can be resolved there.

If two offline devices modify the same entity without first updating from the server, that will result in a conflict shown in Central where it can be addressed. We do not plan to show conflicts to data collectors because it can be difficult to resolve conflicts without project-wide context. Instead, we recommend separating out work to reduce the likelihood of two data collectors making updates to the same entity. You can do that today with tools like choice filters on properties. We are starting to explore how Central will make it possible to segment Entities so that each data collector receives only the ones that are relevant to them (see this thread for an example and to share your needs).

What to expect next (and a rough timeline)

We have started work on offline entities and will share a prototype that you can try in a few weeks. We will then refine the implementation to address situations such as when an Entity is updated or deleted on Central and then also updated by an offline Collect install.

We will also work to increase performance of both entity lists and other attached CSVs. Our goal is to make it possible to use lists of hundreds of thousands of entities with no slowdowns (with some queries being slower than others, we will document this in detail).

We are currently hoping to release offline entity support in Collect v2024.3 in late 2024.

Let us know if you have any questions about this functionality!