Pages

Friday, December 6, 2019

Live Agent REST API To Send The Pre Chat Details

Let's take a use case ,where you have bot or some custom FAQs to handle the basic customer queries and but sometimes it's required to connect the customer with one of your executives using salesforce live agent chat.

Whenever your connecting the customer with agent,it's required to pass the pre-chat conversation details to agents so that it will help him/her to greet the customer with issue details and also helps to resolve the customer queries quickly.

Luckily Salesforce supports all these features in their REST API.Please take a look at the api details below.

API Details:


Headers:
X-LIVEAGENT-API-VERSION:34
X-LIVEAGENT-AFFINITYaffinityToken from SessionId API
X-LIVEAGENT-SESSION-KEY: key from from SessionId API
X-LIVEAGENT-SEQUENCE:1
Content-Type:application/json


Sample Request:

{
  "organizationId": "000008afQ",
  "deploymentId": "57228",
  "buttonId": "57328",
  "sessionId": "id-from-response",
  "userAgent": "Lynx/2.8.8",
  "language": "en-US",
  "screenResolution": "1900x1080",
  "visitorName": "Frank Underwood",
  "prechatEntities": [
    
  ],
  "receiveQueueUpdates": true,
  "isPost": true,
  "prechatDetails": [
    {
      "label": "Product Category",
      "value": "Smart Phone",
      "displayToAgent": true,
      "transcriptFields": [  ],
      "entityFieldMaps": [
        
      ]
    },
    {
      "label": "Price Range",
      "value": "20,000-30,000",
      "displayToAgent": true,
      "transcriptFields": [  ],
      "entityFieldMaps": [
        
      ]
    },
    {
      "label": "Description",
      "value": "I'm looking for a mobile with 8GB RAM and 256 GB ROM ",
      "displayToAgent": true,
      "transcriptFields": [   ],
      "entityFieldMaps": [
        
      ]
    }
  ]
}

Sample Response:

["Ok","200"]

How Agent Looks in Salesforce This Data:
After mouse over on Accept


In chat Transcript



Hope this helps you..Enjoy..!




3 comments:


  1. Im Süden Deutschlands sind Unternehmen zunehmend gefordert, ihre Daten sicher zu verwalten und zu löschen. Die DIN 66399 gibt dabei klare Richtlinien für die Datenträgervernichtung vor, um sensible Informationen vor Missbrauch zu schützen. Doch viele CFOs stellen sich die Frage nach dem Return on Investment (ROI) solcher Maßnahmen. Der Einsatz von professionellen Dienstleistern zur sicheren Löschung kann zwar Kosten verursachen, jedoch sind diese im Vergleich zu den potenziellen Verlusten durch Datenlecks gering. Eine umfassende Weiterbildung in der Cybersecurity, wie sie beispielsweise auf https://csvisor.de/ angeboten wird, könnte hier langfristig helfen, effektive Sicherheitsstrategien zu entwickeln und somit auch die wirtschaftliche Sicherheit des Unternehmens zu erhöhen. Letztlich muss jeder CFO abwägen: Sind wir bereit, das Risiko eines Datenverlusts einzugehen?

    ReplyDelete