=== Data Structure ==== All events generated in the platform are stored in a Business Intelligence and Analytics platform. This platform uses three different data structures to store all types of events, which allows the creation of aggregations that combine data from different campaigns and channels. The new Big Data and Analytics platform includes SMS, MMS, Push notifications, Email, Scratchcard, Geolocation, iBeacons, Geopush and Passbook data. In order to store the new event types additional data mappings are used, while maintaining the same field names in order to be able to execute cross channel aggregations. The data structures used to store this data are: == Campaign Triggers == ^ Field ^ Description ^ | message_id | The ID of the message | | carrier_id | The ID of the carrier (Internal. This can be an actual mobile carrier or an aggregator) | | operator_id | The actual operator ID (external, the real operator. This will be the actual carrier) | | carrier_name | The name of the carrier | | simulated | Internal value used to filter internally simulated messages | | origin | The mobile number that originated the interaction | | destination | The shortcode or longcode that received the interaction | | content | The content of the message | | campaign_name | Name of the campaign that received the interaction | | campaign_id | ID of the campaign that received the interaction | | utc_when | Date when the interaction was received in UTC time | | encoding | The encoding of the message | | workspace_id | The ID of the workspace that handled the interaction | | label | The label aggregation value as configured in the Campaign Manager | | client_date | Date when the interaction was received in the client's timezone | | client_name | Name of the client | | client_id | Internal client ID | == Campaign Responses == ^ Field ^ Description ^ | message_id | The ID of the message | | carrier_id | The ID of the carrier (Internal. This can be an actual mobile carrier or an aggregator) | | operator_id | The actual operator ID (external, the real operator. This will be the actual carrier) | | carrier_name | The name of the carrier | | muted | Internal value used to filter internally muted responses | | origin | The shortcode or longcode that sent the message | | destination | The mobile number that received the message | | content | The content of the message | | type | Channel used | | status | Delivery Receipt status | | campaign_name | Name of the campaign that sent the interaction | | campaign_id | ID of the campaign that sent the interaction | | utc_status | Date when of the last status change | | utc_when | Date when the interaction was received in UTC time | | encoding | The encoding of the message | | workspace_id | The ID of the workspace that handled the interaction | | client_date | Date when the interaction was received in the client's timezone | | client_name | Name of the client | | platform | Delivery channel | | client_id | Internal client ID | == Events == ^ Field ^ Description ^ | device_id | The ID of the device that generated the event. In SDK generated events (push notifications, geofences, iBeacons, etc) this is the Unique Device ID as provided by the Android or iOS platform. For events that are not generated by a native application running in the phone (scratchcards, redirect URLs, etc) this is the internal Messangi ID | | origin | The mobile number (or any other identification token) associated with the event, hashed with SHA-256 | | client_id | The internal Messangi Client ID. This field is used for aggregations where a master user has visibility over several sub clients | | client_name | Name of the client | | client_date | Date when the interaction was received in the client's timezone | | event_type | The type of event. Since all events are stored on the same data structure this field will show all the types of events across all applications and channels if no additional aggregations are added. | | app | The name of the application that generated the event. Different apps can generate the same event types which can provide interesting cross channel aggregations. For example, the OPEN event type can be generated by the SCRATCHCARD and MOBILE_SDK apps, representing the action of opening the scratchcard or the mobile app respectively. Without aggregations those two events will be displayed in the dashboard showing the location where users open your campaigns (both of them). Adding an app aggregation shows the OPEN event just for SCRATCHCARD or MOBILE_SDK | | platform | The platform on which the event was generated. If the event was generated by the Mobile SDK the platform is either Android or iOS. If the event was generated by a web interaction (Scratchcard, Passbook, Redirect URL, etc) the platform will be the user-agent | | address | The IP address from which the event was captured. If the X-Forwarded-For HTTP header is present then it is used instead | | country | The country code corresponding to the location of the event. Several methods are used to determine this value: if the event was generated by the Mobile SDK and the GPS is enabled and authorized then the country code is obtained from the [latitude, longitude] combination. If the GPS is not available (it is disabled, or the event was generated by a web browser in the case of Scratchcards or redirect URLs) the country code is obtained from the GeoIP location of the IP address | | extra_info | Any additional information relevant to the event. For push notifications this is the subject, for scratchcards it's the campaign name, etc | | campaign_name | Name of the campaign that sent the interaction | | version | The version of the app that generated the event. | | utc_when | The date when the event was generated. | | location | The location of the event. This location is obtained from the phone GPS in the case of Mobile SDK events, or the IP address for HTTP based events (Scratchcard, Passbook, Redirect URLs, etc) | === Legacy Data Structure === This is only documented here for backward compatibility reasons. These data types are no longer used by the Business Intelligence platform. == Events == ^ Field ^ Description ^ | deviceid | The ID of the device that generated the event. In SDK generated events (push notifications, geofences, iBeacons, etc) this is the Unique Device ID as provided by the Android or iOS platform. For events that are not generated by a native application running in the phone (scratchcards, redirect URLs, etc) this is the internal Messangi ID | | mobile | The mobile number associated with the event, hashed with SHA-256 | | client | The internal Messangi Client ID. This field is used for aggregations where a master user has visibility over several sub clients | | eventtype | The type of event. Since all events are stored on the same data structure this field will show all the types of events across all applications and channels if no additional aggregations are added. | | app | The name of the application that generated the event. Different apps can generate the same event types which can provide interesting cross channel aggregations. For example, the OPEN event type can be generated by the SCRATCHCARD and MOBILE_SDK apps, representing the action of opening the scratchcard or the mobile app respectively. Without aggregations those two events will be displayed in the dashboard showing the location where users open your campaigns (both of them). Adding an app aggregation shows the OPEN event just for SCRATCHCARD or MOBILE_SDK | | platform | The platform on which the event was generated. If the event was generated by the Mobile SDK the platform is either Android or iOS. If the event was generated by a web interaction (Scratchcard, Passbook, Redirect URL, etc) the platform will be the user-agent | | address | The IP address from which the event was captured. If the X-Forwarded-For HTTP header is present then it is used instead | | countrycode | The country code corresponding to the location of the event. Several methods are used to determine this value: if the event was generated by the Mobile SDK and the GPS is enabled and authorized then the country code is obtained from the [latitude, longitude] combination. If the GPS is not available (it is disabled, or the event was generated by a web browser in the case of Scratchcards or redirect URLs) the country code is obtained from the GeoIP location of the IP address | | extrainfo | Any additional information relevant to the event. For push notifications this is the subject, for scratchcards it's the campaign name, etc | | parsedextrainfo | The tokenized extra info | | version | The version of the app that generated the event. | | when | The date when the event was generated. | | location | The location of the event. This location is obtained from the phone GPS in the case of Mobile SDK events, or the IP address for HTTP based events (Scratchcard, Passbook, Redirect URLs, etc)|