Sometimes enumerators don't always have a cell data connection but do have SMS. It'd be nice if we could send some data to an SMS endpoint. SMS is an unreliable protocol and there is still no good way to get SMSes into ODK Aggregate where the rest of the data lives, but I don't think we should let perfect be the enemy of good...
There is existing code in JavaRosa for an SMS transmission API. There is also an existing issue on Collect that summarizes the great work that Medic Mobile has done on their fork of Collect.
I've tried to summarize the above in the proposal below.
Proposal
A form designer specifies an SMS prefix (essentially a form ID), delimiter (defaults to space) and SMS number in the XLSForm. The designer also optionally specifies a short name (also known as a tag) for each question whose answer will be sent via SMS. This short name would be a new column in the XLSForm.
For example, the designer could have a form (prefix: F123
, number: 555-5555
) that asks for name (tag: +N
), gender (tag: +G
), and age (tag: +A
). Enumerators fill this out like any other form in ODK Collect.
When the enumerator finalizes the form, Collect splits the finalized form into chunks of 160 characters. When the enumerator hits send, Collect sends every chunk over SMS to 555-5555. Once Collect is sure all the SMSs are sent, it marks the form as sent via SMS.
The submissions will look like this.
F123 +N JOHN DOE +G M +A 35
F123 +N JANE SMITH +G F +A 26
Note that the data will not go to Aggregate! Instead, they will go to an SMS endpoint (perhaps set up via TextIt) to receive that data. And from there, users can do whatever they want with that data (perhaps send it to Google Sheets via Zapier).
Administrators will be able to override the SMS number in the form by entering a different SMS number in the settings. And like all administrator settings, they'll be able to hide it via an admin password.
Open questions
My expectation is that if there was an SMS number in the form, that would be the only transport option. But I can also imagine situations where you would have an SMS number in the form, but would want the cell network to be the default and the SMS is backup. Or situations where you want the enumerator to choose the transport at the time of submission. How should we handle that?