I’m facing a concurrency and offline synchronization issue in an AppSheet app, and I’d like to understand how others have handled similar scenarios, as well as validate whether my understanding of the platform’s behavior is correct.
App Context
I have an application that tracks keg movements in a brewery. The operational flow follows a well-defined sequence:
-
Warehouse → In Transit
-
In Transit → Customer
-
Customer → Cleaning
-
Cleaning → Warehouse
Each movement updates the current state of the keg in a physical column, which is updated via a Bot (I chose this approach to avoid using virtual columns due to performance concerns).
Problem
In some scenarios, logistics users perform operations with slow or offline connections. The observed behavior is:
-
User A (logistics) records movement step 3 (Customer → Cleaning), but the app does not sync immediately.
-
Then User B (at the facility) records step 4 (Cleaning → Warehouse) while online — this update reaches the server first.
-
Later, User A’s device syncs, sending the older update (step 3).
Result:
-
AppSheet overwrites the more recent state with an older one.
-
The keg ends up in an incorrect state (e.g., Cleaning instead of Warehouse).
Current Understanding
Based on my analysis, this happens because AppSheet follows a “last write wins” model, without considering:
-
logical process order
-
actual event timestamp
-
concurrency across devices
Additionally, based on observed behavior:
- When a user performs an action and immediately switches to another app, AppSheet seems to stop syncing and does not continue in the background, delaying the data upload until the app returns to the foreground.
I would also like to confirm whether this understanding is accurate.
Attempts So Far
-
Modeled movement history in a separate table
-
Used a VC with MAXROW() to determine current state → worked, but became very slow at scale
-
Switched to a model with a physical state column updated via Bot for better performance
-
Currently evaluating a hybrid model (history + physical current state)
Questions
I’d like to understand how others are handling this type of scenario:
-
Is there a recommended approach to handle offline concurrency in AppSheet?
-
Has anyone implemented version control, event ordering validation, or overwrite prevention in this context?
-
What strategies work best using:
-
app logic (Actions, Bots, validations, etc.)
-
native AppSheet configurations (e.g., sync settings, security, edit control, locking, etc.)
-
-
How can we ensure state consistency without sacrificing performance (avoiding heavy VCs)?
-
Is there a more robust pattern for handling this type of sequential workflow (e.g., state machine, workflow control)?
-
Even if it’s not possible to fully prevent these inconsistencies, is there a way to detect and notify when they occur?
- For example: validations inside Bots, timestamp comparisons, or some kind of automated check that identifies out-of-order operations and triggers alerts?
Notes
This issue mainly occurs in scenarios with:
-
multiple users
-
offline usage
-
concurrent edits to the same record
Any insights, architectural patterns, or real-world experiences would be greatly appreciated!