using custom data in welcome message


(Jay) #1

Hello,

Can i use the customData coming from index.html to show in welcome message ?

Welcome {{context.session.BotUserSession.lastMessage.messagePayload.botInfo.customData.userName}} to the API Marketplace Assistant. How may I help you today?

I am trying to use it like below but it doesnt seem to be working. I plan to use other info like userEmail down the line in a service Node to a call, will I be able to use it like this only or if there’s any easier way.
context.email = {{context.session.BotUserSession.lastMessage.messagePayload.botInfo.customData.userEmail}}

Thanks


(Subrahmanyam Donepudi) #2

@janak.jay , This information should be available under UserContext. Could you please access it from there?

Ex: context.session.UserContext.customData.name


(Jay) #3

Thanks, This worked and i am using same way for service node.


(Subrahmanyam Donepudi) #4

Great, let us know if you need any further assistance.