react-native-zendesk-chat
react-native-zendesk-chat copied to clipboard
How can I customize the initial message sent by the Answer Bot?
Hello.
Is it possible to change the default message sent by the Answer Bot as the chat is opened?
Hi,
yes you can! Here is the docs https://developer.zendesk.com/documentation/classic-sdks/unified-sdk/android/localize_text/#localizing-text
For android: android/app/src/main/res/values/chatbot.xml
<resources>
<string name="zs_engine_greeting_message">.....</string>
</resources>
and for iOS: ios/Localizable.strings
"ios.conversation.ui.chat.welcome_message.conversation_start" = "....";
Thanks @knapeto for the help!
Do you know though how to change "Answer Bot" in iOS, as in Android they have a resource key for it, but not in iOS?
I don't get your question. @ahmedam55
In Android, there is a key to change the string of "Answer Bot", for offline messages: https://developer.zendesk.com/documentation/classic-web-widget-sdks/unified-sdk/android/localize_text/#chat
I don't seem to find such a key in iOS
Answer Bot The Bot's name is set with a client-side API.
The Answer Bot component contains the following strings:
See docs here https://developer.zendesk.com/documentation/classic-web-widget-sdks/unified-sdk/ios/configure/#customize-the-bot-label-string
That's the Answer engine that suggests articles, not the offline messages one.
https://support.zendesk.com/hc/en-us/articles/4408823225370-Why-do-I-see-the-Answer-Bot-in-the-Chat-SDK-even-though-I-don-t-have-a-subscription-
I see your point. Please ask on it in their support chat, they are good! Leave the answer here for the future. Thanks
That worked perfectly fine with me!
Hi! What file is it?
@ahmedam55 @Ravid-anywhere as far as I know this can be set in JS via the startChat
method:
ZendeskChat.startChat({
messagingOptions: {
botName: 'Custom Bot Name',
},
});
Source: https://github.com/taskrabbit/react-native-zendesk-chat/blob/main/RNZendeskChat.d.ts#L8-L21
I can confirm botName
field works. I haven't tried the iOS (botAvatarName
+ botAvatarName
) nor the Android ones (botAvatarDrawableId
). To be honest I'm not sure why botAvatarDrawableId
would be of type number
.