Skip to main content
Track who your users are and what they do in your mobile app and Customize the Skara Chat Messenger. Here’s how to configure Skara Chat for Android:

Update your User

  • When you call a login method we create a user with his basic detail, after if you want to change his basic detail then you can use update user functionality as per below code snippet:
// Prepare a user's detail object
val userDetail = UserDetails.create()
val email = "user's email address"
val firstName = "user's first name"
val lastName = "user's last name"
val userId = "user's user id" // Unique id recommended

userDetail.withEmail(email)
    .withFirstName(firstName)
    .withLastName(lastName)

SkaraChatSDK.getInstance().update(userId, userDetail, object : UpdateListener {
    override fun onUpdate() {
        // Update successful
    }

    override fun onError(salesmateException: SalesmateException) {
        // Error on update
    }
})

Submit an Event

  • You can log events in Skara Chat that record what users do in your app and when they do it. For example, you could record the item a user ordered from your mobile app, and when they ordered it.
// Prepare a record event object
val data = hashMapOf<String, String>().apply {
    put("orderId", "order id")
    put("productId", "product id")
}

val eventName = "order_detail"

// Record custom event in Salesmate Chat SDK
SalesmateChatSDK.getInstance().recordEvent(eventName, data)

Create a Custom Launcher

  • However, if you’d like Messenger to open from another location in your mobile app, you can create a custom launcher. This allows you to specify a button, link, or element that opens Messenger. For example, you can trigger the launcher to open when a customer clicks on your ‘Ask for support’ button.
Custom Launcher
  • If you have a custom launcher, you can call:
// To launch messenger
SkaraChatSDK.getInstance().startMessenger()