Skip to main content
1-Visitor
February 4, 2020
Question

Live chat websocket

  • February 4, 2020
  • 1 reply
  • 2351 views

Hi everyone, currently I have created a custom chat widget. In order to do a live chat, I would require to open a socket connection in the service itself and have my custom widget involve this service. So my question is, is it possible to do web socket connection with javascript in the service itself? How should I approach this? 

 

Thanks!

1 reply

16-Pearl
April 22, 2020

Hello enze,

 

I wanted to follow up on this topic to determine if you were able to move forward with your Live Chart idea. If so how did you accomplish this? This is an interesting concept which I'm sure other customers would find useful.

enze1-VisitorAuthor
1-Visitor
April 23, 2020
Spoiler
 

Hey there! Yes I was able to move on with the idea. So Thingworx chat would be the client side itself. I had to create a custom widget with the help of https://github.com/ptc-iot-sharing/ThingworxDemoWebpackWidget. By using this, I was able to create a custom widget and use socket.io JS library for it. 

So in short, thingworx widget is used as a client. I then create my own chat server using MEAN stack (not completed, only did the backend of it) and tested on my localhost with the thingworx server. Was able to communicate! 

16-Pearl
April 23, 2020

Hello enze,

 

Thank you very much for taking the time to explain how this was ultimately accomplished.