Integration

User Identification

First you have to link the account with a channel (inApp, push or chat) to obtain a customerId.

Indigitall.link(
  context,
  field,
  channel,
  object : CustomerCallback(context) {
    override fun onSuccess(customer: Customer) {
      //do something
    }

    override fun onError(errorModel: ErrorModel?) {
      // log error
    }
  }

On the other hand, if you want to unlink the Customer's account, you have to do the following:

Indigitall.unlink(context, Channel.PUSH, object: CustomerCallback(context){
  override fun onSuccess(customer: Customer) {
   	//do something 
  }

  override fun onError(errorModel: ErrorModel?) {
    //log error
  }
})