Onboarding Doc for Livechat in Rocket.Chat. - WideChat/Rocket.Chat GitHub Wiki
Livechat Setup for Rocket.Chat.
Project Setup Overview.
Rocket.Chat
- Clone the project
git clone [email protected]:WideChat/Rocket.Chat.git
- Make sure the default node version is
v12.18.x
meteor npm install
- Start Rocket.Chat App
meteor run
Apps.Dialogflow
- Clone the project
git clone [email protected]:WideChat/Apps.Dialogflow.git
- Install the required packages
npm install
Apps.Salesforce.LiveAgent
- Clone the project
git clone [email protected]:WideChat/Apps.Salesforce.LiveAgent.git
- Install the required packages
npm install
Configure Rocket.Chat
Create Dialogflow and Salesforce bot users.
- Goto
⚙️ Administration -> Users
- Create Dialogflow Bot by clicking on
➕ NEW
button - Fill all required fields (Try using simple understandable terms)
- Name
- Username
- Email (Tick verified)
- Password
- Add
bot
andlivechat-agent
Roles from the dropdown. - Click on save.
- Repeat from Step 2 for Salesforce Bot
- Go to
Omnichannel -> Agents
and change theLivechat Status
to Available for both the bots.
Configure Omnichannel
Setup Dialogflow and Salesforce agents in omnichannel.
- Goto
⚙️ Administration -> Settings -> Omnichannel
and enable Omnichannel by turning on the switch. - Goto
🎧 Omnichannel -> Agents
- From the Username dropdown add your bots you've created during Rocket.Chat configuration
- Dialogflow bot
- Salesforce bot
Create Dialogflow and Salesforce omnichannel departments.
- Goto
🎧 Omnichannel -> Departments
- Create Dialogflow Department by clicking on
➕ NEW
button - Enable the department from top right switch.
- Provide Name and Email in their respective fields
- Add Bot agent to the department (Make sure to include single bot per department)
- Repeat from Step 2 for Salesforce Department
Disable registration form (Optional)
- Goto
🎧 Omnichannel -> Livechat Appearance -> Registration Form
- Turn off the Enabled Switch.
Additional omnichannel configuration
Goto ⚙️ Administration -> Settings -> Omnichannel
and enable Omnichannel by turning on the switch.
- Livechat Settings
- Goto
⚙️ Administration -> Settings -> Omnichannel -> Livechat
- Turn of the Show Pre-registration Form Switch
- Goto
- Routing Settings
- Goto
⚙️ Administration -> Settings -> Omnichannel -> Routing
- Turn on the Assign new conversations to bot agent Switch
- In the Assign new conversations to department, provide Dialogflow department name created before.
- Goto
Deploy Rocket.Chat Apps
Dialogflow and Salesforce apps need to be deployed to Rocket.Chat. Which will help to communicate with their respective APIs.
-
Enable development mode in Rocket.Chat app.
- Open Rocket.Chat App
- Goto
⚙️ Administration Settings -> General -> Apps
- Turn on the switch for
☑️ Enable development mode
-
Install Rocket.Chat Apps CLI
npm install -g WideChat/Rocket.Chat.Apps-cli
Deploy Dialogflow app into Rocket.Chat
Navigate into Apps.Dialogflow project directory and run the following command
rc-apps deploy --url http://localhost:3000 --username <user_username> --password <user_password>
Deploy Salesforce app into Rocket.Chat
cd into Apps.Salesforce.LiveAgent project directory and run the following command
rc-apps deploy --url http://localhost:3000 --username <user_username> --password <user_password>
Dialogflow Setup
Dialogflow is a natural language understanding platform used to design and integrate a conversational user interface into mobile apps, web applications, bots etc.
Dialogflow Console Setup
- Create a new Google Cloud Project and get a credentials JSON file.
- Follow the instructions here
- Save the generated JSON file, it will be required to setup Dialogflow App in Rocket.Chat.
- Login to Dialogflow Console
- Create a new agent.
- Select the Google Project created past this step.
- Import Rocket.Chat bot configuration
- Goto
Agent Setting > Export and Import
- Click on
Restore from zip
and select the configuration zip file.
- Goto
Dialogflow App Setup
- Open Rocket.Chat App
- Goto
⚙️ Administration -> Apps -> Dialogflow
- Fill the required fields by following this doc.
- Set
Target Department for Handover
to the Salesforce department which we created in the omnichannel department section. - Lastly, you can test your Dialogflow Connection by viewing App Logs.
- To view the logs, scroll to top of the apps page.
- There click on
3 dots menu icon -> View Logs
. - There select the most recent onSettingUpdated title.
- If you see
------------------ Google Credentials validation Success ----------------
message, then it means your setup is fine. - If you don't see this message, then recheck your Dialogflow credentials (Check if the private key is entered correctly).
Salesforce.Livechat Setup
Salesforce Live Agent is real-time live chat support that can be embedded on any website and apps. This enables your customers and prospects to reach out and communicate with your company on the web while they are currently on your site or app.
Salesforce Console Setup
- Create new dev account here.
- Goto
⚙️ Settings -> Service Setup
. - On the Service setup home page, click on View All.
- Now select Chat With Customers (Search if required).
- Add new Queue Name and Group Name.
- Click on
➕ Button
to add an agent to the queue. - Now set up your Agent's workload, default values are fine as well.
- In the next step, select Service as type.
- In the next step, don't turn on the Offline Support.
- That's all, you're setup with Salesforce, if things are not clear yet please refer this video.
Salesforce App Setup
- Open Rocket.Chat App
- Goto
⚙️ Administration -> Apps -> Salesforce
- Fill the required fields by following this doc.
- Set
Dialogflow Bot Username
as the username you've assigned to the Dialogflow App - Set
Dialogflow Bot Department Name
as the department name of the Dialogflow bot user.