The CustomerJourney lets you pass through additional data for each RequiredAction.
- Create a CustomerJourneyEventListener.
- Override the onEnterpriseRequest(). `
- Add an AdditionalDataEntry using onEnterpriseRequest() that provides the EnterpriseRequestModifier.
The current required action is also provided so the information sent can be tailored to each step.
Kotlin
private val customerJourneyEventListener = object : CustomerJourneyEventListener {
override fun onJourneyCompleted(responseJourney: ResponseJourney) {
}
override fun onJourneyFailed(customerJourneyError: CustomerJourneyError) {
}
override fun onJourneyCanceled(customerJourneyError: CustomerJourneyError) {
}
override fun onServerInfo(info: ResponseVersionInfo) {
}
override fun onEnterpriseRequest(requestModifier: EnterpriseRequestModifier, requiredAction: Action): EnterpriseRequestModifier {
requestModifier.additionalData.add(AdditionalDataEntry("ADDITIONAL_DATA_TEST", "ENT-706"))
return requestModifier
}
}