Basic CRM Integration Tutorial
This tutorial will guide you through the essential steps for a basic integrating between your CRM and Saleschat.
Step-by-step guide
We recommend that you provide the following two buttons on your CRM:
Login
Chat
Where should I provide these buttons?
The Login button can be provided as an action within accounts or integration section
The Chat button should be provided for each lead, within quick actions for the lead (for ex. next to the dialer).
The functionalities for each of these buttons is explained as below.
1. Login
Users can use the “Login” button to login to Saleschat which should open a new Saleschat tab.
When the login button is clicked, the following steps should be performed at the client:
Generate a magic link for the user.
Open the generated magic link in a new tab.
Saleschat's dashboard allows ONLY one tab to be active at any given time. If a new tab is opened up all the previous tabs become inactive.
2. Chat
Users can use the "Chat" button to get access to the Chatroom with the customer. The access to the Chatroom will be granted basis the business logic.
Where will the User see the Chatroom?
If the business logic permits and the API operations are successful, the user will automatically see the Chatroom at the top of the list of Chatroom within Saleschat's chat dashboard. The User should not "Login" to Saleschat for each customer.
We recommend the following business logic:
What if I prefer having manager and agent in the same chatroom with the customer?While practices on personal Whatsapp app follow these conventions, it is not scaleable for the manager and it leads to a state where it is practically impossible for the manager to keep track of all the conversations.
We recommend having only the agent in the chatroom along with the customer. Each manager has access to agent metrics and chats between the agents and the customers.
How will the customer know which agent is s/he speaking with?We annotate the name of the agent with each chat so as to maintain a personal touch between the agent and the customer.
How will the agent know which customer the agent is speaking with
The chatroom name is a combination of CRM_ID, First Name and Last Name of the Contact that is created.
Explicit Success & Error Notifications:
Each of the API to create a Contact, create a Chatroom and reassign a Chatrrom responds with appropriate error code and error message in case of a failure and we suggest that you display them explicitly when the user is interacting with the Chat button on your CRM.
Basic Database Schema
User table
id (PK)
Primary Key of the User table
crm_user_id
CRM-specific user ID
sc_user_id
Saleschat user ID
sc_magic_link
Magic link for user login
sc_expiry_ts
Expiry timestamp for the magic link
Contact table
id (PK)
Primary Key of the Contact table
crm_customer_id
CRM-specific customer ID
sc_contact_id
Saleschat contact ID
Contact_chatroom table
id (PK)
Primary Key of the Contact_Chatroom table
contact_id (FK)
Foreign key referring to Contact ID
sc_chatroom_id
Saleschat chatroom ID
Contact_chatroom_assigned_to table
id (PK)
Primary Key of the Contact_Chatroom_Assigned table
contact_chatroom_id (FK)
Foreign key referring to the Contact_Chatroom ID
user_id (FK)
Foreign key referring to the assigned User ID
Last updated