...
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:
Import the below flow to your Experience Designer.
Code Block [ { "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.This will generate a URL to view the transcript with the given session ID.
To get the session ID,
Navigate to Project side navigation menu > Create > Content > Transcriptdata.
Enter any Transcript document and copy the Session Id.
Attach the session id at the end of the URL as shown
https://sandbox15.orbita.cloud:8443/oeapi/transcript/a4f2e803-30f2-4d56-8f0b-cf973e96e035
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 /wiki/spaces/OCS/pages/1902936065
...
Video Content
Coming Soon
Supporting Documentation
...