Adding a custom attribute to the payload from the OneSpan callback
Wednesday, May 13, 2020 at 02:32pmIs it possible for me add a custom attribute to the payload we receive during the callback even notification? I have multiple applications using event notifications, so I'd like a custom attribute to indicate which application the even notification should be forwarded too.
If not, is there any way I can update the message variable during package creation? I'm referring to the payload below:
{ "@class": "com.silanis.esl.packages.event.ESLProcessEvent", "name": "PACKAGE_COMPLETE", "sessionUser": "0787be84-f095-44c7-ba00-787093df86fc", "packageId": "KHiRfOXgKK0gpVWwwpFOSNy6o34=", "message": null, "documentId": null }
Reply to: Adding a custom attribute to the payload from the OneSpan callback
Wednesday, May 13, 2020 at 02:52pmHi ejeyakumar,
To clarify the "message" variable in the callback payload, it provides additional information for certain events, for example to carry the opt out reason like below:
{"@class":"com.silanis.esl.packages.event.ESLProcessEvent","name":"PACKAGE_OPT_OUT","sessionUser":"b5381b13-991e-4179-9f9b-d4e1ec9d06bb","packageId":"J5tyJalzG49hmDho5b9JdG61T7M=","message":"the personal info is not correct","documentId":null,"createdDate":"2018-06-30T20:16:29.763Z"}
So not likely that you can customize this specific variable. And from the best of my knowledge, there's no capability to modify the callback payload to add additional information.
However, what you can do is to set the application information to the package metadata, then when you received the callback, you can pull the package metadata and check against the attribute you've set.
Duo