{ "scriptContent": { "header": { "scriptName": "NiceMAX_AAChat_to_Export", "busNo": 4606881, "mediaType": 3, "mediaTypeName": "chat", "purposeType": "General", "variableRedaction": "", "nextActionId": 21, "status": "Active", "lastSavedIn": "cxs" }, "actions": { "1": { "actionId": 1, "libraryId": "4B611BA4-8E81-45A6-9FCC-97C24F43CCBC", "name": "ONANSWER", "version": 1, "label": "Onanswer", "dependencyOrder": "0", "implType": "0", "x": 6152, "y": 456, "xws": 6152, "yws": 456 }, "2": { "actionId": 2, "libraryId": "EA1363D4-FADE-4CAC-B15E-C4C514C2F9B5", "name": "ONRELEASE", "version": 1, "label": "Onrelease", "dependencyOrder": "1", "implType": "0", "x": 6152, "y": 712, "xws": 6152, "yws": 712 }, "3": { "actionId": 3, "libraryId": "93FB8888-30CF-4DF3-8ED9-1F2986819080", "name": "END", "version": 1, "label": "End", "dependencyOrder": "2", "implType": "0", "x": 7528, "y": 712, "xws": 7528, "yws": 712 }, "7": { "actionId": 7, "libraryId": "DE09A7DE-6654-4642-A86A-87FFBE75C7D7", "name": "ONSIGNAL", "version": 1, "label": "Onsignal", "dependencyOrder": "3", "implType": "0", "x": 6152, "y": 968, "xws": 6152, "yws": 968 }, "8": { "actionId": 8, "libraryId": "45A72B54-4407-4F10-B9AE-464FF02DBB3C", "name": "TEXTMSG", "version": 1, "label": "Textmsg", "dependencyOrder": "4", "implType": "0", "x": 6816, "y": 976, "xws": 6816, "yws": 976 }, "9": { "actionId": 9, "libraryId": "45A72B54-4407-4F10-B9AE-464FF02DBB3C", "name": "TEXTMSG", "version": 1, "label": "No Response (Retry)", "dependencyOrder": "5", "implType": "0", "x": 2128, "y": 688, "xws": 2128, "yws": 688 }, "10": { "actionId": 10, "libraryId": "93FB8888-30CF-4DF3-8ED9-1F2986819080", "name": "END", "version": 1, "label": "End", "dependencyOrder": "6", "implType": "0", "x": 4040, "y": 488, "xws": 4040, "yws": 488 }, "11": { "actionId": 11, "libraryId": "CD5E2559-0451-4C75-83BE-597E770F5246", "name": "ASKCALLER", "version": 1, "label": "Textmsg", "dependencyOrder": "7", "implType": "0", "x": 1280, "y": 496, "xws": 1280, "yws": 496 }, "12": { "actionId": 12, "libraryId": "A10F9F27-A5DD-48BA-AE37-E206FC6E101B", "name": "LOOP", "version": 1, "label": "Loop", "dependencyOrder": "8", "implType": "0", "x": 2128, "y": 496, "xws": 2128, "yws": 496 }, "13": { "actionId": 13, "libraryId": "45A72B54-4407-4F10-B9AE-464FF02DBB3C", "name": "TEXTMSG", "version": 1, "label": "No Response (End)", "dependencyOrder": "9", "implType": "0", "x": 3184, "y": 496, "xws": 3184, "yws": 496 }, "16": { "actionId": 16, "libraryId": "B2F794C5-0232-40E7-9830-76D573BF57D7", "name": "BEGIN", "version": 1, "label": "Begin", "dependencyOrder": "10", "implType": "0", "x": 616, "y": 488, "xws": 616, "yws": 488 }, "17": { "actionId": 17, "libraryId": "B2AEDEE9-AB1E-4923-9D64-04CEE8118482", "name": "AgentAssistV1_LIBID_b2aedee9-ab1e-4923-9d64-04cee8118482", "version": 1, "label": "Agent Assist", "dependencyOrder": "11", "implType": "1", "x": 7488, "y": 440, "xws": 7488, "yws": 440 }, "18": { "actionId": 18, "libraryId": "B333DA63-33C8-4297-A58A-E9546CF7F0F2", "name": "SNIPPET", "version": 1, "label": "Generate Iframe Params", "dependencyOrder": "12", "implType": "0", "x": 6816, "y": 440, "xws": 6816, "yws": 440 }, "19": { "actionId": 19, "libraryId": "B333DA63-33C8-4297-A58A-E9546CF7F0F2", "name": "SNIPPET", "version": 1, "label": "Send EndOfConversationEvent to Kore Agent AI", "dependencyOrder": "13", "implType": "0", "x": 6816, "y": 696, "xws": 6816, "yws": 696 }, "20": { "actionId": 20, "libraryId": "689A4A1B-FA0D-47B3-9A02-CBEB4735F08F", "name": "REQAGENT", "version": 1, "label": "Reqagent", "dependencyOrder": "14", "implType": "0", "x": 1280, "y": 816, "xws": 1280, "yws": 816 } }, "properties": { "1": { "0": { "name": "SkillNameVar", "value": "SKLNAME" }, "1": { "name": "AgentFirstName", "value": "FIRST" }, "2": { "name": "AgentLastName", "value": "LAST" }, "3": { "name": "AgentID", "value": "AGENTID" } }, "2": { "0": { "name": "CauseCode", "value": "" }, "1": { "name": "CallResult", "value": "" } }, "3": {}, "7": { "0": { "name": "SrcContactIDVar", "value": "S1" }, "1": { "name": "ParamCount", "value": "" }, "2": { "name": "Parameters", "value": [] } }, "8": { "0": { "name": "Target", "value": "BothFromAgent" }, "1": { "name": "Text", "value": "{P1}" } }, "9": { "0": { "name": "Target", "value": "CallerFromSystem" }, "1": { "name": "Text", "value": "I would really love to help, but I'm afraid I need your account number first." } }, "10": {}, "11": { "0": { "name": "Message", "value": "Hello !" }, "1": { "name": "ResultVar", "value": "AccountNumber" }, "2": { "name": "AlertSound", "value": "" }, "3": { "name": "TimeoutSec", "value": "60" } }, "12": { "0": { "name": "Repeat", "value": "2" }, "1": { "name": "CounterName", "value": "C1" } }, "13": { "0": { "name": "Target", "value": "CallerFromSystem" }, "1": { "name": "Text", "value": "Sorry,no agent available. Please try again!" } }, "16": { "0": { "name": "RootFolder", "value": "" }, "1": { "name": "Application", "value": "" }, "2": { "name": "ParamCount", "value": "" }, "3": { "name": "Parameters", "value": [] } }, "17": { "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" } }, "18": { "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\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=false\r\nscriptparams.baseurl=\"{baseurl}\"\r\nscriptparams.interactiveLanguage=\"{language}\"\r\nscriptparams.nice_access_key=\"NiceCX API Access Key\"\r\nscriptparams.nice_access_key_secret=\"NiceCX API Access Key Secret\"\r\nscriptparams.niceurl=\"NiceCX API URL\"\r\nscriptparams.niceauthurl=\"NiceCX Base Region URL\"\r\nscriptparams.customdata=\"{customdata.asJSON()}\"\r\nASSIGN scriptparamsjson=\"{scriptparams.asJSON()}\"\r\n" }, "1": { "name": "MaxStringSize", "value": "Limit2K" } }, "19": { "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\" // set content type\r\n\r\nASSIGN tempArr=\"{baseurl.split('/')}\"\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\nresponsedBody=existingUserProxy.MakeRestRequest(summaryURI, requestBody ,0, \"POST\")\r\nASSIGN responseString=\"{responsedBody.asJSON()}\"\r\n" }, "1": { "name": "MaxStringSize", "value": "Limit2K" } }, "20": { "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" } } }, "branches": { "1": [ { "to": 18, "label": "", "type": "default", "labelDistance": null, "index": 0, "ports": "r,l", "lineType": "straight", "elbows": [] } ], "2": [ { "to": 19, "label": "", "type": "default", "labelDistance": null, "index": 0, "ports": "r,l", "lineType": "straight", "elbows": [] } ], "7": [ { "to": 8, "label": "", "type": "default", "labelDistance": null, "index": 0, "ports": "r,l", "lineType": "straight", "elbows": [] } ], "9": [ { "to": 11, "label": "", "type": "default", "labelDistance": null, "index": 0, "ports": "l,r", "lineType": "straight", "elbows": [] } ], "11": [ { "to": 12, "label": "", "type": "default", "labelDistance": null, "index": 0, "ports": "r,l", "lineType": "straight", "elbows": [] }, { "to": 20, "label": "CallerResponded", "type": "branch", "labelDistance": 0.5, "index": 1, "ports": "b,t", "lineType": "straight", "elbows": [] } ], "12": [ { "to": 13, "label": "Finished", "type": "branch", "labelDistance": null, "index": 0, "ports": "r,l", "lineType": "straight", "elbows": [] }, { "to": 9, "label": "Repeat", "type": "branch", "labelDistance": null, "index": 1, "ports": "b,t", "lineType": "straight", "elbows": [] } ], "13": [ { "to": 10, "label": "", "type": "default", "labelDistance": null, "index": 0, "ports": "r,l", "lineType": "straight", "elbows": [] } ], "16": [ { "to": 11, "label": "", "type": "default", "labelDistance": null, "index": 0, "ports": "r,l", "lineType": "straight", "elbows": [] } ], "18": [ { "to": 17, "label": "", "type": "default", "labelDistance": null, "index": 0, "ports": "r,l", "lineType": "straight", "elbows": [] } ], "19": [ { "to": 3, "label": "", "type": "default", "labelDistance": null, "index": 0, "ports": "r,l", "lineType": "straight", "elbows": [] } ] }, "schemaVersion": "1.0.0" } }