ClickCease
Chat subchannels

Create and manage topic-specific subchannels

Italo Orihuela
Engineer
Android
iOS
Web
Oct 31, 2023

This tutorial will delve into the concept of subchannels, a feature that allows users to create separate threads within a main channel. We will guide you through the process of creating and updating subchannels, focusing on the <span id="greylight" class="greylight">Conversation</span> and <span id="greylight" class="greylight">Community</span> channel types.

You'll learn how to use unique identifiers to link subchannels to their parent channels, and how to label them for easy identification. We'll also discuss the limitations and provide code snippets for iOS, Android, and TypeScript. By the end of this post, you'll be well-equipped to enhance your group chats with topic-specific subchannels.

Pre-requisites

Before we dive into the tutorial, ensure that you have the following:

  1. Basic knowledge of programming and understanding of iOS, Android, or TypeScript.
  2. Access to the Social SDK.
  3. A <span id="greylight" class="greylight">Conversation</span> or <span id="greylight" class="greylight">Community</span> channel where you can create subchannels.
  4. An Social+ Portal account
  5. An Social+ Console Account
  6. A UI or access to the Social+ Chat UI Kit

Note: If you haven’t already registered for an Social+ account, we recommend following our comprehensive step-by-step guide in the Social+ Portal to create your new network.

Step 1: Understanding Subchannels

Subchannels are separate threads within a main channel. They allow users to discuss specific topics within the broader context of the main channel. For instance, in a <span id="greylight" class="greylight">Community</span> channel for a book club, you could create subchannels for different books or genres.

Use Cases for Subchannels

  1. Public Group Chat: In a public group chat for a music festival, subchannels can be created for each performing artist. This allows fans to discuss and share information specific to each artist, without cluttering the main chat.
  2. Private Group Chat: In a private group chat for a project team, subchannels can be created for different aspects of the project such as design, development, marketing, etc. This helps in keeping the discussions organized and relevant.
  3. Conversation: In a one-on-one conversation between a customer support representative and a customer, subchannels can be used to discuss different issues. For example, a subchannel can be created for billing issues, another for technical issues, and so on.

Step 2: Creating a Subchannel

Creating a subchannel requires two parameters: <span id="greylight" class="greylight">channelId</span> and <span id="greylight" class="greylight">displayName</span>. The <span id="greylight" class="greylight">channelId</span> is the unique identifier of the parent channel where the subchannel will be created. The <span id="greylight" class="greylight">displayName</span> is the public name or label of the subchannel that will be visible to users.

Here are code snippets for creating a subchannel in iOS, Android, and TypeScript:

iOS:

Android:

TypeScript:

Step 3: Updating a Subchannel

Updating a subchannel’s properties requires two parameters: <span id="greylight" class="greylight">subchannelId</span> and <span id="greylight" class="greylight">displayName</span>. The <span id="greylight" class="greylight">subchannelId</span> is the unique identifier of the subchannel that you'd like to update. The <span id="greylight" class="greylight">displayName</span> is the updated public name or label of the subchannel that will be visible to users.

Here are code snippets for updating a subchannel in iOS, Android, and TypeScript:

iOS:

Android:

TypeScript:

Step 4: Deleting a Subchannel

Deleting a subchannel requires the <span id="greylight" class="greylight">subchannelId</span> parameter, which specifies the ID of the subchannel that you'd like to delete. You can perform a soft delete, which marks the subchannel as deleted but keeps its data in the system, or a hard delete, which immediately and permanently deletes the subchannel and all its data from the system.

Here are code snippets for deleting a subchannel in iOS, Android, and TypeScript:

iOS:

Android:

TypeScript:

Final Thoughts

Subchannels are a powerful tool for organizing group chats into topic-specific threads. They enhance the user experience by providing a structured environment for discussions. With the ability to create, update, and delete subchannels, you can tailor your group chats to meet the specific needs of your users. Remember, practice makes perfect. So, don’t hesitate to experiment with creating and managing subchannels!

This is some text inside of a div block.
This is some text inside of a div block.