Saranshmalik / react-native-zendesk

React native wrapper for Zendesk SDK
MIT License
29 stars 42 forks source link

Chat Bot asking for details every time #1

Closed harshalijain closed 3 years ago

harshalijain commented 4 years ago

Hi, I am trying to start Help center and show Contact Us button, however whenever I am using following methods RNZendesk.setVisitorInfo({ name: user.firstName, email: user.email, phone: user.mobileNumber, });

RNZendesk.showHelpCenter({ withChat: true });

However, whenever I am starting a chat using floating Contact button on Help center page, I am again asked all user details by Answer bot : name, email and phone number. How do I load those values automatically for the Chat bot?

Saranshmalik commented 4 years ago

Hi, Firstly if you could point me out how exactly are you configuring the zendesk on startup. Also as mentioned in readme, helpcenter with chat has some issues which are being looked upon. If you start the chat directly not via help center, does that still happen?

Saranshmalik commented 3 years ago

So I went through Zendesk SDK, this is bound to happen. It registers our visitor info but if we have pre-chat form enabled it will always ask you for these details. I am looking to give chat config options probably some time soon and that would solve your issue.

stewartmcgown commented 3 years ago

Not sure that is a correct diagnosis - we don't have pre-chat form enabled yet users are still prompted for info every time they open the chat bot.

Saranshmalik commented 3 years ago

Prechatformenabled is a chat config option, we can pass when starting the chat. As per the SDK, this is enabled by default and thus always ask for the info. It records our visitor info but still asks for this if this option is enabled. Screenshot_20201120-005806

Let me know if you find something that can be worked on the lib to fix this, I'll though surely look to start supporting all the chat config options in the next release