Managing push notifications

EnergyAI dispatches a PUSH notification in a JSON-encoded message and publishes it to SNS in order for the App to retrieve it.

Next state

The field named external_installation_id is present in this message, which will contain the external identifier of the installation. Apart from this and taking into consideration that some notifications support additional attributes, all applicable notification attributes (including the external_installation_id) are provided as a new field in the formatted message.

The value in this solution is that the App will be able to receive Push notifications & gain access to all applicable notification attributes. This will be supported across all App Platforms (Android, iOS). The format of this message is the below:

{
"GCM": {
    "data": {
      "msg_code": "value",
      "msg_identifier": "value",
  "attribute_1_name": “value”,
  "attribute_2_name": “value”,
   ... (any number of attributes including external_installation_id) ...
  "attribute_n_name": “value”
    }
},
"APNS": {
    "aps": {
      "alert": {
        "title-loc-key": "value",
        "loc-key": "value"
      },
      "msg_code": "value",
      "msg_identifier": "value",
  "attribute_1_name": “value”,
  "attribute_2_name": “value”,
   ... (any number of attributes including external_installation_id) ...
  "attribute_n_name": “value”
    }
},
"APNS_SANDBOX": {
    "aps": {
      "alert": {
        "title-loc-key": "value",
        "loc-key": "value"
      },
      "msg_code": "value",
      "msg_identifier": "value",
  "attribute_1_name": “value”,
  "attribute_2_name": “value”,
   ... (any number of attributes including external_installation_id) ...
  "attribute_n_name": “value”
    }
}
}