I have created an app that has a support/chat feature. A user can login to the app and request for help using the chat page. When they send a message, my back-end webapi creates a ticket and a message linked to that ticket. An admin already setup is allocated to provide assistance. For now, if the admin also has the app open and on the chat page, they can see the new ticket, can click on it and respond. If both users have their apps open and on the chat detail page then they can see what the other has typed.
However, I would like to integrate a feature like whatsapp where I can notify the admin when a user sends a new message without the admin having his app open and on the chats page. I’ve been looking at the Phonegap push plugin but I cannot really understand how I can use it to achieve what I am trying to do. Most tutorials I’ve come across are using Firebase to send a notification to the user, but how does a message/notification move from my database where it is stored to firebase?
Please bare with me if I am completely lost and if possible please point me into the right directions. I’ve attached some pics of my app as is.