react-native-zendesk-chat icon indicating copy to clipboard operation
react-native-zendesk-chat copied to clipboard

How can I customize the initial message sent by the Answer Bot?

Open Guicbdiniz opened this issue 3 years ago • 10 comments

Hello. Is it possible to change the default message sent by the Answer Bot as the chat is opened?

Guicbdiniz avatar Oct 01 '21 14:10 Guicbdiniz

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" = "....";

knapeto avatar Oct 26 '21 15:10 knapeto

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?

ahmedam55 avatar Nov 18 '21 10:11 ahmedam55

I don't get your question. @ahmedam55

knapeto avatar Nov 18 '21 10:11 knapeto

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 image

I don't seem to find such a key in iOS

ahmedam55 avatar Nov 18 '21 10:11 ahmedam55

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

knapeto avatar Nov 18 '21 10:11 knapeto

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-

ahmedam55 avatar Nov 18 '21 10:11 ahmedam55

I see your point. Please ask on it in their support chat, they are good! Leave the answer here for the future. Thanks

knapeto avatar Nov 18 '21 11:11 knapeto

That worked perfectly fine with me!

image

ahmedam55 avatar Nov 18 '21 11:11 ahmedam55

Hi! What file is it?

Ravid-anywhere avatar Nov 29 '21 12:11 Ravid-anywhere

@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.

grifotv avatar Nov 30 '21 21:11 grifotv