customer-android-kotlin

core

Build Your Own UI with the Kustomer Core SDK

Kustomer Core SDK exposes APIs in the form of provider interfaces, which can be used to create your own UI

Before you begin, make sure you’ve

Below steps describe how to use the Kustomer Core SDK.

1. Initialize KustomerCore from your Application class

Create a KustomerCoreOptions object using KustomerCoreOptions.Builder to override any settings with in the sdk

If you don’t want to override any settings and use the default ones, you can skip creating this object

val kustomerCoreOptions = KustomerCoreOptions.Builder()
                .setBusinessScheduleId("<business_schedule_id>") //override business schedule
                .setLogLevel(KusLogOptions.KusLogOptionAll) //set log options
                .build()

Add the following lines of code to your onCreate method in your Application class:

KustomerCore.init(
                application,
                "API_KEY", // read it from gradle properties
                kustomerCoreOptions //Optional parameter
            )

Note: If you don’t have an Application class, you must create one to make sure Kustomer Core is always initialized properly.

2. Implement KusChatListener to receive Chat events

All events received by KusChatListener contains a KusConversation.id parameter for which the event belongs to. If you want to show events for a single currently active session only, make sure to store its KusConversation.id in memory in your application. Using the KusConversation.id parameter received in the event, you can then choose to show or ignore event updates to user

Events supported by KusChatListener are -

Refer Chat Listener Documentation for detailed information

3. Register listeners and perform actions using Providers

Provider classes enables interaction with Kustomer Services.

Note: Before you begin, make sure you have initialized KustomerCore class with a valid API key

Kustomer API Providers -

KusChatProvider :

KusPushRegistrationProvider :

KusKbProvider :

All API providers return a response wrapped as KusResult APIs with network or heavy processing operations are currently marked with suspend modifier, and can be called from Coroutines KusCallback response support will be added in the future for these suspend functions

Refer API Provider Documentation for further implementation reference.

Packages

Name Summary
com.kustomer.core .
com.kustomer.core.exception This package contains all Custom Exceptions for Kustomer
com.kustomer.core.listeners This package contains all listener classes for Kustomer
com.kustomer.core.models This package contains all Common model classes for Kustomer
com.kustomer.core.models.chat This package contains all Chat model classes for Kustomer
com.kustomer.core.models.kb This package contains all Knowledge base model classes for Kustomer
com.kustomer.core.providers This package contains all Provider classes for Kustomer
com.kustomer.core.utils.helpers  
com.kustomer.core.utils.log  

Index

All Types