Open the Chat UI
Learn how to open the Kustomer Chat.
Open the Kustomer Chat UI to let the customer view their chat history, start a new chat, and browse the Knowledge Base. You can also configure the Chat Widget Experience from the Kustomer Chat Management: Design settings.
We've included examples of different ways to open and show the chat widget to the customer.
Open to the Kustomer UI
Open the Kustomer Chat UI to let the customer view their chat history, start a new chat, and browse the Knowledge Base.
Generic:
import KustomerChat from '@kustomer/chat-react-native';
KustomerChat.show();
You can also pass a preferred view to open to:
import KustomerChat, { KustomerDisplayMode } from '@kustomer/chat-react-native';
const displayMode: KustomerDisplayMode = KustomerDisplayMode.default;
KustomerChat.show(displayMode);
Where displayMode
is one of:
Value | Description |
---|---|
default | Shows the default chat experience selected under Channels > Chat > Design > Chat Widget Experience. |
chatHistory | Show chat history. If KB is enabled under Channels > Chat > Design > Chat Widget Experience, the KB tab will be visible. |
newChat | [❗️iOS] Shows a new chat. If KB is enabled under Channels > Chat > Design > Chat Widget Experience, the KB tab will be visible. |
activeChat | [❗️iOS] Show the most recent active chat. If KB is enabled under Channels > Chat > Design > Chat Widget Experience, the KB tab will be visible. |
knowledgeBaseHome | Show the knowledge base home screen. If live chat is enabled under Channels > Chat > Design > Chat Widget Experience, the chat tab will be visible. |
knowledgeBase | Show the knowledge base. Same as knowledgeBaseHome , except on iOS it should take the user to the last viewed article. |
onlyChat | Show live chat. Always hides the Knowledge Base tab. |
onlyKnowledgeBase | Show the knowledge base. Always hides the Chat tab. |
Updated almost 2 years ago