3.7.13 Transcripts

Orbita allows you to store the chat transcripts. Chat transcripts can be used to draw customer insights, to know the chatbot’s performance and accuracy, or even train your machine learning algorithm.

 

Capture chat transcripts

  1. Go to Experience Designer > Bot Manager flow > Bot provider V2 node.

  2. Enable the checkbox named Enable Transcript Capturing (Chat)

     

  3. You can view the chatbot conversation in the content schema named “Transcriptdata“.

     

Export transcript data

To export transcript data,

  1. Login to Experience Manager and select your project.

  2. Navigate to Project side navigation bar > Create > Components > Content.

  3. Select the content data named “Transcriptdata“
    Tip: If you don't see the “Transcriptdata“ on the screen, use the arrows to navigate through the content data.

  4. Click on the Export data as CSV button

     

  5. You can export data based on the created/modified data and date range.

  6. Click on save to download all the documents that match the criteria from the Transcriptdata content as a .CSV file.

Sending transcript data via email

Follow the below instructions to send the transcript via email.

Flow Studio flow

Import the attached Flow Studio (end of the document).
Refer, 3.3.3 Importing and Exporting Flows

  1. Copy the Flow Studio ID

  2. Copy the Control id of the Control named Email confirmation.

Experience Designer flow

  1. Import the attached Experience Designer flow (end of the document). Refer How do I export and import flows in Experience Designer

  2. Paste the Flow studio Id in the function node named Flow studio Id

  3. Paste the Email confirmation Control Id in the function node named Capture email id.

     

  4. The transcript will be sent to the email.

  File Modified

File Transncript_email_FS.json

Jun 02, 2021 by Rajkiran Alla

File Transncript_email_ED.json

Jun 02, 2021 by Rajkiran Alla

Experience Manager

Ensure that there are no conflicts with intents and utterances.

Output

Sample email.

How to generate Transcript URL

You can generate a transcript URL and share it with any logged in user to view the conversation.

Follow the instructions below to generate the transcript URL:

  1. Import the below flow to your Experience Designer.

    [ { "id": "bbd4a5cf.7805a8", "type": "tab", "label": "Chat Transcript", "disabled": false, "info": "" }, { "id": "17ead8b.de52527", "type": "alexa-flow-config reff", "z": "bbd4a5cf.7805a8", "skillConfig": "eafea192.dad71", "x": 100, "y": 50, "wires": [] }, { "id": "f2c8db18.f4cd58", "type": "http in", "z": "bbd4a5cf.7805a8", "name": "", "url": "/gettranscript/:sessionId", "method": "get", "upload": false, "swaggerDoc": "", "x": 199, "y": 142, "wires": [ [ "2e4d7a44.ec42b6" ] ] }, { "id": "87efeae9.2bdb48", "type": "http response", "z": "bbd4a5cf.7805a8", "name": "", "statusCode": "", "headers": {}, "x": 872, "y": 142, "wires": [] }, { "id": "44067693.ab33e8", "type": "template", "z": "bbd4a5cf.7805a8", "name": "", "field": "payload", "fieldType": "msg", "format": "handlebars", "syntax": "mustache", "template": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <title>Chat Transcript</title>\n <!-- META -->\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n <!-- /META -->\n <script src=\"https://cdn.orbita.cloud/lib/v4/jquery-3.4.1.min.js\"></script>\n</head>\n\n<body>\n <div id=\"chat-transcript\"></div>\n <style>\n table,\n th,\n td {\n border: 1px solid black;\n }\n </style>\n <script>\n var apiUrl = '{{&payload.apiUrl}}';\n var body = '{{&payload.body}}';\n console.log(body);\n $(document).ready(function() {\n if (apiUrl && body) {\n $.ajax({\n url: apiUrl,\n contentType: \"application/json; charset=utf-8\",\n method: 'patch',\n data: body,\n beforeSend: function (xhr) {\n xhr.setRequestHeader(\"Authorization\", \"Bearer \" + localStorage.getItem('token'));\n },\n success: function(data) {\n var transcriptData = '';\n if (data.result && data.result.length > 0) {\n var result = data.result[0];\n var startTime = new Date(result.startTime).toLocaleString();\n var convTime = '';\n transcriptData += `<p>Start Time: ${startTime}</p>`;\n transcriptData += `\n <table style=\"width:100%\">\n <tr>\n <th>Time</th>\n <th>Who</th>\n <th>Message</th>\n </tr>\n `;\n for (var i = 0; i < result.transcript.length; i++) {\n if (result.transcript[i].time) {\n convTime = new Date(result.transcript[i].time).toLocaleString(); \n }\n transcriptData += `\n <tr>\n <td>${convTime}</td>\n <td>${result.transcript[i].who}</td>\n <td>${result.transcript[i].message}</td>\n </tr>\n `;\n }\n transcriptData += '</table>';\n } else {\n transcriptData = 'Transcript data not found';\n }\n $('#chat-transcript').html(transcriptData);\n },\n error:function(err) {\n console.log('err : ');\n console.log(err);\n if (err && err.statusText) {\n $('#chat-transcript').html(err.statusText);\n } else {\n $('#chat-transcript').html('Unknown Error occurred');\n }\n }\n }); \n }\n });\n </script>\n</body>\n</html>", "output": "str", "x": 725, "y": 142, "wires": [ [ "87efeae9.2bdb48" ] ] }, { "id": "2e4d7a44.ec42b6", "type": "function", "z": "bbd4a5cf.7805a8", "name": "Set api url and body payload", "func": "msg.payload.apiUrl = \"/api/schema/transcriptdata/data?isFullSearch=true\";\nmsg.payload.body = JSON.stringify({\n q: {\n \"sessionid\": msg.req.params.sessionId\n }\n});\nreturn msg;", "outputs": 1, "noerr": 0, "x": 504, "y": 142, "wires": [ [ "44067693.ab33e8" ] ] }, { "id": "eafea192.dad71", "type": "alexa-skill-config", "skillname": "Engage", "projectId": "5f6939bfe86a51007a9522a6", "intents": "[]", "skillstate": "", "disableLogging": false }, { "id": "slots", "type": "slots", "z": "", "slots": [] } ]


    It will import a flow to the Experience Designer as shown below.

     

  2. This will generate a URL to view the transcript with the given session ID.

  3. To get the session ID,

    1. Navigate to Project side navigation menu > Create > Content > Transcriptdata.

       

    2. Enter any Transcript document and copy the Session Id.

       

    3. Attach the session id at the end of the URL as shown
      https://sandbox15.orbita.cloud:8443/oeapi/transcript/a4f2e803-30f2-4d56-8f0b-cf973e96e035

    4. This URL will load a page that gives you the transcript associated with the Session Id.

       

As a business user, you can use this transcript URL to create a data table for the Live Agent Escalation dashboard in insights. Refer https://orbita.atlassian.net/wiki/spaces/OCS/pages/1902936065

Video Content

Coming Soon

Supporting Documentation

No additional supporting documentation

Useful Links

http://orbita.ai

Related Content