{ "scriptContent": { "header": { "scriptName": "NICE Agent Desktop Outbound Voice", "busNo": 4606881, "mediaType": 4, "mediaTypeName": "call", "purposeType": "General", "variableRedaction": "", "nextActionId": 9, "status": "Active", "lastSavedIn": "stx" }, "actions": { "1": { "actionId": 1, "libraryId": "B2F794C5-0232-40E7-9830-76D573BF57D7", "name": "BEGIN", "version": 1, "label": "Begin", "dependencyOrder": "0", "implType": "0", "x": 568, "y": 336, "xws": 568, "yws": 336 }, "3": { "actionId": 3, "libraryId": "B333DA63-33C8-4297-A58A-E9546CF7F0F2", "name": "SNIPPET", "version": 1, "label": "Generate iframe params", "dependencyOrder": "4", "implType": "0", "x": 800, "y": 320, "xws": 800, "yws": 320 }, "4": { "actionId": 4, "libraryId": "EA1363D4-FADE-4CAC-B15E-C4C514C2F9B5", "name": "ONRELEASE", "version": 1, "label": "Onrelease", "dependencyOrder": "1", "implType": "0", "x": 568, "y": 624, "xws": 568, "yws": 624 }, "5": { "actionId": 5, "libraryId": "93FB8888-30CF-4DF3-8ED9-1F2986819080", "name": "END", "version": 1, "label": "End", "dependencyOrder": "2", "implType": "0", "x": 1056, "y": 624, "xws": 1056, "yws": 624 }, "6": { "actionId": 6, "libraryId": "B333DA63-33C8-4297-A58A-E9546CF7F0F2", "name": "SNIPPET", "version": 1, "label": "Send EndOfConversationEvent to Kore Agent AI", "dependencyOrder": "3", "implType": "0", "x": 800, "y": 608, "xws": 800, "yws": 608 }, "7": { "actionId": 7, "libraryId": "FF08B4CD-1AC1-D8F4-B52A-85FB86E7A824", "name": "POPURL", "version": 1, "label": "PopURL", "dependencyOrder": "5", "implType": "0", "x": 1056, "y": 344, "xws": 1056, "yws": 344 }, "8": { "actionId": 8, "libraryId": "B2AEDEE9-AB1E-4923-9D64-04CEE8118482", "name": "AgentAssistV1_LIBID_b2aedee9-ab1e-4923-9d64-04cee8118482", "version": 1, "label": "Agent Assist", "dependencyOrder": "6", "implType": "1", "x": 1304, "y": 320, "xws": 1304, "yws": 320 } }, "properties": { "1": { "0": { "name": "RootFolder", "value": "" }, "1": { "name": "Application", "value": "" }, "2": { "name": "ParamCount", "value": "" }, "3": { "name": "Parameters", "value": [ "Unnamed0" ] } }, "3": { "0": { "name": "Data", "value": "ASSIGN global:clientid=\"Kore.ai Client Id\"\r\nASSIGN global:clientsecret=\"Kore.ai Client Secret\"\r\nASSIGN global:botid=\"Kore.ai Bot Id\"\r\nASSIGN global:baseurl=\"Kore.ai Agent AI Widget URL\"\r\nASSIGN global:language=\"en\"\r\n\r\n// 'customdata' object can be utilized to pass information to Agent AI Bot\r\n// For example, customdata.agentId = \"{__agentid}\"\r\nDYNAMIC customdata\r\n\r\nDYNAMIC scriptparams\r\nscriptparams.clientid=\"{clientid}\"\r\nscriptparams.clientsecret=\"{clientsecret}\"\r\nscriptparams.botid=\"{botid}\"\r\nscriptparams.agentassisturl=\"{agentassisturlencoded}\"\r\nscriptparams.conversationid=\"{contactid}\"\r\nscriptparams.source=\"nice\"\r\nscriptparams.isCall=true\r\nscriptparams.baseurl=\"{baseurl}\"\r\nscriptparams.interactiveLanguage=\"{language}\"\r\nscriptparams.agentName=\"{first} {last}\"\r\nscriptparams.agentId=\"{__agentid}\"\r\nscriptparams.customdata=\"{customdata.asJSON()}\"\r\n\r\nASSIGN restProxy=new UCN.Data.RESTProxy()\r\nASSIGN scriptparamsjson=restProxy.EncodeBase64(\"{scriptparams.asJSON()}\")\r\n" }, "1": { "name": "MaxStringSize", "value": "Limit2K" } }, "4": { "0": { "name": "CauseCode", "value": "" }, "1": { "name": "CallResult", "value": "" } }, "5": {}, "6": { "0": { "name": "Data", "value": "DYNAMIC params\r\nparams.conversationId = \"{contactid}\"\r\nparams.botid = \"{botid}\"\r\nparams.clientid=\"{clientid}\"\r\nparams.clientsecret=\"{clientsecret}\"\r\nparams.baseurl=\"{baseurl}\"\r\nparams.language=\"{language}\"\r\nrequestBody = \"{params.asJSON()}\"\r\n\r\nexistingUserProxy = GetRESTProxy()\r\nexistingUserProxy.ContentType = \"application/json\"\r\n\r\nASSIGN tempArr = \"{baseurl.split('/')}\"\r\n\r\nASSIGN baseURI = \"{tempArr[1]}\"\r\nbaseURI.append(\"/\")\r\nbaseURI.append(\"{tempArr[2]}\")\r\nbaseURI.append(\"/\")\r\nbaseURI.append(\"{tempArr[3]}\")\r\n\r\nASSIGN summaryURI = \"{baseURI}/integrations/nice/triggerSummary\" //set endpoint url\r\n\r\nresponseBody = existingUserProxy.MakeRestRequest(summaryURI, requestBody ,0, \"POST\")\r\n" }, "1": { "name": "MaxStringSize", "value": "Limit2K" } }, "7": { "0": { "name": "AgentID", "value": "{__agentid}" }, "1": { "name": "URL", "value": "https://agentassist.kore.ai/integrations/nice/iframe/?params={scriptparamsjson}" }, "2": { "name": "TabTitle", "value": "Kore Agent AI" }, "3": { "name": "PopDestination", "value": "ContactPanel" }, "4": { "name": "PopoutWindowHeight", "value": "0" }, "5": { "name": "PopoutWindowWidth", "value": "0" }, "6": { "name": "ClosePopoutUponTermination", "value": "False" }, "7": { "name": "CachePopURL", "value": "False" } }, "8": { "0": { "name": "assistLaunchConfigName", "value": "KAA" }, "1": { "name": "actionRestUrl", "value": "" }, "2": { "name": "AgentId", "value": "" }, "3": { "name": "AgentUUId", "value": "" }, "4": { "name": "AgentAssistMasterId", "value": "" }, "5": { "name": "BotExchangeVersion", "value": "" }, "6": { "name": "scriptParams", "value": "" } } }, "branches": { "1": [ { "to": 3, "label": "", "type": "default", "labelDistance": null, "index": 0, "ports": "", "lineType": "", "elbows": [] } ], "3": [ { "to": 7, "label": "", "type": "default", "labelDistance": null, "index": 0, "ports": "", "lineType": "", "elbows": [] } ], "4": [ { "to": 6, "label": "", "type": "default", "labelDistance": null, "index": 0, "ports": "", "lineType": "", "elbows": [] } ], "6": [ { "to": 5, "label": "", "type": "default", "labelDistance": null, "index": 0, "ports": "", "lineType": "", "elbows": [] } ], "7": [ { "to": 8, "label": "", "type": "default", "labelDistance": null, "index": 0, "ports": "", "lineType": "", "elbows": [] } ] }, "schemaVersion": "1.0.0" } }