Skip to main content

MeData Definitions

MeData Definitions specify which data points are to be collected by the Mobile SDK. A MeData Definition, as the name implies, defines the source and the allowed values of a data point to be collected by the Mobile SDK and processed in the platform.

MeData Definitions page

MeData Definitions page

The MeData Definitions page displays categories list and MeData Definitions table. On this page you can:

  • Create a category by clicking the plus button on the top right corner of the categories list
  • Edit a category by clicking on 3 dot icon and clicking 'Edit' in the displayed context menu
  • Create a new MeData Definition by clicking the plus button on the top right corner of the MeData Definition table
  • Edit a MeData Definition either by double clicking on it in the table or by clicking 3 dot icon in its row and clicking 'Edit' in the context menu

MeData Definition Editor

The editor lets you create a new or edit an existing MeData Definition. A MeData Definition has following fields:

  • Source: a Source selected from available ones
  • Programmatic name: a language-independent (programmatic) name to be used within scripts
  • Display name: a human language name for display purposes
  • Description: an optional description
  • Icon: a small icon
  • Sharable: whether MeData is sharable or not
  • Value Type: a Value Type
  • Enumerated: if true, the value must be one of the defined 'Enum Values'
    • Enum values: a list of predefined values, each value has following fields:
      • Programmatic name: a language-independent (programmatic) name to be used within scripts
      • Label: a human language name for display purposes
      • Image: an image that will be displayed along with the text
    • Allow none: if true, 'None of listed' is allowed as a value in addition to provided value list
    • Allow IDK: if true, 'I dont know' is allowed as a value in addition to provided value list
    • Allow other: if true user is allowed to provide a freeform input
  • Multivalued: If true, MeData may have multiple values, in other words it can have array of values
  • Storage: settings regarding on-device storage of collected values

A Script sourced MeData Definitions

A "Script" sourced MeData Definition

MeData Sources

Each MeData Definition points to a Source in terms of the value collection / access method:

  • Native, requires native code provided out of the box by the DataSapien Mobile SDK to be executed to access device hardware, mobile OS, installed apps and native APIs provided by those. You can not create Native sourced MeData Definitions.
  • Question, requires a Question to be displayed in the app UI, you need to define its details such as title, text, image etc.
  • Script, requires a script to be executed, you need to author the script to be executed on-device.
  • VC, obtained from Verifiable Credentials (eg Driving License) stored in OWF compliant Wallet Service of the SDK, you need to provide the JSON path to point to the data within targeted verifiable credential.

Native sourced definitions are predefined in the platform. For instance; "Device Language" and "Mobile Operator" are native definitions and their values are collected using native iOS / Android APIs.

Info

The DataSapien Mobile SDK supports a rich set of native sourced MeData Definitions. Contact us to request a new one.

Sharable

Journeys make use of MeData Definitions to access their on-edge collected values within Journey execution. When a MeData Definition is marked as sharable, you can request the collected value to be sent to backend as Zero-Party Data at the end of the Journey execution. Otherwise Journey Editor will not allow you to select the MeData to be sent to backend.

Value Type

A Value Type specifies the data type and related constraints for the value of the MeData to be collected. Having a well-defined value type, with managed constraints, allows:

  • Safe usage of MeData Definitions eg when creating Segment Definitions based on them.
  • Error-free programmatic processing of MeData (including AI).

A Value Type consists of:

  • Data Type: type of value for this MeData, one of string, number, boolean, datetime, image, video, and listed complex objects (eg "Location", "Calendar Entry" etc)
  • Value Constraints: defines constraints that value must obey
    • Min value: allowed minimum value for numeric and datetime types
    • Max value: allowed maximum value for numeric and datetime types
    • Regex: allowed format for string type
    • Allow camera: if true, taking pictures with camera should be enabled for image type
    • Allow gallery: if true, picking an image from gallery should be enabled for image type

Storage Settings

The Mobile SDK stores collected values for MeData Definitions on-edge. Storage settings consists of:

  • Stored value count: this specifies number of values to be stored, when this count is reached, the Mobile SDK will discard oldest one to make room for the new value
  • Store only if value changes: when enabled the Mobile SDK stores new value only if it is different from previous one