Customization

To add or update customer fields on JSON object, please do the following:

Indigitall.assignOrUpdateValueToCustomerFields(context, JSONObject("YOUR FIELDS"), object: CustomerCallback(context){
  override fun onSuccess(customer: Customer) {
    //do something
  }

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

Otherwise, if you want to eliminate a field, you have to do this with an arrayList of the fieldNames:

Indigitall.deleteValuesFromCustomerFields(context, arrayListOf(customerFieldKey), object: CustomerCallback(context) {
  override fun onSuccess(customer: Customer) {
    //do something
  }

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

To send a custom data to a Customer Journey event, you have to do this with with the event code and customData:

Indigitall.sendCustomerCustomEvent(applicationContext,"eventCode",JSONObject().put("dataKey","dataValue") object: CustomerCallback(context) {
  override fun onSuccess(customer: Customer) {
    //do something
  }

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