Configuration

You can initialize the Kustomer SDK with your API key and options.

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);

Options

OptionTypeDefaultiOSAndroidDescription
enableUIbooleantrue❌❌Enables the Kustomer UI. Changing the default value is not yet supported.
showInAppNotificationsbooleanfalse✅✅Show in-app notifications for new messages.
languagebooleandevice✅✅The language to show volume control, automated messages, snippets, and KB for.
activeAssistantstringundefined✅✅If supplied, always uses this chat assistant ID when pressing new conversation button in the UI.
hideNewConversationButtonbooleanfalse✅✅Never show the "New Conversation" button.
hostDomainstringundefined✅✅Override the API host domain.
businessScheduleIdstringundefined✅✅The business schedule ID you want the app to use.
brandIdstringundefined✅✅The brand ID for the brand settings you'd like to present.
logLevelinfo, error, debug, warning, allKustomerLogType.all✅✅The highest KustomerLogType you want to have printed to the console.
hideKbArticleSharebooleanfalse✅✅Don't show the Knowledge Base Article Share button.
hideHistoryNavigationbooleanfalse✅✅Hides back button on conversation detail screen leading to chat history screen.
iosAnimate5Starbooleanfalse✅❌Show animation when customer selects the highest CSAT rating.
disablePushbooleanfalse✅❌See details and context in iOS Push Notifications guide.
pushBundleIdstringapp.bundleIdentifier✅❌The bundle ID for your app, if you need to override the default from your Bundle.
pushEnvironment"production", "development"production✅❌The PubNub push environment for your app.

Configuration errors

If for any reason the SDK fails to initialize, you will receive an error as a
Promise rejection.

KustomerChat.configure(KUSTOMER_API_KEY, kustomerOptions)
  .then(() => {
    // SDK initialized successfully
  })
  .catch((error) => {
    // SDK failed to initialize
    console.error(error); // should contain information about the error
  });

Did this page help you?