How to use the new Chat API

Hi,
I’m excited to see the new chat API. I see it’s possible to send messages via Corvid.
But how do channels get created? Is it possible to create a new channel via Corvid? Is it possible to read and display messages outside of the chat box?

https://www.wix.com/corvid/reference/$w.Chatbox.html

The Wix Chat application lets you communicate with site visitors via a chatbox. The chatbox sends messages over a chat channel, which connects 2 or more chat participants.
https://support.wix.com/en/article/about-wix-chat

You won’t be able to create your own channel through Wix Corvid as it is still a Wix app and will only create the new channels through the app itself.

Hi Plon,

If its business chat its created automatically following the first message that will be send from the visito.
For Social chat we still don’t have the ability to create a chat room (Channel) but if there is one that already exists you can focus and enter it. (As well you can see all existing channel …)
Is this helping you?

10x, Erez

Thanks Erez.

Are there plans in the future to make it fully open with Corvid and we will be able to create own channels etc, or for the social side of it, will we always have to do it through the app itself.

It would be good if it was able to be more open to code so that we could possibly look at making something like David has done on this previous post and have it incorporated into the page itself and not always through the Wix Chat app.
https://www.wix.com/corvid/forum/community-discussion/user-chat-messenger

Finally, would there be a basic example made up for the Corvid examples page, like there was for the custom Wix Blog etc?

Hi Whisky man,

Actually with the current release you can create your own chat room with business (You have the client send message and the onMessage … event).
In the coming future you will able as well to create private chat as well (member to member) and this should cover your request.
and eventually we will like to introduce the full group chat integration but this is not planed yet.

So I don’t know what type of chat you will like to create but you should have some of the needed solutions.

About Example its great idea I will try to create some and to publish to the Corvid example page,

10x, Erez

Thank you for the release Erez. I think the ability to create a channel between users will be immensely helpful as we will not need to create custom chat systems.

Questions:

Right now I see that you can source a site member’s ‘id’ (either using wix users api or a backend query of the private members collection) which is actually the ‘participantId’ in the chat but what about non-site members. How do we source their ‘participantId’ because the Wix User API returns a very long string of the ID.

Regarding ‘chatroomId’ & ‘channelId’. Both appear to be the same. What is the difference? In which scenario should we use one above the other?

What about the chat log retention? Is the database for each chatroom flushed after a while?

Hi Shan,

  1. About channel creation we are aligned and its in the pipeline but don’t have a due yet,
  2. About the None site member I assuming you are looking for chatting between visitor and the business. For that you can do by sending message from the client to the Business type. This will create automatically the channel and the participantId. Try it and let me know if you need more info …
  3. About the Channel vs Chatroom, we change all our terminology to channel this is why it documented this way. We still have some left overs of chatroom that will be deprecated soon (So please don’t use it)
  4. We are never retention and chat discussions. So its there but currently we don’t have an API that exposed it out (Assuming you are looking for this as well :slight_smile:

Ciao, Erez