Kommunicate-io / Kommunicate-Flutter-Plugin

A flutter plugin for Kommunicate customer support live chat.
BSD 3-Clause "New" or "Revised" License
17 stars 23 forks source link

Not able get Chat Conversation based on Bot ID on click on "Start New Conversation" #137

Open AgnelSelvan opened 4 months ago

AgnelSelvan commented 4 months ago

I want to chat with specific bot on Kommunicate, so by passing "conversationAssignee" on going to initial chat screen it worked, but while coming from conversation list to "Start a New Conversation", I was navigated to default Chat Bot on Kommunicate.

Below attached the snippet of our dart code

dynamic user = {
    "userId": "ABC",
    'password': "password",
    "ownerId": "ownerId",
    "Authorization": "Token",
};
dynamic conversationObject = {
    'appId': '<APP_ID>',
    'kmUser': jsonEncode(user),
    "conversationAssignee": '<bot-id>',
     'defaultAssignee':'<bot-id>',
     'botIds': ['<bot-id>',],
    'isSingleConversation': false,
    'skipConversationList': false,
};

await KommunicateFlutterPlugin.updateDefaultSetting(conversationObject);
await KommunicateFlutterPlugin.updateChatContext(user);
var result = await KommunicateFlutterPlugin.buildConversation(conversationObject);

Attached video for your reference

https://github.com/user-attachments/assets/a25940bf-65c6-4d35-875a-7fcdadb06a1a

AgnelSelvan commented 3 months ago

I have fixed this issue by passing defaultAssignee: <bot-id> and skipRouting: true.