Upgrading your communication infrastructure to CometChat is a strategic move that aligns with the natural progression of your product's journey. As user expectations evolve and technological advancements emerge, elevating your chat capabilities becomes an inevitable and crucial step. A critical component of the upgrade is the migration of data from your current homegrown set-up or a different communication infra provider.
Recognizing the complexities of migrating historical data, CometChat has engineered a robust and straightforward process tailored for enterprises. We acknowledge the critical nature of maintaining uninterrupted service, data integrity, and a superior user experience throughout the migration period.
Our structured migration framework is designed to minimize resource expenditure, avoid the costs associated with parallel operations of multiple chat providers, and ensure a rapid yet precise transition.
Pre-Requisites
Before initiating the migration, establish your CometChat account and configure your application environment. The migration leverages CometChat's REST API, requiring your unique CometChat app ID and REST API key, both retrievable from the CometChat dashboard post-setup.
CometChat’s White-Gloved Migration Service
CometChat extends a Managed Migration Service designed to streamline your data transfer with expert oversight. Our dedicated team stands ready to guide you through each phase, ensuring a transfer without data loss and minimal system downtime. Please reach out to your account manager to avail this service as part of your implementation.
If you have a dedicated team to handle this at your end, please read on to understand how you can achieve a seamless migration to CometChat.
Migrating to CometChat
Migrating to CometChat involves two distinct approaches based on your business needs. The first is a historical migration, where you bring over your complete dataset — users, messages, and groups — to start anew with CometChat's robust chat module. The second, a more complex yet common scenario, is a real-time migration. This applies when you have older versions of your Android and iOS apps still in use while you're rolling out new versions equipped with CometChat. Here, the goal is to ensure a cohesive communication experience across all app versions.
Real-time Data Migration

To implement this, the transition involves
Webhook Configuration: Set up a webhook on your existing chat service that forwards all incoming messages to an endpoint provided by CometChat.
API Provisioning: Grant CometChat access to an API that allows messages to be transmitted back to your existing chat platform.
With these mechanisms in place, messages sent through CometChat are instantaneously propagated to your legacy chat service, and vice versa. This ensures uninterrupted communication between users irrespective of the app version they are using, thus maintaining engagement and user satisfaction throughout the migration period.
Implementing a real-time data migration strategy with CometChat not only bridges the gap between different app versions but also lays the foundation for a smooth, full transition to CometChat's advanced communication infrastructure.
Historical data migration

For all three entities, the base URL for the import APIs is
https://<appId>.api-<region>.cometchat.io/v3/data_import/
Both the HTTP request data and the response data follow the JSON format, providing a standardized and easy-to-use structure for your migration needs.
Import users
To seamlessly integrate your user base into CometChat, initiate a bulk import with our User Import API. Prepare POST requests that include arrays of individual user records, with each record keyed to the user's unique identifier (uid). This design supports high-volume migrations by allowing multiple requests to efficiently segment your user data.
Upon submission, the API response will detail the status of each import operation under data.<uid>.success, with a boolean value indicating the outcome. A true value confirms a successful import, whereas a false implies a failure, with the specific reason provided in data.<uid>.error.
In the event of an error, rectify the user record according to the provided error details and reissue the POST request for the affected users only. There’s no need to resend data for users that have been successfully imported.
Here is an example of a user import request format in JSON:
Import messages
Our robust Message Import API supports the migration of your historical messages while preserving timestamps, sender and receiver details, and message content types. Format your requests to contain arrays of message records, each identified by a unique message ID (muid). The array structure enables effective processing of large volumes of messages in segmented batches.
The response will specify the import status for each message analogous to the user import process, with true indicating success and false pointing to a failure. The error field will provide insights into any corrective actions needed.
Here is an example of a message import response format in JSON:
Import groups
Establish your group chats on CometChat with the Group Import API, designed to replicate existing group structures, including members and their roles. Each group object should include a guid, name, type, and other group-specific details. As with users and messages, use the API's detailed responses to ensure accuracy.
Following the API call, the response will deliver the import results for each group, allowing you to monitor and rectify any discrepancies before they impact your users.
Here is an example of a groups import request format in JSON:
Rate limits
Recognizing the importance of system stability and performance during migration, CometChat's import APIs are governed by rate limits designed to optimize the data transfer process. The current limits are set as follows:
60 API calls per minute for each endpoint.
Batch size of 50 records per API call.
It's critical to design your migration process around these rate limits to avoid throttling and ensure a smooth data transfer experience. If necessary, implement a backoff strategy to manage API calls dynamically, based on the API responses.
Estimated migration times

We are excited to get you onboard with CometChat and be an enabler in your scale journey. Please reach out to your account manager or help@cometchat.com for any assistance during your migration process.

Shrimithran
Director of Inbound Marketing , CometChat