Developer
v2026.10
Updated 9 Nov 2026
Pull path
- The field app calls the Go sync endpoint.
go-syncvalidates the existing Laravel JWT using the sharedJWT_SECRET.- Field-access rules enforce campaign membership, active/planning campaign state, geography scope and the device-lock policy.
- The service performs an optimized direct pull for campaign configuration, assigned geography, stock and waybills.
- The device stores the payload locally for offline work.
Push path
- The device submits queued offline records with device/local identifiers.
go-syncrecords the batch insync_ingest_batchesusing a tenant/user/device-scoped idempotency hash.- Admission is bounded. Redis uses a processing-list pattern so queued work is not lost by a simple pop.
- Native writers apply households, children, deliveries, referrals, household interventions, stock journal entries, waybill accept/reject, stock issue/return, stock counts, field presence, training attendance and form submissions.
- Database unique constraints,
ON CONFLICT, idempotency markers and row locks prevent a retry from double-applying the transaction. - PostgreSQL heartbeat/status fields allow interrupted work to be recovered.
Important operational rule
A retry is normal. Never design field support around “the request will only be sent once.” The server path must remain idempotent, and support staff should not clear app storage while unsynced records remain on a device.
Was this page helpful?