Browse SDKs · Flutter
Platform
SDKsFlutter

Receive custom business messages

Handle custom business signaling notifications with the OpenIM Flutter SDK.

Copy

Handle system-level or workflow-level custom business signaling notifications delivered by the server:

Code example

OpenIM.iMManager.setCustomBusinessListener(
  OnCustomBusinessListener(
    onRecvCustomBusinessMessage: (String businessData) {
      handleCustomBusinessMessage(businessData);
    },
  ),
);

Return value

The onRecvCustomBusinessMessage callback receives a raw business payload string (String), not a standard chat Message entity. Your application should parse the payload, validate the protocol schema and version, and deduplicate notifications using a business transaction ID or event ID.

State changes after the call

Registering OnCustomBusinessListener configures callback delivery for non-chat business signaling. To send structured custom cards inside direct or group chats, see Create a custom message. For centralized listener configuration and teardown, see Events overview.