For the complete documentation index, see llms.txt. This page is also available as Markdown.

Basic CRM Integration Tutorial

This tutorial will guide you through the essential steps for a basic integrating between your CRM and Saleschat.

Without this integration, Saleschat can still be used via its dashboard, but key features like number leakage protection and programmatic agent assignment will not be available.

Step-by-step guide

We recommend that you provide the following two buttons on your CRM:

  1. Login

  2. 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:

  1. Generate a magic link for the user.

  2. Open the generated magic link in a new tab.

Users can be created in Saleschat in advance using the Create User API.

This can be a batch operation via a script and need not be a part of logic within your CRM.

Do make sure that the userId's of users that are created via the API are recorded in your system.

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:

Business logic
API documentation

Create a Lead in Saleschat if not created already.

Assign a lead to a user

What if I want to re-assign a lead to a different user?

To reassign a lead to a different user, call the Assign API again with the new user details. The system will automatically update the assignment.

How will I create a chatroom for a lead?

A chatroom is automatically created when you call the Assign API, if one does not already exist for the lead. No manual creation is required.

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 scalable 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 are they 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 Lead that is created.

Explicit Success & Error Notifications:

Each of the API to create and assign a Lead 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

Field
Description

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

Lead table

id (PK)

Primary Key of the Lead table

crm_customer_id

CRM-specific customer ID

sc_lead_id

Saleschat Lead ID

Last updated