Telegram bot integration
This extension allow have support for telegram bot support directly in Live Helper Chat. It support sound messages, images, files.
Min 3.36v Live Helper Chat version.
- Clone github repository
- Rename cloned folder of telegram to lhctelegram and put it in extension/ directory
- Activate extension in main Live Helper Chat settings file
'extensions' => array ( 'lhctelegram' ),
- Install composer requirements with. You have to download composer or just have it installed already.
cd extension/lhctelegram && composer.phar update
- Clean cache. Just click clean cache in Live Helper Chat back office.
- Execute doc/install.sql on database manager or just run. You will have to wait 10 seconds for queries to be executed.
php cron.php -s site_admin -e lhctelegram -c cron/update_structure
- Register your bot with https://core.telegram.org/bots#6-botfather
- Create bot in LHC back office under Modules => Telegram Settings.
- After creating bot, go back and just click. "Set webhook"
- That's it.
Telegram as Support Client
This allows to use bot as gateway between normal chats on your page and bot chatting with you as a operator. In other words you can use Telegram mobile and desktop clients as Live Helper Chat support clients.
- After you have completed the above steps, you have to do the following changes: In LHC back office, go back to the bot editing page and choose the departments tab. Check the departments you want to receive new chats notifications for. Don't save yet.
- In same tab, check the "This bot acts as a client" box. Now save.
- go to LHC back office main telegram page and choose "Telegram operators". Choose Operator and Bot, or create one.
- Now start a conversation in Telegram and register yourself within bot by typing
/register <id>. The
<id>should be registered operator id from the very first column in the operators list in LHC Modules => Telegram Settings => Telegram operators.
- If you get an error message saying it can't find an operator with that ID, and the operator was just created, clean the cache and start a chat as that operator using just the website (not Telegram). Then try registering the again. It should work now.
- That's all. Just type /help to see what available commands are supported.
If you are planning only using telegram to support your site visitors. It makes sense to setup department online hours, so widget will remain always online even if you are not using default web back office.
Since 3.36v you can just set your online condition to "Always online" and you won't have to do anything else.