Quick start: Chat React Native SDK
Install
See Installation.
Initialize
import KustomerChat from '@kustomer/chat-react-native';
import type { KustomerOptions } from '@kustomer/chat-react-native';
const KUSTOMER_API_KEY = process.env.KUSTOMER_API_KEY; // Your Kustomer API key
const kustomerOptions: KustomerOptions = {
// options for the Kustomer SDK
};
KustomerChat.configure(KUSTOMER_API_KEY, kustomerOptions);
KustomerOptions
parameter options
KustomerOptions
parameter optionsOption | Default | iOS | Android | Description |
---|---|---|---|---|
enableUI | true | ❌ | ❌ | Enables the Kustomer UI. Changing the default value is not yet supported. |
showInAppNotifications | false | ✅ | ✅ | Show in-app notifications for new messages. |
language | device | ✅ | ✅ | The language to show volume control, automated messages, snippets, and KB for. |
activeAssistant | undefined | ✅ | ✅ | If supplied, always uses this chat assistant ID when pressing new conversation button in the UI. |
hideNewConversationButton | false | ✅ | ✅ | Never show the "New Conversation" button. |
hostDomain | undefined | ✅ | ✅ | Override the API host domain. |
businessScheduleId | undefined | ✅ | ✅ | The business schedule ID you want the app to use. |
brandId | undefined | ✅ | ✅ | The brand ID for the brand settings you'd like to present. |
logLevel | KustomerLogType.all | ✅ | ✅ | The highest KustomerLogType you want to have printed to the console. One of info, error, debug, warning, all . |
hideKbArticleShare | false | ✅ | ✅ | Don't show the Knowledge Base Article Share button. |
hideHistoryNavigation | false | ✅ | ✅ | Hides back button on conversation detail screen leading to chat history screen. |
iosAnimate5Star | false | ✅ | ❌ | Show animation when customer selects the highest CSAT rating. |
disablePush | false | ✅ | ❌ | See details and context in iOS Push Notifications guide. |
pushBundleId | app.bundleIdentifier | ✅ | ❌ | The bundle ID for your app, if you need to override the default from your Bundle. |
pushEnvironment | production | ✅ | ❌ | The PubNub push environment for your app. |
Updated almost 2 years ago