iva-studio-workspace/copilot/n8n workflows/Simulator - Billing Scenario.json
2025-08-24 13:55:15 -05:00

444 lines
12 KiB
JSON
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"name": "Simulator - Billing Scenario",
"nodes": [
{
"parameters": {},
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
-1760,
-1744
],
"id": "920e0adf-76da-4825-aac2-6302b0fa7bff",
"name": "When clicking Execute workflow"
},
{
"parameters": {
"amount": 0.5
},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
-1088,
-1744
],
"id": "32eebace-2a39-4200-84bf-ff3432ba7962",
"name": "Wait",
"webhookId": "c262d22b-2964-4940-bebc-910965f96999"
},
{
"parameters": {
"method": "POST",
"url": "https://apigw.us-east-1.wrk-1.aws.hydra.verint.com/int/wa/v1/cloud-event",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "={{ $json.v2_auth.token_type }} {{ $json.v2_auth.access_token }}"
}
]
},
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n \"source\": \"//iva/us-east-1/demo/transfer\",\n \"id\": \"2025051416334592900000000000000001\",\n \"type\": \"iva.transfer.data.v1\",\n \"time\": \"{{$now.toISO()}}\",\n \"customerId\": \"{{ $json.copilot.customer_id }}\",\n \"upn\": \"{{ $json.copilot.upn }}\",\n \"userUUID\": \"{{ $json.copilot.user_uuid }}\", \n \"data\": {\n \"conversationId\": \"2025051416334592900000000000000001\",\n \"customData\": {\n \"summary\": \"Caller is looking to make a payment for his son's medication.\",\n \"purpose\": \"Billing\",\n \"customerName\": \"Mr. David Campbell\",\n \"memberId\": \"902489671\",\n \"queue\": \"Billing\",\n \"timeInQueue\": \"4m 20s\",\n \"address\": \"456 Elm Street, Springfield, IL 62701\",\n \"language\": \"English\",\n \"lastContact\": \"Called 4 days ago\",\n \"customerType\": \"⭐️ Premier Customer\"\n }\n }\n}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
-1312,
-1744
],
"id": "e40ea143-1b14-4528-abd2-9ce7146bd2d0",
"name": "Smart Transfer (1)",
"executeOnce": false,
"notesInFlow": true,
"notes": "Simulate Recorder Start Call Event"
},
{
"parameters": {
"method": "POST",
"url": "https://apigw.us-east-1.wrk-1.aws.hydra.verint.com/int/wa/v2/call-summary",
"authentication": "genericCredentialType",
"genericAuthType": "oAuth2Api",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n \"customerId\": \"{{ $('Setup').item.json.copilot.customer_id }}\",\n \"id\": \"288506ac-bbfc-44cf-883f-9d7a90464eac\",\n \"upn\": \"{{ $('Setup').item.json.copilot.upn }}\",\n \"summary\": \"The caller returned a phone call from Accredo to schedule delivery for his son's medication. Delivery was set for August 26. Clinical questions were answered satisfactorily, and payment was successful. The caller expressed his gratitude and hung up.\",\n \"title\": \"Call complete summary\",\n \"callId\": \"{{ $('Setup').item.json.copilot.user_uuid }}\",\n \"callerNumber\": \"562-765-9276\",\n \"startTime\": \"{{$now.toISO()}}\",\n \"endTime\": \"{{$now.toISO()}}\",\n \"editable\": false\n}\n",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
480,
-1744
],
"id": "035e42bc-d4b8-44f3-b01a-7da5689d219e",
"name": "Summary",
"credentials": {
"oAuth2Api": {
"id": "issr2dcagkdcFCuZ",
"name": "Work Assist INT (v1) - internal"
}
}
},
{
"parameters": {
"workflowId": {
"__rl": true,
"value": "YynY08QotHPGCfC3",
"mode": "list",
"cachedResultName": "Copilot Setup"
},
"workflowInputs": {
"mappingMode": "defineBelow",
"value": {},
"matchingColumns": [],
"schema": [],
"attemptToConvertTypes": false,
"convertFieldsToString": true
},
"options": {}
},
"type": "n8n-nodes-base.executeWorkflow",
"typeVersion": 1.2,
"position": [
-1536,
-1744
],
"id": "004b5635-768c-47f5-99d3-cae198196efc",
"name": "Setup"
},
{
"parameters": {
"content": "## Recorder Event",
"height": 256,
"width": 224
},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-1376,
-1840
],
"id": "5f59d1ba-88db-4806-bd6b-bb08cd7ddf58",
"name": "Sticky Note"
},
{
"parameters": {
"content": "## Recorder Event",
"height": 256,
"width": 224
},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
416,
-1840
],
"id": "21235620-8295-4253-a04f-e19825f0a570",
"name": "Sticky Note1"
},
{
"parameters": {
"content": "## Application Event",
"height": 256,
"width": 224,
"color": 5
},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-928,
-1840
],
"id": "a8ef6215-d2cb-475a-a0d1-51101a52b0a9",
"name": "Sticky Note2"
},
{
"parameters": {
"content": "## Application Event",
"height": 256,
"width": 224,
"color": 5
},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-480,
-1840
],
"id": "14dc828d-97e1-4e4d-8f27-8a3d49e844c8",
"name": "Sticky Note3"
},
{
"parameters": {
"method": "POST",
"url": "=https://router.ivastudio.verint.live/ProxyScript/run/689145fb44c714b177fdfe7a/current/proactive_agent/userId/{{ $('Setup').item.json.copilot.upn }}",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n \"input\": \"Billing Status\",\n \"metadata\": {\n \"channel\": \"copilot\",\n \"userUUID\": \"05bcc337-6e1b-4e4f-b57f-01969fd7878b\"\n }\n}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
-864,
-1744
],
"id": "dce96a56-b8a0-4773-ac6d-45c8d6c559b6",
"name": "Billing Status",
"notesInFlow": true,
"notes": "Send Event to Proactive IVA Agent"
},
{
"parameters": {
"method": "POST",
"url": "=https://router.ivastudio.verint.live/ProxyScript/run/689145fb44c714b177fdfe7a/current/proactive_agent/userId/{{ $('Setup').item.json.copilot.upn }}",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n \"input\": \"Check Flags\",\n \"metadata\": {\n \"channel\": \"copilot\",\n \"userUUID\": \"05bcc337-6e1b-4e4f-b57f-01969fd7878b\"\n }\n}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
-416,
-1744
],
"id": "bc456f95-5513-4b2f-a4ba-3de83d48268d",
"name": "Flag 26 Warning",
"notesInFlow": true,
"notes": "Send Event to Proactive IVA Agent"
},
{
"parameters": {
"content": "## Application Event",
"height": 256,
"width": 224,
"color": 5
},
"type": "n8n-nodes-base.stickyNote",
"typeVersion": 1,
"position": [
-32,
-1840
],
"id": "088b5f4d-505f-4077-84fa-56dcfecd42ba",
"name": "Sticky Note4"
},
{
"parameters": {
"method": "POST",
"url": "=https://router.ivastudio.verint.live/ProxyScript/run/689145fb44c714b177fdfe7a/current/proactive_agent/userId/{{ $('Setup').item.json.copilot.upn }}",
"sendBody": true,
"specifyBody": "json",
"jsonBody": "={\n \"input\": \"Payment Successful\",\n \"metadata\": {\n \"channel\": \"copilot\",\n \"userUUID\": \"05bcc337-6e1b-4e4f-b57f-01969fd7878b\"\n }\n}",
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
32,
-1744
],
"id": "4cc96f1b-4eff-431c-8ad6-44fddf51a1b9",
"name": "Payment Successful",
"notesInFlow": true,
"notes": "Send Event to Proactive IVA Agent"
},
{
"parameters": {
"amount": 15
},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
-192,
-1744
],
"id": "9bd40381-3ee0-480e-9072-8c8f55792b01",
"name": "Processing Payment",
"webhookId": "3d5cf84c-4e0f-4ee5-a9d5-913e8dc3abd5"
},
{
"parameters": {
"resume": "form",
"formTitle": "Generate Invoice",
"formDescription": "Click Submit when invoice has be generated",
"responseMode": "lastNode",
"options": {}
},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
256,
-1744
],
"id": "c211c3b4-b747-4397-b788-7619c235a737",
"name": "Wait for Generate Invoice",
"webhookId": "16424a4d-6ec5-46ee-a52a-2012d5f361a9",
"executeOnce": true
},
{
"parameters": {
"resume": "form",
"formTitle": "Wait for Payment SMS to be sent",
"formDescription": "Click Submit to signify SMS was sent.",
"options": {}
},
"type": "n8n-nodes-base.wait",
"typeVersion": 1.1,
"position": [
-640,
-1744
],
"id": "726937da-1fa8-4e6e-beac-37560f7ac367",
"name": "Wait for Payment Success",
"webhookId": "3d5cf84c-4e0f-4ee5-a9d5-913e8dc3abd5",
"executeOnce": true
}
],
"pinData": {},
"connections": {
"When clicking Execute workflow": {
"main": [
[
{
"node": "Setup",
"type": "main",
"index": 0
}
]
]
},
"Wait": {
"main": [
[
{
"node": "Billing Status",
"type": "main",
"index": 0
}
]
]
},
"Smart Transfer (1)": {
"main": [
[
{
"node": "Wait",
"type": "main",
"index": 0
}
]
]
},
"Summary": {
"main": [
[]
]
},
"Setup": {
"main": [
[
{
"node": "Smart Transfer (1)",
"type": "main",
"index": 0
}
]
]
},
"Billing Status": {
"main": [
[
{
"node": "Wait for Payment Success",
"type": "main",
"index": 0
}
]
]
},
"Flag 26 Warning": {
"main": [
[
{
"node": "Processing Payment",
"type": "main",
"index": 0
}
]
]
},
"Payment Successful": {
"main": [
[
{
"node": "Wait for Generate Invoice",
"type": "main",
"index": 0
}
]
]
},
"Processing Payment": {
"main": [
[
{
"node": "Payment Successful",
"type": "main",
"index": 0
}
]
]
},
"Wait for Generate Invoice": {
"main": [
[
{
"node": "Summary",
"type": "main",
"index": 0
}
]
]
},
"Wait for Payment Success": {
"main": [
[
{
"node": "Flag 26 Warning",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "d9e06dc2-a1ed-4ac3-9dab-4425650ebfce",
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "1d14171834eac77e3e796e3342933fbc57a33295e898b249017b9d12b57d9e0c"
},
"id": "5JPYaTRE14ngxM9W",
"tags": [
{
"createdAt": "2025-08-12T04:26:36.130Z",
"updatedAt": "2025-08-12T04:26:36.130Z",
"id": "C5NhHOyZA61CPBqG",
"name": "Copilot"
},
{
"createdAt": "2025-08-22T21:56:39.613Z",
"updatedAt": "2025-08-22T21:56:39.613Z",
"id": "TYbLsrTtKRa2Vl4I",
"name": "Accredo"
}
]
}