Group chats

Group chats are very useful to develop website user messaging, group chats for multiple users, dynamic comment section, or other features.
Group chat functionality is available and when you use Chatix widget, and when you use SDK, but in both ways, you have to develop UI for group chats, because we provide API only.

Group chats FAQ

Who can join group chat?
Group chat can connect multiple visitors and multiple consultants without amount restrictions.
What messages could be sent to a group chat?
As well, as in conversations with consultants, you can send text, files, and images. Consultants can send whisp, that will be sent to other consultants only.
How does a group chat can be created/modified/deleted?
There are two ways how to manage group chats:

  1. Manually, using the Chatix dashboard. Open dashboard, expand the group chat section in the left panel, do the required action.
  2. Programmatically, using Chatix REST API. You can read more about the Chatix REST API on a special page.
Can I restore group chat after deleting?
Yes, you can do it using API. It can not be done using the dashboard.
What is the difference between private and public group chats?
  1. Visitor cannon connect to private chat on his own.
  2. The visitor does not receive private chats he is not part of in response for getting chatrooms request.
  3. Visitor can be joined the private chat using API call only.
These restrictions are related to visitors only. Consultants can join any group chat at any time.

Group chat development recommendations

When you have multiple group chats on your site (e.g. separated comment blocks for different posts), you have to save chatroom ID on your side.
You have to take care of the visitor traffic usage and disconnect visitor from outdated or irrelevant chatrooms. If you will ignore this, and join your visitors to chatrooms without disconnecting, your visitors may spend a lot of traffic to handle old irrelevant messages.

Group chat API

Get an access to SDK object
You have to get access to the SDK object to develop your UI for group chat. You can get the SDK object in 2 ways, depends on your Chatix integration method.
// If you use Chatix widget, you can get SDK object using "core" property of the global object "chatixWidget".
let chatixSDK = chatixWidget.core;

// If you use SDK, you already created SDK object calling the constructor.
import ChatixCore from 'chatix-core';
let chatixSDK = new ChatixCore(websiteId);
Get list of available chatrooms
Visitor can get a list of website chatrooms (public and private that he is a part of). Visitor cannot create chats, this option is available for consultants or via API.
/** Metod "getChatrooms" returns data as page-separated list. 
  * pageId (int) Current page number. Default - 1
  * perPage (int) Number of items per page. Default - 10
  * Returns Promise with data about request and list of chatrooms