{ "scriptContent": { "header": { "scriptName": "Nice Agent Desktop POC\\Nice CX Agent Desktop AA Voice Script", "busNo": 4606881, "mediaType": 4, "mediaTypeName": "call", "purposeType": "General", "variableRedaction": "", "nextActionId": 19, "status": "Active", "lastSavedIn": "cxs" }, "actions": { "1": { "actionId": 1, "libraryId": "B2F794C5-0232-40E7-9830-76D573BF57D7", "name": "BEGIN", "version": 1, "label": "Begin", "dependencyOrder": "0", "implType": "0", "x": 424, "y": 184, "xws": 424, "yws": 184 }, "3": { "actionId": 3, "libraryId": "4B611BA4-8E81-45A6-9FCC-97C24F43CCBC", "name": "ONANSWER", "version": 1, "label": "Onanswer", "dependencyOrder": "1", "implType": "0", "x": 424, "y": 392, "xws": 424, "yws": 392 }, "4": { "actionId": 4, "libraryId": "EA1363D4-FADE-4CAC-B15E-C4C514C2F9B5", "name": "ONRELEASE", "version": 1, "label": "Onrelease", "dependencyOrder": "2", "implType": "0", "x": 424, "y": 648, "xws": 424, "yws": 648 }, "6": { "actionId": 6, "libraryId": "B333DA63-33C8-4297-A58A-E9546CF7F0F2", "name": "SNIPPET", "version": 1, "label": "Generate Iframe Params", "dependencyOrder": "3", "implType": "0", "x": 800, "y": 376, "xws": 800, "yws": 376 }, "7": { "actionId": 7, "libraryId": "B2AEDEE9-AB1E-4923-9D64-04CEE8118482", "name": "AgentAssistV1_LIBID_b2aedee9-ab1e-4923-9d64-04cee8118482", "version": 1, "label": "Agent Assist", "dependencyOrder": "4", "implType": "1", "x": 1512, "y": 376, "xws": 1512, "yws": 376 }, "8": { "actionId": 8, "libraryId": "93FB8888-30CF-4DF3-8ED9-1F2986819080", "name": "END", "version": 1, "label": "End", "dependencyOrder": "5", "implType": "0", "x": 1152, "y": 648, "xws": 1152, "yws": 648 }, "10": { "actionId": 10, "libraryId": "B333DA63-33C8-4297-A58A-E9546CF7F0F2", "name": "SNIPPET", "version": 1, "label": "Send EndOfConversationEvent to Kore Agent AI", "dependencyOrder": "6", "implType": "0", "x": 800, "y": 632, "xws": 800, "yws": 632 }, "16": { "actionId": 16, "libraryId": "FF08B4CD-1AC1-D8F4-B52A-85FB86E7A824", "name": "POPURL", "version": 1, "label": "PopURL", "dependencyOrder": "7", "implType": "0", "x": 1152, "y": 400, "xws": 1152, "yws": 400 }, "17": { "actionId": 17, "libraryId": "689A4A1B-FA0D-47B3-9A02-CBEB4735F08F", "name": "REQAGENT", "version": 1, "label": "Reqagent", "dependencyOrder": "8", "implType": "0", "x": 800, "y": 192, "xws": 800, "yws": 192 }, "18": { "actionId": 18, "libraryId": "DBCC742B-28D8-42D1-9D95-0D9ABF20B04B", "name": "MUSIC", "version": 1, "label": "", "dependencyOrder": "9", "implType": "0", "x": 1152, "y": 192, "xws": 1152, "yws": 192 } }, "properties": { "1": { "0": { "name": "RootFolder", "value": "" }, "1": { "name": "Application", "value": "" }, "2": { "name": "ParamCount", "value": "" }, "3": { "name": "Parameters", "value": [] } }, "3": { "0": { "name": "SkillNameVar", "value": "SKLNAME" }, "1": { "name": "AgentFirstName", "value": "FIRST" }, "2": { "name": "AgentLastName", "value": "LAST" }, "3": { "name": "AgentID", "value": "AGENTID" } }, "4": { "0": { "name": "CauseCode", "value": "" }, "1": { "name": "CallResult", "value": "" } }, "6": { "0": { "name": "Data", "value": "ASSIGN global:clientid=\"\"\r\nASSIGN global:clientsecret=\"\"\r\nASSIGN global:botid=\"\"\r\nASSIGN global:baseurl=\"\"\r\nASSIGN global:language=\"en\"\r\n\r\n// 'customdata' object can be utilized to pass information to Agent AI Bot\r\nDYNAMIC customdata\r\ncustomdata.agentName=\"\"\r\ncustomdata.agentid=\"{agentId}\"\r\n\r\nDYNAMIC hashB64url\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()}\") " }, "1": { "name": "MaxStringSize", "value": "Limit2K" } }, "7": { "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": "scriptparamsjson" } }, "8": {}, "10": { "0": { "name": "Data", "value": "DYNAMIC params\nparams.conversationId = \"{contactid}\"\nparams.botid = \"{botid}\"\nparams.clientid=\"{clientid}\"\nparams.clientsecret=\"{clientsecret}\"\nparams.baseurl=\"{baseurl}\"\nparams.language=\"{language}\"\nparams.isCall = \"{isCall}\"\nparams.agentName=\"{first} {last}\"\nparams.agentId=\"{agentId}\"\n\nrequestBody = \"{params.asJSON()}\"\n\nexistingUserProxy = GetRESTProxy()\nexistingUserProxy.ContentType = \"application/json\" // set content type\n\nASSIGN tempArr = \"{baseurl.split('/')}\"\n\nASSIGN baseURI = \"{tempArr[1]}\"\nbaseURI.append(\"/\")\nbaseURI.append(\"{tempArr[2]}\")\nbaseURI.append(\"/\")\nbaseURI.append(\"{tempArr[3]}\")\n\nASSIGN summaryURI = \"{baseURI}/integrations/nice/triggerSummary\" //set endpoint url\nresponsedBody = existingUserProxy.MakeRestRequest(summaryURI, requestBody ,0, \"POST\")\n\nASSIGN responseString=\"{responsedBody.asJSON()}\"" }, "1": { "name": "MaxStringSize", "value": "Limit2K" } }, "16": { "0": { "name": "AgentID", "value": "{agentID}" }, "1": { "name": "URL", "value": "https:///integrations/nice/iframe/?params={scriptparamsjson}" }, "2": { "name": "TabTitle", "value": "Kore AgentAI" }, "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" } }, "17": { "0": { "name": "Skill", "value": "Default" }, "1": { "name": "TargetAgent", "value": "" }, "2": { "name": "PriorityManagement", "value": "DefaultfromSkill" }, "3": { "name": "InitialPriority", "value": "0" }, "4": { "name": "Acceleration", "value": "1" }, "5": { "name": "Function", "value": "" }, "6": { "name": "MaxPriority", "value": "1000" }, "7": { "name": "Sequence", "value": "" }, "8": { "name": "ZipTone", "value": "AfterSequence" }, "9": { "name": "ScreenPopSource", "value": "DefaultFromSkill" }, "10": { "name": "ScreenPopURL", "value": "" }, "11": { "name": "HighProficiency", "value": "1" }, "12": { "name": "LowProficiency", "value": "20" }, "13": { "name": "RoutingAttribute", "value": "NotApplicable" } }, "18": { "0": { "name": "MusicFile", "value": "waterfall.wav" }, "1": { "name": "StartOffset", "value": "0" }, "2": { "name": "SecondstoPlay", "value": "0" }, "3": { "name": "reserved1073742978", "value": "" }, "4": { "name": "InterruptMessages", "value": "" }, "5": { "name": "RepeatIndex", "value": "" }, "6": { "name": "DetectDTMF", "value": "False" }, "7": { "name": "ClearDigits", "value": "True" } } }, "branches": { "1": [ { "to": 17, "label": "", "type": "default", "labelDistance": null, "index": 0, "ports": "r,l", "lineType": "straight", "elbows": [] } ], "3": [ { "to": 6, "label": "", "type": "default", "labelDistance": null, "index": 0, "ports": "r,l", "lineType": "orthogonal", "elbows": [] } ], "4": [ { "to": 10, "label": "", "type": "default", "labelDistance": null, "index": 0, "ports": "r,l", "lineType": "orthogonal", "elbows": [] } ], "6": [ { "to": 16, "label": "", "type": "default", "labelDistance": null, "index": 0, "ports": "r,l", "lineType": "straight", "elbows": [] } ], "10": [ { "to": 8, "label": "", "type": "default", "labelDistance": null, "index": 0, "ports": "c,c", "lineType": "straight", "elbows": [] } ], "16": [ { "to": 7, "label": "", "type": "default", "labelDistance": null, "index": 0, "ports": "r,l", "lineType": "straight", "elbows": [] } ], "17": [ { "to": 18, "label": "", "type": "default", "labelDistance": null, "index": 0, "ports": "r,l", "lineType": "straight", "elbows": [] } ] }, "schemaVersion": "1.0.0" } }