https://discord.gg/botpress logo
Web Chat - window.botpress.updateUser() and Get Us...
# 🤝help
s
I'm using Web Chat and want to change the user's information during the conversation. I've attempted to use window.botpress.updateUser() but not having success. The call to init() at the start of the conversation works fine and triggers this workflow: [Conversation Started trigger] --> [Get User Data] --> [Autonomous Node]. I've tried several approaches change the user's data after init(): updateUser() alone. The AN just replies that it received a custom event but the user variables are not updated. updateUser + Custom event - window.botpress.updateUser(); - window.botpress.sendEvent(); // to send a custom event. - Enhanced the workflow in include [Custom Trigger (advanced)] ---> [Get User Data] --> [AN]. The event is triggered and the AN responds. However it seems like Get User Data doesn't work. Added [Get User Data] to the [AN] What is the proper way for this to work? Thanks
p
This is not something I have personally tested, but I would have a custom event trigger that leads to an execute code card where the updateUser api call is used with the data sent through the payload. Is this something you've attempted? Let me know if it helps 🙂
s
Ive not tried that yet but will give it a shot