Reservation System for Non-Literate Workers

I should specify here that the form would be accessible on multiple devices and any device with this form should be able to allow any person to register for a time slot AND display confirmation they have been registered for that time slot as long as they have their uniqueID (QR or telephone number). I'd probably do a separate form for signup/adding their basic contact info and each unique ID would be an entity. Then have a separate form for the actual time slot registration. Ideally, these would be the same form (although not a dealbreaker) and I could just have the first question be something like: What do you want to do:

  1. I'm a new person that wants to register my name
  2. I want to signup for a time slot
  3. I want to confirm if I'm registered for a time slot

Because this is being done on many devices, they would all need to sync up to the source of truth (ODK Central) to confirm they have in fact been officially registered.

My main question in design is with regards to setting the limit of X number of people to register for a certain day. In my mind that date/time slot would be an entity with a property of something like "spots_available" and it would need to count down as submissions come in. I'm not sure how I would do a calculation to count submissions for that time slot in order to do this calculation. Is this possible? I guess an infinite number of people can sign up for the time slot, but only the nth person and lower gets a positive confirmation message after submission and looking at their status.

Secondly, if these are being filled out offline and then submitted, who/what submissions would get priority/registered first? Heres an example:

There are 10 slots available for next Monday and 9 have been filled already. Enumerator 1 fills out the form on Saturday morning to reserve his place on Monday, but doesn't connect to the internet/submit until Sunday night. Enumerator 2 fills out the form Sunday morning and sends it Sunday morning.

My assumption is Enumerator 2, because he actually sends his submission first, he would get the last spot. So then the question is, what happens to Enumerator 1? His form gets submitted, but my assumption is the best procedure would be to have the confirmation in another part of the form where it displays a note based on his submission place/order that says "Sorry, this time slot is already filled" or "You were the 11th person and there are only 10 places available.

It looks like quotas explained here is a similar concept, but not sure how this is handled with offline devices. Currently, entities can be updated offline if on a single device, but in my scenario where I wanted the source of truth to be the Central server to avoid entity conflicts, is there a way to FORCE a device to update its form/entity data before/after submitting so that displaying a confirmation to a user would ALWAYS be accurate and different devices would never display conflicting entity data?

With regards to syncing intervals for devices, we are currently setting up 3 days each week that people would register for, so they would need to sync up more than weekly but theoretically less than daily. Daily syncs wouldn't be a dealbreaker, but I do think that some enumerators wouldn't want to do that. I think the most important requirement here would be that as soon as someone sends their submissions, they would need an easy way to see a confirmation if they've been official registered for that time slot or not.

In my mind that would mean, enumerator sends their submissions when their device connects to the internet, at the same time their device gets the most up-to-date entity info on time slots left. Enumerator then opens the form, puts in their ID and see when/if they are registered for X time slot.

Sorry this is so long and disorganized, I'm trying to wrap my mind around this and it is making my head hurt a bit :thinking: