How to Integrate Qiscus Smart Agent Allocation to CRM

Customer Relationship Management (CRM) system is arguably one of the key important components in all industry today. By understanding the need of our customer, we can leverage that to deliver even better service to our customer and then gain more trust. CRM also help to resolve any issue happening to our client, as well as ensure that all of our customers are happy. In the operation side, having the smart CRM will ease the handover of customer handling to other departments, initiating the up-selling for another product, or even to identify and analyze any pattern for product development research.

One of well-known example CRM is Salesforce, cloud-based CRM platform. There is a lot of use case that you can do in Salesforce, but in this article, we will just zoom in on the certain use case that is very familiar and relevant for customer service (CS) chat.

Contacts, leads, accounts, and owner

In the CRM platform, often we hear the term contact, this is actually the database of people who come or we can reach and get the detail from various marketing and sales channel. After the data is in our CRM database, we might send any promotion or product knowledge brochure, some of those people might interested to know more regarding our offer, this usually we call ‘leads’. The leads will usually be followed up by your sales team, each group of the leads might have different persons who approach them, this person who approach each of them we call it ‘owner’. Owner will then try to convert the leads from potential customer become real deal customer. After the lead become real deal customer, we can call it ‘accounts’. This accounts in our CRM database will have some information data regarding them so that we can leverage in the future.

How is that relevant in live chat customer journey?

If we imagine how digital industry works, it’s kind of similar to what happening in the conventional industry works. For example, you have an online store specifically selling shoes. Nowadays, you must have a lot of marketing channel to market your product. It can be various social media like Facebook, Line, Telegram, or Whatsapp. And of course from your own website or mobile apps. Customers will come from multiple channels to contact you and express their interest in buying your product. They can directly shop it, or they might ask several questions regarding your product before actually make a purchase.

All those people that you can reach in your marketing channel or coming into your website or app, they should be your ‘contacts’. Then those people that are expressing their interest, for example asking several question to your customer service, they should be your ‘leads’. Customer service agent who are handling them should be the ‘owner’ of that customer. Then after a deal, the leads now become ‘accounts’. Ideally, you will need to input these customers’ data as much as possible in the CRM that you are having. So that you can make use of the data in the future for many purpose. For example, once you have a new product, and then you checked the database of leads, you might find out that your new product that you are about to launch is filling their needs. You can re-contact them and try to make them purchase by letting them know about your new product.

Integration Qiscus Multichannel Customer Service Chat with Salesforce

To support the flow above, Qiscus Multichannel CS Chat is able to be integrated with CRM. You can actually use any CRM system as long as it supports API that is needed in the integration.

To illustrate how this can be done in Qiscus Multichannel CS Chat and Salesforce, here is the technical diagram:

flow qiscus multichannel and CRM integration

In the diagram, we added several rules for, example marketing agent, so basically, any customer that is still don’t have any previous context or contact from any specific marketing channel, we can assign it to marketing agent first. Once it is validated, the marketing agent will convert them into leads and then assign some account manager or sales person to be the owner in the Salesforce. Then, the next conversation and process will be handled by their respective owner.

1) Setup Channel

First, you will need to setup channel communication in Qiscus Multichannel CS Chat. You can follow the steps that are provided in Qismo website. Here is the screenshot on where you need to set up the channel:

set up channel in qiscus multichannel cs chat

2) Enable custom agent allocation in Qiscus Multichannel CS Chat

Next, you will need to enable custom agent allocation in Qiscus Multichannel CS Chat under Custom Agent Allocation settings menu. As screenshot below:

custom agent allocation on qiscus multichannel cs chat

3) Setup Custom Agent Allocation Server

Once we enable the custom agent allocation, the default agent allocation of Qiscus Multichannel CS Chat will be off. Instead, Qiscus Multichannel CS Chat will send request to webhook URL that you specified (your Custom Agent Allocation Server). The request from Qiscus Multichannel CS Chat will be something like this:

{
  "app_id": "oni-xxxxxxxxx",
  "source": "qiscus",
  "email": "[email protected]",
  "avatar_url": "https:\/\/d1edrlpyc25xu0.cloudfront.net\/kiwari-prod\/image\/upload\/75r6s_jOHa\/1507541871-avatar-mine.png",
  "extras": "{\"a\":\"s\"}",
  "room_id": "123456"
}

You will need to receive this request to trigger some process in your backend agent allocation rule. For example, by understanding the email sender and room_id, you will able to perform check customer id profile from Salesforce by using Salesforce REST API:

public function getUserByEmail($email, $token = null, $instanceUrl = null){
        if(empty($instanceUrl)) {
            $url = $this->instanceUrl.'/services/data/v32.0/query/';
        } else {
            $url = $instanceUrl.'/services/data/v32.0/query/';
        }
        $options = [
            RequestOptions::HEADERS => [
                'Authorization' => 'Bearer '.$this->token,
            ],
            RequestOptions::QUERY => [
                'q' => "SELECT id, Name, Email From User WHERE Email='".$email."'"
            ]
        ];
        try {
            $response = HttpHandler::get($url, $options);
            //if record count = 0 or no record found then throw error
            ...

Snippets code above just an example to illustrate how to check existing leads detail.

After getting the detail of customer from Salesforce, you can do some processing in your backend to decide what next to be done regarding this specific customer, you might want to allocate the owner of the lead/account into the chat room. You can do that by using Qiscus Multichannel CS Chat Agent Allocation, from the API:

Assign Agent to Room ID

Header :
  "Authorization": "tokenfromlogin as ADMIN"
URL: 
[POST] /api/v1/admin/service/assign_agent

Params
room_id     |required
agent_id    |required

The full API you can refer here. Now you can create your own rule to invite agent into any incoming conversation based on your CRM data.

There are actually lots of scenario regarding customer service and CRM. Your business might have different rule on handling custom agent allocation. Qiscus Multichannel CS Chat is very flexible in term of integration and we provide documentations, sample, as well as APIs to make that happen. If you have any question, please don’t hesitate to [email protected].

You May Also Like