Reputation: 25
I want to change the default WelcomeMessage of Twilio Flex Webchat. I´m running webchat from npm package. Below is my webchat-appConfig.js code. When I execute it, the webchat loads but the WelcomeMessage doesn´t change.
var appConfig = {
componentProps: {
MainContainer: {
height: '80%'
},
MainHeader: {
showTitle: true,
titleText: 'Alfredo Prueba',
imageUrl: '',
},
MessagingCanvas: {
PredefinedMessage: {
body: 'Funciona',
authorName: 'Alfredo',
isFromMe: false,
},
memberDisplayOptions: {
yourDefaultName: 'Tú',
yourFriendlyNameOverride: false,
}
}
},
};
Upvotes: 0
Views: 643
Reputation: 1
In my case it worked with defaultProps
Here is what I used: Twilio.FlexWebChat.MessagingCanvas.defaultProps.predefinedMessage.body = "Your Welcome Message";
Upvotes: 0
Reputation: 4837
You need to override PredefinedMessage
.
You can do this via:
componentProps
section in the configuration object, orFlexWebChat.MessagingCanvas.defaultProps.predefinedMessage
Upvotes: 1