blopa / Magento-Chatbot

Magento Chatbot Integration with Telegram, Messenger, Whatsapp, WeChat, Skype and wit.ai.
MIT License
176 stars 62 forks source link

Saving model #113

Closed dominik04u closed 6 years ago

dominik04u commented 7 years ago

Hi. Where do you save the chatbot model? When I try to get $chatdata = Mage::getModel('chatbot/chatdata')->load($chatId, 'facebook_chat_id'); I can't get $chatdata->getFacebookMessageId() and others. In database all records have default values NULL and 0.

blopa commented 7 years ago

Hello @dominik04u.

Thank you very much for trying to understand my code, but to be honest is far from good and very complicated. The thing is, I was developing while I was thinking about new ideas and learning more about chatbots. Now that I have a best view of the product and it's features, I'm remaking it for Magento 2, should be ready next week, and after that I'll remake it to Magento 1 (probably will this year).

With that said, the facebook_chat_id attribute is only used when using crossing-plataform support if I remember correctly, meaning that it will onlt be set if you send a message to support from Facebook, and the support group is on Telegram.

Best.

dominik04u commented 7 years ago

Thank you for quick answer. So I don't need database? I have one more question. What should return getFacebookConvState() method?

blopa commented 7 years ago

Hello.

I need the database, what I meant is that facebook_chat_id is only filled for some really specific cases.

The getFacebookConvState() will return the Conversation State. Let's say a customer ask to search for a product command, the chatbot you get his command and say like "Ok, what product?" and wait for the customer to write something, so in that moment, that the chatbot is waiting for a specific answer, that's a Conversation State.

blopa commented 7 years ago

But I really recommend you to not use this version and wait for the new one to come out. It will be better and with more features