This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Retrieves a conversation by the specified visitor, contact, or member ID. If the conversation does not exist for the provided visitor, contact, or member, the function creates a new conversation.
function getOrCreateConversation(
participantId: ParticipantId,
): Promise<GetOrCreateConversationResponse>;
ID of the visitor, contact, or member chatting with the business.
import { conversations } from "@wix/inbox";
async function getOrCreateConversation(participantId) {
const response = await conversations.getOrCreateConversation(participantId);
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.