[In-App Chat Web] How to get the message in real time

[In-App Chat Web] How to get the message in real time

  
Forge Component
(4)
Published on 2017-11-23 by Labs
4 votes
Published on 2017-11-23 by Labs

Hello,


I implemented the chat application using "In-App Chat Web", but the chat message is not displayed unless I reload web page.


Can I get the chat message in real time without reloading?


Best regard,

Toshiya Kirihata

Hi Toshiya,

sounds like you didn't use an ajax refresh in your notification action on your page.
Did you see following documentation: https://success.outsystems.com/Documentation/SILK_UI_Framework/In-App_Notifications_Web_Component ?

I hope this will help you.

Regards
Jimmy

Toshiya Kirihata wrote:

Hello,


I implemented the chat application using "In-App Chat Web", but the chat message is not displayed unless I reload web page.


Can I get the chat message in real time without reloading?



Best regard,

Toshiya Kirihata


Hi Toshiya, try this link: https://success.outsystems.com/Documentation/SILK_UI_Framework/In-App_Chat_Web_Component


You will see how to configure real-time messaging using Firebase :)

Let me know if you have further questions!


Thanks,

Marina


Jimmy Vankerkhove wrote:

Hi Toshiya,

sounds like you didn't use an ajax refresh in your notification action on your page.
Did you see following documentation: https://success.outsystems.com/Documentation/SILK_UI_Framework/In-App_Notifications_Web_Component ?

I hope this will help you.

Regards
Jimmy


Hello Jimmy,

Thank you for your reply.


I don't try it.

If I use notification action, can I get the message in real time?


Best regards

Toshiya

Marina Calado wrote:

Toshiya Kirihata wrote:

Hello,


I implemented the chat application using "In-App Chat Web", but the chat message is not displayed unless I reload web page.


Can I get the chat message in real time without reloading?



Best regard,

Toshiya Kirihata


Hi Toshiya, try this link: https://success.outsystems.com/Documentation/SILK_UI_Framework/In-App_Chat_Web_Component


You will see how to configure real-time messaging using Firebase :)

Let me know if you have further questions!


Thanks,

Marina



Hello Marina,

Thank you for your reply.


I have already seen this page and I used Firebase but I could not get the message in real time.

If I refresh the page, I get the message in real time.


Do I have to use notification action?


Best regards,

Toshiya

Hello Toshiya,

Actually in this component there is no Notification Action. Jimmy's answer is correct, but its about the component In-App Notifications Web, and you are using the In-App Chat Web.


With the In-App Chat Web component, you don't need to perform Ajax refreshs or even call a notify action: the InAppChat block takes care of all that for you.

If you are struggling with getting the messages in real time, the problem must be around the Firebase configurations.

In your previous answer to Marina , you said you already used Firebase. Since you are not getting the messages in real time, there may be happening a couple of problems:

  • You may not be using the correct firebase information
  • You may not be generating the firebase token in the correct place.

This can happen sometimes, but worry not. I'm here to help you :)


When you installed the component in your factory, the installed application contains a module called "InAppChatWebSample". This sample showcases the correct use of the component, and you can actually configure your firebase credentials in that module and test it.


To make sure you can debug your app and get the real time functionallity up and running, I'm going to put here a set of steps explaining where the problem may be. These steps can also be found in the documentation

  • Make sure that you are getting the correct Firebase ProjectID and Secret (check this documentation)


  • ProjectID and Secret should be stored in Site Properties, so that you can changed them via ServiceCenter:


  • Make sure you created the action GetFirebaseData, and that you are using it inside the preparation of your screen. This action will use your firebase secret to generate a token, and that token will then be used in the actual InAppChat block:


  • Finally, make sure you selected the correct values in the actual InAppChat block:


And that's it. I'm sorry for the long post, and I hope this will help you solve your issue.

Please let us know if it worked or if you still need more assistance.

Best Regards,

Samuel Jesus

Hello Samuel

Thank you for your polite explanation.

I think I set some information correctly.


If I set the value to FirebaseProjectId and FirebaseSecret in InAppChatWebSample, can I get the message in real time?


I set the value above.


Best regards,

Toshiya


EDITED: REMOVED ATTACHMENT AND BLURRED IMAGES FOR SECURITY REASONS

Solution

Hello Toshiya,

Your previous post contained your firebase secret, which you should never share. I edited your post to remove your attachment and blur the images.

Best Regards,

Samuel Jesus


Solution

I have the same problem here. My credentials in service center are good like my firebase account.

So any help?

Hello Filipe,


Toshiya's situation as happening because of a firewall configuration, that was preventing the system to communicate properly. 

Do you have the same situation? If not, can you provide some more details of your case?


Cheers,

Samuel Jesus

No i have not firewall blocking. The only thing i can say is that i get the same issue in the sampledemo

As I mentioned previously in this topic, the two most common issues are related with firebase configurations:

  • You may not be using the correct firebase information
  • You may not be generating the firebase token in the correct place.

However, the sample, with the correct firebase credentials, is a working example of the component.

Have you set the sample demo site properties with your firebase configurations?


Cheers

Hello Samuel,


Hello Samuel,

With these firebase configurations, Is there any firebase cost or user limitation, like number off users, number off conversations?


cheers

Hello Samuel,

With these firebase configurations, Is there any firebase cost or user limitation, like number of users,number of conversations?


cheers