Closed gdlin closed 1 year ago
Hi @gdlin,
Thank you for writing us.
In the latest version, the setVisitorName API has an issue when it's used on the immediate callback of ZohoSalesIQ.init(..). We're looking into this and will update you when there are new version updates.
Please check the if following parameters are correct in your project:
and it is also not necessary to call any of the methods using await.
Example snippet:
ZohoSalesIQ.init(appkey, accessKey).then((value) {
ZohoSalesIQ.registerVisitor("visitorUniqueID");
ZohoSalesIQ.setVisitorEmail('test@example.com');
ZohoSalesIQ.setVisitorContactNumber("1234567");
}).catchError((onError) {
});
I hope this helps. Feel free to write us at (support@zohosalesiq.com) along with your GitHub ID for further assistance.
Regards, Bhahirathan M.
Hello @DavidBhahirathan 👋
I am facing the same problem and I follow async method chaining practices. (I am sure that it awaits and I added 3 seconds between each method of code for debugging purposes).
It doesn't work for now. Apart from registering the user, I also want to set the user name, email, and other custom properties before the chat starts. I also designed a chatbot (Zobot) and works very well but I want to pre-fill some of the questions that the chat robot asks.
Future<void> initFlow() async {
await setTestData();
await Future.delayed(const Duration(milliseconds: 3000));
await initialize();
await Future.delayed(const Duration(milliseconds: 3000));
await addEventListener();
await Future.delayed(const Duration(milliseconds: 3000));
await setConfigs();
await Future.delayed(const Duration(milliseconds: 3000));
await registerUser();
await Future.delayed(const Duration(milliseconds: 3000));
await setUserFields();
}
Inside of registerUser =>
registerUserResult = await ZohoSalesIQ.registerVisitor(testData.id);
Inside of setUserFields =>
await ZohoSalesIQ.setVisitorName(testData.name);
await ZohoSalesIQ.setVisitorEmail(testData.email);
await ZohoSalesIQ.setVisitorAddInfo('favoriteFood', testData.foodName);
The unique id I use is some 8-character long number 95564788
. Also for testing, I add this identifier after each string value as a suffix such as:
Name: yasin95564788
Email: yasin.95564788@gmail.com
Address: some street, some city 95564788
Company: ACME Industries 95564788
Hi @yasinarik ,
Thanks for writing us. The registerVisitor method returns a Future
As mentioned in the above comment, in the latest version, the setVisitorName API has an issue when it's used on the immediate callback of ZohoSalesIQ.init(..). We've fixed this issue in our current development and will update you when it's live.
ZohoSalesIQ.setVisitorEmail(..) and ZohoSalesIQ.setVisitorAddInfo(..) will work fine if it's provided like the below snippet.
Note: Please set the visitor email in the correct mail format.
ZohoSalesIQ.init(appkey, accessKey).then((value) {
ZohoSalesIQ.registerVisitor("visitor_id").then((value) =>
print("Register visitor result: " + value));
ZohoSalesIQ.setVisitorEmail(testData.email);
ZohoSalesIQ.setVisitorAddInfo('favoriteFood', testData.food);
}).catchError((onError) {
});
Regards, Bhahirathan M.
Hi @gdlin and @yasinarik ,
The above reported issue have been addressed in the version 2.0.0.
Regards, Bhahirathan M, Zoho SalesIQ.
Hi @gdlin and @yasinarik ,
The above reported issue have been addressed in the version 2.0.0.
Regards, Bhahirathan M, Zoho SalesIQ.
Hello @DavidBhahirathan , the 2.0.0 link goes to a react native repo. Am I wrong?
Sorry for the inconvenience @yasinarik I have updated the comment please check it now.
Hello, I'm trying to set my user's info but it doesn't seem to be working.
I've tried the following:
I've tried both awaiting and not, and it doesn't seem to change at all. I've added the following:
ZohoSalesIQ.setVisitorNameVisibility(true);
but it doesn't seem to change things. Either I'm doing something wrong, or there is a problem with the API. I'm not getting any errors, but I'm not seeing any of that info in the Visitor's info, on the SalesIQ panel.