Customer Identification

User Identification

This method allows you to assign the value of the customerId to later use values in the corresponding fields (email, phone number, name, etc).

Choose the channel used by your integration: Channel.PUSH for push or Channel.INAPP for In-App. The Indigitall.link() method also logs the user in with the supplied external ID.

Do not use Channel.NONE; the SDK rejects it as a disabled channel.

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

    override fun onError(errorModel: ErrorModel?) {
      // log error
    }
  }
)
Indigitall.link(context, "YOUR_EXTERNAL_ID", Channel.PUSH, new CustomerCallback(context) {
  @Override
  public void onSuccess(Customer customer) {
    // Customer linked to this device
  }

  @Override
  public void onError(ErrorModel errorModel) {
    // Handle the 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
  }
})
Indigitall.unlink(context, Channel.PUSH, new CustomerCallback(context) {
  @Override
  public void onSuccess(Customer customer) {
    // Customer unlinked from this device
  }

  @Override
  public void onError(ErrorModel errorModel) {
    // Handle the error
  }
});