ejeyakumar | Posts: 3

Adding a custom attribute to the payload from the OneSpan callback

0 votes

Is 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 }


Duo_Liang | Posts: 3776

Reply to: Adding a custom attribute to the payload from the OneSpan callback

0 votes

Hi 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


Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off