Please enable JS

Boost productivity of your Customer Service team with Artificial Intelligence: An experiment with Facebook Wit on Salesforce

08 Jun. 2016 / Written by  / News

WIT Article V2 Q

Nowadays, almost every single business is capable of generating terabytes of data from internal business processes to external sources. For sure, data will never cease to flow in.

The main point is what to do with it. In fact, data only becomes useful when it is transformed into valid information, which is when it can be used to support the (right) decisions.

The real challenge here is to define and implement a process to make this transformation within the available budget and, at same time, keeping up with the speed that the business imposes in order to react to customers’ demand and competition.

This article looks to Artificial Intelligence as a tool to help businesses convert data into valid information and automate simple decisions. In order to do this, we developed a Proof of Concept (PoC) with the Social Customer Service (Social Media) department. For the AI we used Wit and for case management solution, Salesforce.com was used.

WIT Article V2 Q

Nowadays, almost every single business is capable of generating terabytes of data from internal business processes to external sources. For sure, data will never cease to flow in.

The main point is what to do with it. In fact, data only becomes useful when it is transformed into valid information, which is when it can be used to support the (right) decisions.

The real challenge here is to define and implement a process to make this transformation within the available budget and, at same time, keeping up with the speed that the business imposes in order to react to customers’ demand and competition.

This article looks to Artificial Intelligence as a tool to help businesses convert data into valid information and automate simple decisions. In order to do this, we developed a Proof of Concept (PoC) with the Social Customer Service (Social Media) department. For the AI we used Wit and for case management solution, Salesforce.com was used.

 

PoC

The objective of the PoC was to enable Users to rebook flights using Artificial Intelligence (Wit). That is,  to process a request without human intervention while giving the Users the impression of talking with humans and not with a chatbot.

What’s Wit?

Wit - speech or writing showing such perception and expression, powers of intelligent observation, keen perception, ingenious contrivance, or the like; mental acuity, composure, mental faculties. (dictionary)

 

The main goal of the Wit is to give a system the capacity of converting loose sentences into structured data.

The Wit API allows HTTP GET calls to return the extracted meaning from a given sentence based on examples. The API authenticates with OAuth2 and returns JSON formatted responses.

Yes a tool that allows a system to give feedback in real time simulating intelligent responses.

And we, Right It Services, managed to integrate WIT into Salesforce. How?

Well, first we defined all the keywords that were meaningful for a given business topic and the respective responses wanted for each/group of keywords.

Next, we loaded in Salesforce the questions/sentences and automatic display of the result on real time chat window, as you can see in the image below.

Chat

 

How was this technically implemented?

Before going into technical details, let us explain some Wit concepts.

Wit encapsulates internally two types of objects: Intents and Entities.

The Intent is what you want, what you really need – it’s the object that groups the keywords to find in text. In our experiment, the customer’s requests are normally formulated as questions. In Wit language, those are known as expressions.

Example: You want to ask about the weather. The expressions are then grouped it in an Intent named "Weather":

  • What is the weather in London?
  • How is going to be the weather tomorrow in Lisbon?

It’s in the Entity level where you define proper responses that you want to send back when the word "weather" is use. For example, "what is the weather for tomorrow" adding a date in the equation.

The Entity is the word that you can "mark" in the text to be more precise, for instance a time/place/city. This will help to find the right response for the request.

For instance: "What is the weather forecast for tomorrow in Lisbon", adding even more detail to gain more confidence in the response.

With these two objects, you will have all you need to teach Wit to respond accurately: all the logic behind lies here!

So, when you ask something, Wit will try to find in your text the most amount of Entities possible and try to find the Intent that is closest to your text. Then, it will return the response/answer, including also the confidence level . The confidence level is a categorization that goes from 0% to 100% and represents the level of trust of a given Wit response. The response is given in the language that was requested. In this PoC, no language detection was done within Wit (out-of-scope). 

Now that you understand how Wit works, let us try to explain how we integrated it with Salesforce.

The first challenge was to set the connectivity along with the parsing of the result. The second was to use the look and feel of Salesforce with the appearance of a normal conversation, having a question or expression and the response below.

In terms of connectivity, we created a Visualforce Page and placed there JavaScript code that used Ajax to perform the connection and used JSON to get the responses synchronously. Then, the tricky part was to manage the results... Each question made and response returned were stored in an object called "Conversation By User", which saves the last interaction even after a logout.

 

Let’s look into two examples

Request: “What is the weather tomorrow?

Wit JSON result:

(jsonResult,{"msg_id":"188db66c-eff4-4396-8ec2-5f9a04a39b9a","_text":"What is the weather tomorrow","outcomes":[{"_text":"What is the weather tomorrow?","confidence":0.385,"intent":"Involuntary","entities":{"message_subject":[{"confidence":0.9720439175337532,"type":"value","value":"weather","suggested":true}]}}],"WARNING":"DEPRECATED"})


Request: “I need to change my address

Wit JSON result:

(jsonResult,{"msg_id":"8bac66cc-0938-4e57-a718-6e2197446f82","_text":"I need to change my adress","outcomes":[{"_text":"I need to change my adress","confidence":0.712,"intent":"Voluntary","entities":{"message_subject":[{"confidence":0.9949072860994589,"type":"value","value":"change my adress","suggested":true}],"CaseTopic":[{"confidence":0.6697589129133823,"value":"destination"}]}}],"WARNING":"DEPRECATED"})

It looks complicated but with the method JSON.deserializeUntyped you can extract the result easily.

Insert each results in the Object "Conversation By User" and then show it on the Visualforce Page using the controller to do the queries. This object will store all conversations from all users, grouping them by user and date.

 

Conclusion

Now, with this, you just have to set the most Intents and Entities in your system in a way that allows users to have intelligent conversations with Salesforce, Microsoft SharePoint, Oracle... CRM or not, it doesn't matter: "the Cloud may be the limit"...

Then look into your company and let your imagination flow...Does your company sell pizza and your clients want to place an order, without having to dial to a call center or send an email? You name it...

 

 

Authors 


Manuel Conde
Technical Architect
Este endereço de email está protegido contra piratas. Necessita ativar o JavaScript para o visualizar.
Joaquim Mendes
Technical Architect
Este endereço de email está protegido contra piratas. Necessita ativar o JavaScript para o visualizar.



Rate this item
(0 votes)
Last modified on segunda, 19 março 2018 14:34

Sobre Nós

A Right IT Services garante soluções de IT, arquitetura de serviços, design e desenvolvimento de software e respetivos testes.

Contactos

Rua Odette Saint Maurice

Lote 3B, Edifício L, Piso -1, Escritório A
1700-097 Lisboa | Portugal

+351 218 232 261

+351 911 981 920

contact@rightitservices.com

Segue-nos no Instagram

Este site usa cookies para melhorar a sua experiência.

Se não alterar as configurações do seu browser, aceita as condições. Saiba mais

Entendido