If you want a customer journey to be executed after an action on your website, you can use the following method:
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
}
})
Inside the JSON, in the second parameter, you must send the necessary variables that the journey needs to send the campaigns.
For example:
Indigitall.sendCustomerCustomEvent(applicationContext,"my_event",
JSONObject()
.put("name","John")
.put("value","123")
) object: CustomerCallback(context) {
override fun onSuccess(customer: Customer) {
//do something
}
override fun onError(errorModel: ErrorModel?) {
//log error
}
})