zoho/salesiq-mobilisten-flutter

Starting a chatbot (zobot) by "perform custom action" is not possible.

yasinarik opened this issue ยท 3 comments

Hello, I took my time to explain this issue in detail. Please try to read it carefully and if something is not clear, let me know. I will try to provide even more info.

Environment:

Flutter: 2.10.2
salesiq_mobilisten: ^1.0.4
Mainly Android and iOS (we are also implementing for WebApp)

Goal:

I want to run separate chatbots after different user interactions. For example:

Assume there are 3 buttons in the app.

  • Tap on the 1st button --> Should run the 1st chatbot created on the SalesIQ platform.
  • Tap on the 2nd button --> Should run the 2nd chatbot created on the SalesIQ platform.
  • Tap on the 3rd button --> Should start a regular chat with an operator so that the user can ask anything he/she wants. Should not start a chatbot at all.

What I have done:

I created 2 chatbots on SalesIQ. Then I carefully selected these settings:

  • "Choose bot audience" --> "All visitors".
  • "When should the bot initiate chat?" --> "When visitors perform the custom action": ("Bot1" for the 1st chatbot, "Bot2" for the 2nd chatbot)

On the Flutter mobile side:

  • (Just for your information) I successfully register and set the visitor info. SalesIQ can successfully recognize our existing contacts.
  • After that, mostly I have the methods below, and no matter how I call them (I mean in any order, sync/async/await, etc.), they run but in the end, sometimes the correct chatbot runs. However, in general, the wrong bot runs.
// Related methods that I tried in combination:
ZohoSalesIQ.performCustomAction('Bot1'); // "Bot2" for the other bot.
ZohoSalesIQ.show();
ZohoSalesIQ.startChat('A message');

I already spent 3 days on this. We have to ensure that 100% of the time, we show the correct chatbot to the user or if it is a regular chat, we must not show a chatbot at all.

At the moment, it works very unstable, and looks like this might be a deal breaker for our company. Is there any resolution that you can provide?

CC: @DavidBhahirathan

any news about it ?

Thank you for writing to us. we have examined your requirements and come up with a solution, for your requirement you will need a brand with at least three departments associated.
Let's assume a brand named Zylker with three departments associated - department 1, department 2, and department 3, along with two chatbots - bot 1 and bot 2.

For your first requirement "Tap on the 1st button --> Should run the 1st chatbot created on the SalesIQ platform"
Make sure you have created a bot 1 and have it associated only with department 1

For your second requirement "Tap on the 2nd button --> Should run the 2nd chatbot created on the SalesIQ platform"
Make sure you have created a bot 2 and have it associated only with department 2

For your third requirement "Tap on the 3rd button --> Should start a regular chat with an operator so that the user can ask anything he/she wants. Should not start a chatbot at all"
Make sure you have not associated any bot with department 3

Note: Add operators to the departments as per your requirement and please make sure the bot trigger is turned off

Please refer to the below sample code snippet

void onButtonOneClick() {
    ZohoSalesIQ.setDepartments(["department 1"]);
    ZohoSalesIQ.startChat("Chat with Bot 1");
}

/// This function is used to start a chat with the bot (i.e bot 2) that has been associated with department 2
void onButtonTwoClick() {
   ZohoSalesIQ.setDepartments(["department 2"]);
   ZohoSalesIQ.startChat("Chat with Bot 2");
}

/// This function is used to chat a start and connect with the operator as no bot has been associated with department 3
void onButtonThreeClick() {
   ZohoSalesIQ.setDepartments(["department 3"]);
   ZohoSalesIQ.startChat("Chat with our agent");
}

Please note that, the above solution is purely based on the understanding of your requirement in github for further queries and better understanding of your requirement, please feel free to write to us at support@zohosalesiq.com. We will be happy to assist you.

Regards,
Bhahirathan M.

@DavidBhahirathan thanks a lot, David. This solution with "departments" solved the problem for now.

Please consider publishing it on the SalesIQ docs because there is almost no way to guess such a workflow will make it work.