Skip to content

GCM Receiving Wilma Push Messages

Developer From Jokela edited this page Aug 14, 2020 · 1 revision

Wilma will send Push messages via FCM if:

  • New message arrives
  • (sometimes gets sent, not every time. Rarely gets sent) New lesson note was set

Wilma will send Push messages with this Sender ID: 566894382348

Push message data (message notification):

{
   "id":5678,
   "url":"https://<your_wilma_server>",
   "m_id":1627800,
   "type":2,
   "title":"Uusi viesti",
   "message":"Sait juuri viestin Wilmassa. Viestin lähetti <SENDER>."
}

NOTE: Push message doesn't arrive as JSON, I've made it into json for you to understand the structure better.

What do these mean:

  • id: User ID, who is receiving this Push Message
  • url: Wilma Server URL
  • m_id: Message ID
  • title: Wilma Push message title (can be ignored)
  • message: Wilma Push message title (can be ignored)

You may ask, "isn't there message's content?" No, I've contacted Visma about this, they confirm that it doesn't exist.

They said that they'll do that "soon" (it's over a year since) Only way is to fetch the content. That makes message's status to "read". Keep in mind if you'd do content fetching.

Visma doesn't let you to set message as "unread", after it's been read, because that breaks "message tracking" feature. (Teachers can see who read the message, and who deleted it via tracking system of Wilma messages)

Push message data (attendance notification):

{
   "id":5678,
   "url":"https://<your_wilma_server>",
   "o_id":1627800,
   "type":2,
   "title":"Selvitettävä tuntimerkintä",
   "message":"Sait juuri tuntimerkinnän Wilmassa."
}

NOTE: Push message doesn't arrive as JSON, I've made it into json for you to understand the structure better.

What do these mean:

  • id: User ID, who is receiving this Push Message
  • url: Wilma Server URL
  • o_id: Attendance ID
  • title: Wilma Push message title (can be ignored)
  • message: Wilma Push message title (can be ignored)