1

How can we update twilio config? Don't mind if we have to restart engagement. Scenario is pre-login and post-login. I want to have preEngagementConfig if the user is not logged in while it should be removed after login and context should be introduced. Tried setting FlexWebChat.defaultConfiguration.preEngagementConfig = null; didn't work;

Also tried removing the node where ReactDOM is rendering the app, and re-initialize the app, but getting error default store already exists.

I think it is a valid scenario and Twilio should provide API out of the box.

Kishore Barik
  • 742
  • 3
  • 15

1 Answers1

0

To restart engagement you could use FlexWebChat.Actions.invokeAction('RestartEngagement'). It works using the import * as FlexWebChat from '@twilio/flex-webchat-ui' in react flex-webchat-ui.