mobilit.ee

Documents Guide

Guides

“Documents” are what your mobile app users create. The structure of each document is defined by its template.

Life cycle

Document format

Data formats

Life cycle

Pending Complete Gone

  • Pending: any newly created document is in this state. Documents are created by: Pending documents are synchronized between the mobile app and the mobilit.ee cloud, and appear in the “Pending” list in the mobile app
  • Complete: documents are “completed” in the mobile app by tapping the button at the bottom of the document. They appear in the “Complete” list in the mobile app and can no longer be edited
  • Gone: “completed” become “gone” when they have been delivered to all subscribers (Zapier, etc.), or when all attempts to deliver have failed. At this point, they are removed from the mobilit.ee cloud, and in turn are removed from the mobile app

Document format

Documents are stored and transmitted as JSON. Transmission is always UTF-8.

Key elements:

  • _id – always in the form:

    doc_user_unique

    • user – the name of the user
    • unique – a unique sequence of characters to distinguish this document
  • properties – information about the document, including:
    • template_name – the name of the document’s template
    • template_version – the version of the template
    • started – date and time the document was created, by
      • selecting the templated on the mobile device
      • uploading it to via the API
    • firstSave – date and time the document was first saved
    • lastSave – date and time the document was last saved
  • content – data items defined by the template

See also API Guide: Processing documents.

Data formats

If you need a list of data types for a specific template, you can obtain this via the API. See API Reference: Templates: get field descriptions.

For descriptions of the data type for specific components, see Template Components.

As a rule:

  • boolean values are encoded as JSON booleans (for example, the checkbox component)
  • anything numeric is encoded as a JSON number
  • everything else is text

Some kinds of data (like text input) are obviously text. But the lack of data types in JSON means that other kinds of data have to be encoded as text too.

Copyright © 2018 mobilit.ee OÜ