Set custom data into the user context and session context programatically from the iOS App

chatbots

(Chandrahasan Vantaku) #1

Hi,

I would like to set up some custom data (e.g user first and last names, sessionId to be used for backend calls) into the context of the bot while being initiated in the iOS app. I have tried to send inside botInfo as customData, but I am unable to access this customData from the last message when run in iOS app. It was not present.

Please advice on how to pass my custom data into the context of the bot.

Thank you.


(Subrahmanyam Donepudi) #2

Yes, the only way developer could add the customData from kit is by adding the same to botInfo. Could you please check if the request payload sent to _/oAuth/token/jwtgrant endpoint does have the added customData in it?


(Chandrahasan Vantaku) #3

Yes @Subrahmanyam. I have double checked that the custom data is being sent in the request payload. Please see the images of my debugging.


(Subrahmanyam Donepudi) #4

Okay, I gave it a try from webSDK which passes the customData in the same way as the mobile SDKs do (adding customData to the botInfo and passing the same as request payload) and I see the customData coming fine under the BotUserSession data. All SDKs (AndroidSDK, iOS SDK or web SDK) communicate the same way and its one channel from the platform perspective.

image

However, I will still validate your issue from the iOS SDK and will get back to you.


(Chandrahasan Vantaku) #5

Hi @Subrahmanyam,

Would it be possible for you to validate this issue in the iOS SDK from your side? I got a confirmation from the support that this is broken or not implemented in the iOS SDK which is very basic and very much necessary functionality.