[ { "id": "de8eeaf1d70e84aa", "type": "subflow", "name": "Find Agent Subflow", "info": "", "category": "", "in": [ { "x": 37.000030517578125, "y": 156, "wires": [ { "id": "477a3a3102098c8a" } ] } ], "out": [], "env": [], "meta": {}, "color": "#DDAA99" }, { "id": "477a3a3102098c8a", "type": "extract-data", "z": "de8eeaf1d70e84aa", "name": "", "permissionsRequired": [ "extract-data-controller-node" ], "x": 187.00003051757812, "y": 156, "wires": [ [ "13d02bec4d9ddbc9" ] ] }, { "id": "50c487b0ce52f761", "type": "set-priority", "z": "de8eeaf1d70e84aa", "name": "", "permissionsRequired": [ "set-priority-controller-node" ], "x": 453, "y": 155, "wires": [ [ "93fdb29bc79ab1cc" ] ] }, { "id": "93fdb29bc79ab1cc", "type": "determine-queue", "z": "de8eeaf1d70e84aa", "name": "", "permissionsRequired": [ "determine-queue-controller-node" ], "x": 687, "y": 155, "wires": [ [ "f4a01558dd726e41" ] ] }, { "id": "f4a01558dd726e41", "type": "check-recent-conversations", "z": "de8eeaf1d70e84aa", "name": "", "permissionsRequired": [ "check-recent-conversations-controller-node" ], "x": 958, "y": 155, "wires": [ [ "12330fe7658b7ebe" ], [ "130f221df01cd1af" ] ] }, { "id": "12330fe7658b7ebe", "type": "set-last-agent-id", "z": "de8eeaf1d70e84aa", "name": "", "permissionsRequired": [ "set-last-agent-id-controller-node" ], "x": 1206, "y": 112, "wires": [ [ "130f221df01cd1af" ] ] }, { "id": "130f221df01cd1af", "type": "dispatch-find-agent", "z": "de8eeaf1d70e84aa", "name": "", "permissionsRequired": [ "dispatch-find-agent-controller-node" ], "x": 1458, "y": 160, "wires": [ [] ] }, { "id": "13d02bec4d9ddbc9", "type": "switch", "z": "de8eeaf1d70e84aa", "name": "Check if Reroute On Callback", "property": "payload", "propertyType": "msg", "rules": [ { "t": "jsonata_exp", "v": "payload.intent = \"AGENT_UNSUBSCRIBED\" and payload.data.reason = \"CALLBACK\"", "vt": "jsonata" }, { "t": "else" } ], "checkall": "true", "repair": false, "outputs": 2, "x": 328.0000305175781, "y": 53, "wires": [ [ "f11a9c65697e4a47" ], [ "50c487b0ce52f761" ] ] }, { "id": "f11a9c65697e4a47", "type": "function", "z": "de8eeaf1d70e84aa", "name": "Set Priority To 10", "func": "// This executes only when intent is AGENT_UNSUBSCRIBED and data.reason is CALLBACK\nnode.log('Setting priority to 10 for AGENT_UNSUBSCRIBED with CALLBACK reason');\nmsg.payload.priority = 10;\nreturn msg; ", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 641, "y": 47, "wires": [ [ "93fdb29bc79ab1cc" ] ] }, { "id": "25255a8572cbdb40", "type": "tab", "label": "Controller Flow", "disabled": false, "info": "", "env": [] }, { "id": "462c37e16aec464a", "type": "conversation-controller-init", "z": "25255a8572cbdb40", "name": "Customer SLA Expired", "url": "/intent", "method": "post", "upload": false, "intents": [ { "value": "CUSTOMER_SLA_EXPIRED", "label": "Customer SLA Expired" } ], "outputs": 1, "permissionsRequired": [ "conversation-studio-init-controller-node" ], "x": 151.88333129882812, "y": 1156.888916015625, "wires": [ [ "af1daf45362946be" ] ] }, { "id": "ccf1bdadc9a9086f", "type": "Check If Room Is Private", "z": "25255a8572cbdb40", "name": "", "permissionsRequired": [ "conversation-studio-check-if-room-is-private-controller-node" ], "x": 463.6611022949219, "y": 124.22218704223633, "wires": [ [], [ "3c0c0f1e56a5d409" ] ] }, { "id": "e682a9fe8dde1e46", "type": "Check If Room Is Private", "z": "25255a8572cbdb40", "name": "", "permissionsRequired": [ "conversation-studio-check-if-room-is-private-controller-node" ], "x": 464.7720642089844, "y": 258.6666488647461, "wires": [ [], [ "b07b9a988364348f", "bc6a6becccdb64bd" ] ] }, { "id": "b07b9a988364348f", "type": "Check If Customer Is Present", "z": "25255a8572cbdb40", "name": "", "permissionsRequired": [ "conversation-studio-check-if-customer-is-present-controller-node" ], "x": 778.1055221557617, "y": 212, "wires": [ [ "60514daea42b4796" ], [] ] }, { "id": "60514daea42b4796", "type": "Change Bot Role", "z": "25255a8572cbdb40", "name": "", "role": "ASSISTANT", "permissionsRequired": [ "conversation-studio-change-bot-role-controller-node" ], "x": 1096.1055297851562, "y": 156, "wires": [ [] ] }, { "id": "bc6a6becccdb64bd", "type": "Open External Gadget", "z": "25255a8572cbdb40", "d": true, "name": "", "agent": "CIM_EVENT", "title": "codeacademy", "value": "https://www.codecademy.com/learn/learn-how-to-code", "permissionsRequired": [ "conversation-studio-open-external-gadget-controller-node" ], "x": 820.1055221557617, "y": 291, "wires": [ [] ] }, { "id": "bebb3a3ae5ff84e0", "type": "Check If Room Is Private", "z": "25255a8572cbdb40", "name": "", "permissionsRequired": [ "conversation-studio-check-if-room-is-private-controller-node" ], "x": 452.5498580932617, "y": 408.66666984558105, "wires": [ [], [ "f5978ce02bbe18a4", "36091fa34d15de88", "ff945bb243db6983" ] ] }, { "id": "f5978ce02bbe18a4", "type": "Check Unsubscribed Agent Role", "z": "25255a8572cbdb40", "name": "", "role": "PRIMARY", "permissionsRequired": [ "conversation-studio-check-unsubscribed-agent-role-controller-node" ], "x": 831.4387435913086, "y": 385.3333377838135, "wires": [ [ "ae6ced63559a1bf3" ], [] ] }, { "id": "ae6ced63559a1bf3", "type": "Check Agent Unsubscription Reason", "z": "25255a8572cbdb40", "name": "", "reason": "AGENT_DISCONNECTED", "permissionsRequired": [ "conversation-studio-check-agent-unsubscription-reason-controller-node" ], "x": 1311.4387435913086, "y": 385.3333377838135, "wires": [ [ "b6c799e702963fd1" ], [] ] }, { "id": "b6c799e702963fd1", "type": "Remove Channel Session", "z": "25255a8572cbdb40", "name": "", "channelSession": "CX_VOICE", "reasonCode": "FORCE_CLOSED", "permissionsRequired": [ "conversation-studio-remove-channel-session-controller-node" ], "x": 1753.438720703125, "y": 379.3333435058594, "wires": [ [] ] }, { "id": "36091fa34d15de88", "type": "Check If Customer Is Present", "z": "25255a8572cbdb40", "name": "", "permissionsRequired": [ "conversation-studio-check-if-customer-is-present-controller-node" ], "x": 761.4387435913086, "y": 445.3333377838135, "wires": [ [ "8e8394da31b79bd5" ], [] ] }, { "id": "ab9e175e4f3be74a", "type": "Change Bot Role", "z": "25255a8572cbdb40", "name": "", "role": "PRIMARY", "permissionsRequired": [ "conversation-studio-change-bot-role-controller-node" ], "x": 1291.4387435913086, "y": 445.3333377838135, "wires": [ [ "74213e4d8c8b650c" ] ] }, { "id": "74213e4d8c8b650c", "type": "Check Routing Mode", "z": "25255a8572cbdb40", "name": "", "routingMode": "PUSH", "permissionsRequired": [ "conversation-studio-check-routing-mode-controller-node" ], "x": 1529.4387435913086, "y": 492.3333377838135, "wires": [ [ "3aca1bc468bc65e2", "10c8a1de3a47b840", "ad72754073dc8494", "63d5e2a450bbc48b", "0c1c68c30213d383", "f988456846648b9d" ], [] ] }, { "id": "3aca1bc468bc65e2", "type": "Check Agent Unsubscription Reason", "z": "25255a8572cbdb40", "name": "", "reason": "AGENT_DISCONNECTED", "permissionsRequired": [ "conversation-studio-check-agent-unsubscription-reason-controller-node" ], "x": 1968.4386596679688, "y": 567.3333129882812, "wires": [ [ "6ed0e3dbdc9b8578" ], [] ] }, { "id": "10c8a1de3a47b840", "type": "Check Agent Unsubscription Reason", "z": "25255a8572cbdb40", "name": "", "reason": "MRD_INTERRUPTED", "permissionsRequired": [ "conversation-studio-check-agent-unsubscription-reason-controller-node" ], "x": 1946.4386596679688, "y": 528.3333129882812, "wires": [ [ "6ed0e3dbdc9b8578" ], [] ] }, { "id": "ad72754073dc8494", "type": "Check Agent Unsubscription Reason", "z": "25255a8572cbdb40", "name": "", "reason": "SLA_EXPIRED", "permissionsRequired": [ "conversation-studio-check-agent-unsubscription-reason-controller-node" ], "x": 1927.4386596679688, "y": 488.3333435058594, "wires": [ [ "6ed0e3dbdc9b8578" ], [] ] }, { "id": "27b77f60552702b2", "type": "Remove Channel Session", "z": "25255a8572cbdb40", "name": "", "channelSession": "CIM_EVENT", "reasonCode": "FORCE_CLOSED", "permissionsRequired": [ "conversation-studio-remove-channel-session-controller-node" ], "x": 461.43883514404297, "y": 572.0000400543213, "wires": [ [] ] }, { "id": "39b34dce09051b69", "type": "Plain Message", "z": "25255a8572cbdb40", "name": "", "markdownText": "The conversation is currently paused by the agent. We appreciate your patience.", "x": 465.10548400878906, "y": 830.3332843780518, "wires": [ [] ] }, { "id": "5a9c3115b7d51361", "type": "Check Latest Intent", "z": "25255a8572cbdb40", "name": "", "intents": [ { "value": "START_CONVERSATION", "label": "Start Conversation", "i": 0 }, { "value": "OTHERWISE", "label": "Otherwise", "i": 1 } ], "permissionsRequired": [ "conversation-studio-check-latest-intent-controller-node" ], "outputs": 2, "x": 462.21669006347656, "y": 1040.444471359253, "wires": [ [], [ "b2ed96a0578dba37" ] ] }, { "id": "b2ed96a0578dba37", "type": "Check Channel Type", "z": "25255a8572cbdb40", "name": "", "channelType": "CX_VOICE", "channelSession": "INITIATING", "permissionsRequired": [ "conversation-studio-check-channel-type-controller-node" ], "x": 741.1056060791016, "y": 1037.1111106872559, "wires": [ [], [ "8303f9cb9e552255" ] ] }, { "id": "8303f9cb9e552255", "type": "Check Channel Type", "z": "25255a8572cbdb40", "name": "", "channelType": "CISCO_CC", "channelSession": "INITIATING", "permissionsRequired": [ "conversation-studio-check-channel-type-controller-node" ], "x": 1115.5500793457031, "y": 1039.333330154419, "wires": [ [], [ "b51422828f0692d3" ] ] }, { "id": "3f333b74bdc69f47", "type": "Assign Bot", "z": "25255a8572cbdb40", "name": "", "role": "PRIMARY", "permissionsRequired": [ "conversation-studio-assign-bot-controller-node" ], "x": 1903.8834228515625, "y": 1106.4443359375, "wires": [ [] ] }, { "id": "af1daf45362946be", "type": "Remove Channel Session", "z": "25255a8572cbdb40", "name": "", "channelSession": "CIM_EVENT", "reasonCode": "INACTIVITY", "permissionsRequired": [ "conversation-studio-remove-channel-session-controller-node" ], "x": 458.5499801635742, "y": 1156.888910293579, "wires": [ [] ] }, { "id": "28512d1d538ab6de", "type": "conversation-controller-init", "z": "25255a8572cbdb40", "name": "End Chat", "url": "/intent", "method": "post", "upload": false, "intents": [ { "value": "end_chat", "label": "End Chat" } ], "outputs": 1, "permissionsRequired": [ "conversation-studio-init-controller-node" ], "x": 116.77207946777344, "y": 1301.2220458984375, "wires": [ [ "b95d716cb6f33c6f" ] ] }, { "id": "b95d716cb6f33c6f", "type": "Check If Room Is Private", "z": "25255a8572cbdb40", "name": "", "permissionsRequired": [ "conversation-studio-check-if-room-is-private-controller-node" ], "x": 422.21656036376953, "y": 1301.2221412658691, "wires": [ [], [ "0e6a01a1d3294fb0" ] ] }, { "id": "0e6a01a1d3294fb0", "type": "Remove Channel Session", "z": "25255a8572cbdb40", "name": "", "channelSession": "LAST_USED", "reasonCode": "FORCE_CLOSED", "permissionsRequired": [ "conversation-studio-remove-channel-session-controller-node" ], "x": 768.8831176757812, "y": 1307.8888759613037, "wires": [ [] ] }, { "id": "0e334d18130a8b66", "type": "conversation-controller-init", "z": "25255a8572cbdb40", "name": "No Response Entity", "url": "/intent", "method": "post", "upload": false, "intents": [ { "value": "NO_RESPONSE_ENTITY", "label": "No Response Entity" } ], "outputs": 1, "permissionsRequired": [ "conversation-studio-init-controller-node" ], "x": 148.3277130126953, "y": 1437.7777099609375, "wires": [ [ "e650b2dc50ac4d4c" ] ] }, { "id": "f94585e2dae5b94c", "type": "conversation-controller-init", "z": "25255a8572cbdb40", "name": "Participant Role Changed", "url": "/intent", "method": "post", "upload": false, "intents": [ { "value": "PARTICIPANT_ROLE_CHANGED", "label": "Participant Role Changed" } ], "outputs": 1, "permissionsRequired": [ "conversation-studio-init-controller-node" ], "x": 165.8832244873047, "y": 1548.5554809570312, "wires": [ [ "ca1b070c9ba466d5" ] ] }, { "id": "ca1b070c9ba466d5", "type": "Check If Room Is Private", "z": "25255a8572cbdb40", "name": "", "permissionsRequired": [ "conversation-studio-check-if-room-is-private-controller-node" ], "x": 441.105525970459, "y": 1551.5554904937744, "wires": [ [], [ "44c14d4ff6f1616b" ] ] }, { "id": "53003ef29fb3dcbb", "type": "Check Role Changed Reason", "z": "25255a8572cbdb40", "name": "", "reason": "DIRECT_TRANSFER", "permissionsRequired": [ "conversation-studio-check-role-changed-reason-controller-node" ], "x": 1160.549991607666, "y": 1548.2220401763916, "wires": [ [], [ "d31540a7dd0fad28" ] ] }, { "id": "d31540a7dd0fad28", "type": "Check Role Changed Reason", "z": "25255a8572cbdb40", "name": "", "reason": "CONSULT_TRANSFER", "permissionsRequired": [ "conversation-studio-check-role-changed-reason-controller-node" ], "x": 1631.1056518554688, "y": 1547.1110877990723, "wires": [ [], [ "a9a3defc0f043ecd" ] ] }, { "id": "6847857e863b11f4", "type": "Remove Channel Session", "z": "25255a8572cbdb40", "name": "", "channelSession": "ALL", "reasonCode": "AGENT", "permissionsRequired": [ "conversation-studio-remove-channel-session-controller-node" ], "x": 2856.4384765625, "y": 1541.333251953125, "wires": [ [] ] }, { "id": "b6a732f80f068c3d", "type": "conversation-controller-init", "z": "25255a8572cbdb40", "name": "Agent SLA Expired", "url": "/intent", "method": "post", "upload": false, "intents": [ { "value": "AGENT_SLA_EXPIRED", "label": "Agent SLA Expired" } ], "outputs": 1, "permissionsRequired": [ "conversation-studio-init-controller-node" ], "x": 145.88330841064453, "y": 125.33329963684082, "wires": [ [ "ccf1bdadc9a9086f" ] ] }, { "id": "ca4c78f2e588cd2a", "type": "conversation-controller-init", "z": "25255a8572cbdb40", "name": "Agent Subscribed", "url": "/intent", "method": "post", "upload": false, "intents": [ { "value": "AGENT_SUBSCRIBED", "label": "Agent Subscribed" } ], "outputs": 1, "permissionsRequired": [ "conversation-studio-init-controller-node" ], "x": 128.10540771484375, "y": 257.55554580688477, "wires": [ [ "e682a9fe8dde1e46" ] ] }, { "id": "8cfb1e6859a4877d", "type": "conversation-controller-init", "z": "25255a8572cbdb40", "name": "Agent Unsubscribed", "url": "/intent", "method": "post", "upload": false, "intents": [ { "value": "AGENT_UNSUBSCRIBED", "label": "Agent Unsubscribed" } ], "outputs": 1, "permissionsRequired": [ "conversation-studio-init-controller-node" ], "x": 129.21653747558594, "y": 407.55557441711426, "wires": [ [ "bebb3a3ae5ff84e0" ] ] }, { "id": "5da059eab29e4748", "type": "conversation-controller-init", "z": "25255a8572cbdb40", "name": "Channel Session Expired", "url": "/intent", "method": "post", "upload": false, "intents": [ { "value": "CHANNEL_SESSION_EXPIRED", "label": "Channel Session Expired" } ], "outputs": 1, "permissionsRequired": [ "conversation-studio-init-controller-node" ], "x": 155.10552215576172, "y": 573.9999694824219, "wires": [ [ "27b77f60552702b2" ] ] }, { "id": "875b182d21749e37", "type": "conversation-controller-init", "z": "25255a8572cbdb40", "name": "Conversation Paused", "url": "/intent", "method": "post", "upload": false, "intents": [ { "value": "CONVERSATION_PAUSED", "label": "Conversation Paused" } ], "outputs": 1, "permissionsRequired": [ "conversation-studio-init-controller-node" ], "x": 149.5499725341797, "y": 832.5554809570312, "wires": [ [ "39b34dce09051b69" ] ] }, { "id": "3bde0146295664eb", "type": "conversation-controller-init", "z": "25255a8572cbdb40", "name": "Conversation Started", "url": "/intent", "method": "post", "upload": false, "intents": [ { "value": "CONVERSATION_STARTED", "label": "Conversation Started" } ], "outputs": 1, "permissionsRequired": [ "conversation-studio-init-controller-node" ], "x": 148.8833465576172, "y": 1038.2220458984375, "wires": [ [ "5a9c3115b7d51361", "613ab02670199d25" ] ] }, { "id": "4d51a23675fe76bd", "type": "conversation-controller-init", "z": "25255a8572cbdb40", "name": "Task Enqueued", "url": "/intent", "method": "post", "upload": false, "intents": [ { "value": "TASK_ENQUEUED", "label": "Task Enqueued", "i": 0 } ], "outputs": 1, "permissionsRequired": [ "conversation-studio-init-controller-node" ], "x": 138.10552978515625, "y": 1714.9998779296875, "wires": [ [ "77a34f4ed920aa71" ] ] }, { "id": "0b7d712fe1a08e97", "type": "conversation-controller-init", "z": "25255a8572cbdb40", "name": "Conversation Resumed", "url": "/intent", "method": "post", "upload": false, "intents": [ { "value": "CONVERSATION_RESUMED", "label": "Conversation Resumed" } ], "outputs": 1, "permissionsRequired": [ "conversation-studio-init-controller-node" ], "x": 145.10552215576172, "y": 951.9999694824219, "wires": [ [ "32924f018f5f9bb6" ] ] }, { "id": "603e6f389472fc08", "type": "Check Active Media Direction", "z": "25255a8572cbdb40", "name": "", "direction": "CONSULT", "x": 885.38330078125, "y": 1710.75, "wires": [ [], [ "6f064d73c552731b" ] ] }, { "id": "6f064d73c552731b", "type": "Check Active Media MRD", "z": "25255a8572cbdb40", "name": "", "mrd": "62f9e360ea5311eda05b0242", "x": 1162.0221557617188, "y": 1708.1944580078125, "wires": [ [], [ "8041723d13666b27" ] ] }, { "id": "8041723d13666b27", "type": "Plain Message", "z": "25255a8572cbdb40", "name": "", "markdownText": "You're routed to an agent, he/she will join in a moment.", "x": 1404.38330078125, "y": 1707.77783203125, "wires": [ [] ] }, { "id": "e888294fde62a2c5", "type": "conversation-controller-init", "z": "25255a8572cbdb40", "name": "Task State Changed", "url": "/intent", "method": "post", "upload": false, "intents": [ { "value": "TASK_STATE_CHANGED", "label": "Task State Changed" } ], "outputs": 1, "permissionsRequired": [ "conversation-studio-init-controller-node" ], "x": 146.10552978515625, "y": 1841, "wires": [ [ "a4457fb8f228dd4b" ] ] }, { "id": "a4457fb8f228dd4b", "type": "Check If Room Is Private", "z": "25255a8572cbdb40", "name": "", "permissionsRequired": [ "conversation-studio-check-if-room-is-private-controller-node" ], "x": 395.10552978515625, "y": 1840, "wires": [ [], [ "784f77423c506c43" ] ] }, { "id": "e107c3cab95271a3", "type": "Check Reason for Task State Change", "z": "25255a8572cbdb40", "name": "", "reason": "FORCE_CLOSED", "permissionsRequired": [ "conversation-studio-check-reason-for-task-state-change-controller-node" ], "x": 1115.1055297851562, "y": 1840, "wires": [ [ "0020c33c5ca472cb" ], [] ] }, { "id": "784f77423c506c43", "type": "Check Task Name Whose State Changed", "z": "25255a8572cbdb40", "name": "", "taskName": "CLOSED", "permissionsRequired": [ "conversation-studio-check-task-name-whose-state-changed-controller-node" ], "x": 725.1055297851562, "y": 1840, "wires": [ [ "e107c3cab95271a3", "bccfcc0677301cee" ], [] ] }, { "id": "e541d7df29f576ed", "type": "Check State Changed Task Mode", "z": "25255a8572cbdb40", "name": "", "mode": "QUEUE", "permissionsRequired": [ "conversation-studio-check-state-changed-task-mode-controller-node" ], "x": 1745.1055297851562, "y": 1840, "wires": [ [ "2235d9f24ab63cee" ], [] ] }, { "id": "3c0c0f1e56a5d409", "type": "Remove All Agents", "z": "25255a8572cbdb40", "name": "", "reason": "SLA_EXPIRED", "permissionsRequired": [ "conversation-studio-remove-all-agents-controller-node" ], "x": 721.4388656616211, "y": 121.99995136260986, "wires": [ [] ] }, { "id": "32924f018f5f9bb6", "type": "Plain Message", "z": "25255a8572cbdb40", "name": "", "markdownText": "The conversation is resumed now.", "permissionsRequired": [ "plain-message-controller-node" ], "x": 468.1055221557617, "y": 952, "wires": [ [] ] }, { "id": "f139b7e1d2795e10", "type": "Remove All Agents", "z": "25255a8572cbdb40", "name": "", "reason": "MRD_INTERRUPTED", "permissionsRequired": [ "conversation-studio-remove-all-agents-controller-node" ], "x": 1071.1055221557617, "y": 58, "wires": [ [] ] }, { "id": "71b41262cc3e1931", "type": "conversation-controller-init", "z": "25255a8572cbdb40", "name": "Agent MRD Interrupted", "url": "/intent", "method": "post", "upload": false, "intents": [ { "value": "AGENT_MRD_INTERRUPTED", "label": "Agent MRD Interrupted" } ], "outputs": 1, "permissionsRequired": [ "conversation-studio-init-controller-node" ], "x": 145.10552215576172, "y": 60, "wires": [ [ "e24b76adfc172f41" ] ] }, { "id": "0020c33c5ca472cb", "type": "Check Active Media Direction", "z": "25255a8572cbdb40", "name": "", "direction": "DIRECT_CONFERENCE", "x": 1445.1055297851562, "y": 1840, "wires": [ [], [ "e541d7df29f576ed" ] ] }, { "id": "2235d9f24ab63cee", "type": "Plain Message", "z": "25255a8572cbdb40", "name": "", "markdownText": "Your chat has ended due to technical issues. Please come back later at a convenient time.", "x": 2005.1055297851562, "y": 1840, "wires": [ [] ] }, { "id": "e24b76adfc172f41", "type": "Check Interrupted MRD Type", "z": "25255a8572cbdb40", "name": "", "mrdType": "CX_VOICE", "x": 444.1055221557617, "y": 59, "wires": [ [], [ "508828a17d555d47" ] ] }, { "id": "508828a17d555d47", "type": "Check Interrupted MRD Type", "z": "25255a8572cbdb40", "name": "", "mrdType": "CISCO_CC", "x": 771.1055221557617, "y": 60, "wires": [ [], [ "f139b7e1d2795e10" ] ] }, { "id": "44c14d4ff6f1616b", "type": "Check If All Primary Agents Are In Wrapup", "z": "25255a8572cbdb40", "name": "", "permissionsRequired": [ "are-all-primary-agents-in-wrapup-controller-node" ], "x": 750.1055297851562, "y": 1549.9999389648438, "wires": [ [ "53003ef29fb3dcbb" ], [] ] }, { "id": "84f53d28834f0296", "type": "conversation-controller-init", "z": "25255a8572cbdb40", "name": "Find Agent", "url": "/intent", "method": "post", "upload": false, "intents": [ { "value": "FIND_AGENT", "label": "Find Agent" } ], "outputs": 1, "permissionsRequired": [ "conversation-studio-init-controller-node" ], "x": 117.10552978515625, "y": 1955.9999694824219, "wires": [ [ "92cc1afd3763e2bf" ] ] }, { "id": "92cc1afd3763e2bf", "type": "subflow:de8eeaf1d70e84aa", "z": "25255a8572cbdb40", "name": "", "x": 452.98889923095703, "y": 1955.88330078125, "wires": [] }, { "id": "e650b2dc50ac4d4c", "type": "subflow:de8eeaf1d70e84aa", "z": "25255a8572cbdb40", "name": "", "x": 442.74999237060547, "y": 1437.7499694824219, "wires": [] }, { "id": "6ed0e3dbdc9b8578", "type": "subflow:de8eeaf1d70e84aa", "z": "25255a8572cbdb40", "name": "", "x": 2438.5, "y": 478, "wires": [] }, { "id": "8e8394da31b79bd5", "type": "Check If Primary Agent Is Present", "z": "25255a8572cbdb40", "name": "", "permissionsRequired": [ "is-agent-present-controller-node" ], "x": 1035.88330078125, "y": 493.8833312988281, "wires": [ [], [ "ab9e175e4f3be74a" ] ] }, { "id": "63d5e2a450bbc48b", "type": "Check Agent Unsubscription Reason", "z": "25255a8572cbdb40", "name": "", "reason": "FORCED_LOGOUT_BY_SUPERVISOR", "permissionsRequired": [ "check-agent-unsubscription-reason-controller-node" ], "x": 2006.1498107910156, "y": 648.5499114990234, "wires": [ [ "6ed0e3dbdc9b8578" ], [] ] }, { "id": "a9a3defc0f043ecd", "type": "Check If Customer Is Present", "z": "25255a8572cbdb40", "name": "", "permissionsRequired": [ "is-customer-present-controller-node" ], "x": 2031, "y": 1544, "wires": [ [ "6f0817f73e46e39a" ], [] ] }, { "id": "6f0817f73e46e39a", "type": "Check Channel Type", "z": "25255a8572cbdb40", "name": "", "channelType": "CX_VOICE", "channelSession": "INITIATING", "permissionsRequired": [ "check-channel-type-controller-node" ], "x": 2408, "y": 1419, "wires": [ [ "6847857e863b11f4" ], [ "01fb29278a024c5a" ] ] }, { "id": "01fb29278a024c5a", "type": "Check Channel Type", "z": "25255a8572cbdb40", "name": "", "channelType": "CISCO_CC", "channelSession": "INITIATING", "permissionsRequired": [ "check-channel-type-controller-node" ], "x": 2400, "y": 1542, "wires": [ [ "6847857e863b11f4" ], [ "71b0ac77349ad253" ] ] }, { "id": "6be4db654077e9af", "type": "Check If Room Is Private", "z": "25255a8572cbdb40", "name": "", "permissionsRequired": [ "conversation-studio-check-if-room-is-private-controller-node" ], "x": 442.33331298828125, "y": 725.566650390625, "wires": [ [], [ "c2f4a9b9b5d45b8c" ] ] }, { "id": "44606e482975cded", "type": "Check Channel Type", "z": "25255a8572cbdb40", "name": "", "channelType": "CX_VOICE", "channelSession": "LAST_USED", "permissionsRequired": [ "conversation-studio-check-channel-type-controller-node" ], "x": 1238.333251953125, "y": 645.566650390625, "wires": [ [], [ "7bc233fc2b45125e" ] ] }, { "id": "7bc233fc2b45125e", "type": "Check Channel Type", "z": "25255a8572cbdb40", "name": "", "channelType": "CISCO_CC", "channelSession": "LAST_USED", "permissionsRequired": [ "conversation-studio-check-channel-type-controller-node" ], "x": 1247.333251953125, "y": 710.566650390625, "wires": [ [], [ "64d325843363b873" ] ] }, { "id": "3f0070f2f049246f", "type": "Check Latest Intent", "z": "25255a8572cbdb40", "name": "", "intents": [ { "value": "EMPTY", "label": "Empty" } ], "permissionsRequired": [ "conversation-studio-check-latest-intent-controller-node" ], "outputs": 1, "x": 1573.333251953125, "y": 730.566650390625, "wires": [ [ "c73d8319183ab242" ] ] }, { "id": "c73d8319183ab242", "type": "Plain Message", "z": "25255a8572cbdb40", "name": "", "markdownText": "Hey! this is sparrow from ExpertFlow. How may i help you today?", "x": 1778.333251953125, "y": 730.566650390625, "wires": [ [] ] }, { "id": "c627e2ec8c9b3494", "type": "conversation-controller-init", "z": "25255a8572cbdb40", "name": "Channel Session Started", "url": "/intent", "method": "post", "upload": false, "intents": [ { "value": "CHANNEL_SESSION_STARTED", "label": "Channel Session Started" } ], "outputs": 1, "permissionsRequired": [ "conversation-studio-init-controller-node" ], "x": 158.99998474121094, "y": 725.5666465759277, "wires": [ [ "6be4db654077e9af" ] ] }, { "id": "c2f4a9b9b5d45b8c", "type": "Check Channel Type", "z": "25255a8572cbdb40", "name": "", "channelType": "EMAIL", "channelSession": "LAST_USED", "permissionsRequired": [ "check-channel-type-controller-node" ], "x": 804.566650390625, "y": 649.566650390625, "wires": [ [], [ "558807f1b3106c83" ] ] }, { "id": "558807f1b3106c83", "type": "Check Channel Type", "z": "25255a8572cbdb40", "name": "", "channelType": "YOUTUBE", "channelSession": "LAST_USED", "permissionsRequired": [ "check-channel-type-controller-node" ], "x": 811.566650390625, "y": 717.566650390625, "wires": [ [], [ "38a689e39a817252" ] ] }, { "id": "38a689e39a817252", "type": "Check Channel Type", "z": "25255a8572cbdb40", "name": "", "channelType": "LINKEDIN", "channelSession": "LAST_USED", "permissionsRequired": [ "check-channel-type-controller-node" ], "x": 817.566650390625, "y": 781.566650390625, "wires": [ [], [ "44606e482975cded" ] ] }, { "id": "b51422828f0692d3", "type": "Check Channel Type", "z": "25255a8572cbdb40", "name": "", "channelType": "EMAIL", "channelSession": "INITIATING", "permissionsRequired": [ "check-channel-type-controller-node" ], "x": 1551, "y": 967.9666748046875, "wires": [ [ "9f5a92df77b78ae3" ], [ "51468ab16da1dcd0" ] ] }, { "id": "51468ab16da1dcd0", "type": "Check Channel Type", "z": "25255a8572cbdb40", "name": "", "channelType": "YOUTUBE", "channelSession": "INITIATING", "permissionsRequired": [ "check-channel-type-controller-node" ], "x": 1562, "y": 1035.9666748046875, "wires": [ [ "9f5a92df77b78ae3" ], [ "825a681ea79ddd8a" ] ] }, { "id": "825a681ea79ddd8a", "type": "Check Channel Type", "z": "25255a8572cbdb40", "name": "", "channelType": "LINKEDIN", "channelSession": "INITIATING", "permissionsRequired": [ "check-channel-type-controller-node" ], "x": 1568, "y": 1099.9666748046875, "wires": [ [ "9f5a92df77b78ae3" ], [ "3f333b74bdc69f47" ] ] }, { "id": "9f5a92df77b78ae3", "type": "subflow:de8eeaf1d70e84aa", "z": "25255a8572cbdb40", "name": "", "x": 2035.9666748046875, "y": 1032.7665405273438, "wires": [] }, { "id": "77a34f4ed920aa71", "type": "Check Channel Type", "z": "25255a8572cbdb40", "name": "", "channelType": "EMAIL", "channelSession": "INITIATING", "permissionsRequired": [ "check-channel-type-controller-node" ], "x": 532.3333129882812, "y": 1654.4443359375, "wires": [ [], [ "2b06917d57647f86" ] ] }, { "id": "2b06917d57647f86", "type": "Check Channel Type", "z": "25255a8572cbdb40", "name": "", "channelType": "YOUTUBE", "channelSession": "INITIATING", "permissionsRequired": [ "check-channel-type-controller-node" ], "x": 528.8888549804688, "y": 1708.9166269302368, "wires": [ [], [ "57a0bd09ad1f44e5" ] ] }, { "id": "57a0bd09ad1f44e5", "type": "Check Channel Type", "z": "25255a8572cbdb40", "name": "", "channelType": "LINKEDIN", "channelSession": "INITIATING", "permissionsRequired": [ "check-channel-type-controller-node" ], "x": 546.4722290039062, "y": 1758.9443378448486, "wires": [ [], [ "603e6f389472fc08" ] ] }, { "id": "64d325843363b873", "type": "Check Channel Type", "z": "25255a8572cbdb40", "name": "", "channelType": "WEB_RTC", "channelSession": "LAST_USED", "permissionsRequired": [ "conversation-studio-check-channel-type-controller-node" ], "x": 1249.566650390625, "y": 770.9666748046875, "wires": [ [], [ "3f0070f2f049246f" ] ] }, { "id": "08a58aeda4e71568", "type": "Check Reason for Task State Change", "z": "25255a8572cbdb40", "name": "", "reason": "NO_AGENT_AVAILABLE", "permissionsRequired": [ "conversation-studio-check-reason-for-task-state-change-controller-node" ], "x": 1313.2000122070312, "y": 1931.2000732421875, "wires": [ [ "eb11e67edd664a10" ], [] ] }, { "id": "eb11e67edd664a10", "type": "Check Active Media Direction", "z": "25255a8572cbdb40", "name": "", "direction": "DIRECT_TRANSFER", "x": 1654.0000610351562, "y": 1932.2000732421875, "wires": [ [ "62477feee69e30b3" ], [] ] }, { "id": "62477feee69e30b3", "type": "Check State Changed Task Mode", "z": "25255a8572cbdb40", "name": "", "mode": "AGENT", "permissionsRequired": [ "conversation-studio-check-state-changed-task-mode-controller-node" ], "x": 1960.4000854492188, "y": 1929.2000732421875, "wires": [ [ "4bb526ca3e4dd70e" ], [] ] }, { "id": "4bb526ca3e4dd70e", "type": "subflow:de8eeaf1d70e84aa", "z": "25255a8572cbdb40", "name": "", "x": 2274.800048828125, "y": 1931.2000732421875, "wires": [] }, { "id": "bccfcc0677301cee", "type": "Check Channel Type", "z": "25255a8572cbdb40", "name": "", "channelType": "CX_VOICE", "channelSession": "INITIATING", "permissionsRequired": [ "check-channel-type-controller-node" ], "x": 935.75, "y": 1897.88330078125, "wires": [ [], [ "47cee039c4d6047d" ] ] }, { "id": "47cee039c4d6047d", "type": "Check Channel Type", "z": "25255a8572cbdb40", "name": "", "channelType": "CISCO_CC", "channelSession": "INITIATING", "permissionsRequired": [ "check-channel-type-controller-node" ], "x": 941.75, "y": 1952.25, "wires": [ [], [ "08a58aeda4e71568" ] ] }, { "id": "dd0192e7f93e0f51", "type": "conversation-controller-init", "z": "25255a8572cbdb40", "name": "Agent State Changed", "url": "/intent", "method": "post", "upload": false, "intents": [ { "value": "AGENT_STATE_CHANGED", "label": "Agent State Changed" } ], "outputs": 1, "permissionsRequired": [ "conversation-studio-init-controller-node" ], "x": 151, "y": 2110, "wires": [ [ "212d8eabb1a5602a" ] ] }, { "id": "212d8eabb1a5602a", "type": "Check Agent State", "z": "25255a8572cbdb40", "name": "", "state": "NOT_READY", "reason": "Callback", "permissionsRequired": [ "check-agent-state-controller-node" ], "x": 553, "y": 2110, "wires": [ [ "bdd35d2b1e0e0e80" ], [] ] }, { "id": "bdd35d2b1e0e0e80", "type": "Remove All Agents", "z": "25255a8572cbdb40", "name": "", "reason": "CALLBACK", "permissionsRequired": [ "remove-all-agents-controller-node" ], "x": 948, "y": 2109, "wires": [ [] ] }, { "id": "0c1c68c30213d383", "type": "Check Agent Unsubscription Reason", "z": "25255a8572cbdb40", "name": "", "reason": "CALLBACK", "permissionsRequired": [ "conversation-studio-check-agent-unsubscription-reason-controller-node" ], "x": 1919.9999389648438, "y": 448, "wires": [ [ "6ed0e3dbdc9b8578" ], [] ] }, { "id": "f988456846648b9d", "type": "Check Agent Unsubscription Reason", "z": "25255a8572cbdb40", "name": "", "reason": "SESSION_TIMEOUT_INACTIVITY", "permissionsRequired": [ "check-agent-unsubscription-reason-controller-node" ], "x": 1987.4999542236328, "y": 609.6666479110718, "wires": [ [ "6ed0e3dbdc9b8578" ], [] ] }, { "id": "71b0ac77349ad253", "type": "Survey Message", "z": "25255a8572cbdb40", "d": true, "name": "", "surveyForm": "{}", "message": "{form}", "rules": [], "permissionsRequired": [ "survey-message-controller-node" ], "x": 2653, "y": 1642.4834594726562, "wires": [ [ "6847857e863b11f4" ] ] }, { "id": "613ab02670199d25", "type": "AI Analyzer", "z": "25255a8572cbdb40", "name": "", "permissionsRequired": [ "ai-analyzer-controller-node" ], "x": 453, "y": 1085, "wires": [ [] ] }, { "id": "ff945bb243db6983", "type": "Summary Assistant", "z": "25255a8572cbdb40", "name": "", "permissionsRequired": [ "summary-assistant-controller-node" ], "x": 1685.71435546875, "y": 165.71429443359375, "wires": [ [ "4fa523d63475cb29" ] ] }, { "id": "66c16f164c043fb7", "type": "custom http request", "z": "25255a8572cbdb40", "name": "Get Sentiment", "method": "GET", "ret": "txt", "paytoqs": "ignore", "requestbody": "payload", "response": "sentiment", "responseType": "msg", "url": "http://expertflow-ai-llm-connector-svc.expertflow:8000/ef-llm-connector/conversation-sentiment/{{payload.conversation.id}}", "tls": "", "persist": false, "proxy": "", "insecureHTTPParser": false, "authType": "", "senderr": false, "headers": [ { "keyType": "other", "keyValue": "tenantid", "valueType": "other", "valueValue": "ai-03" } ], "permissionsRequired": [ "custom-http-request-controller-node" ], "x": 2365.514289855957, "y": 165.51425170898438, "wires": [ [ "81178f5bb49fb784" ] ] }, { "id": "a356ca1db414e0a6", "type": "Sentiment Assistant", "z": "25255a8572cbdb40", "name": "", "permissionsRequired": [ "sentiment-assistant-controller-node" ], "x": 2139.7142362594604, "y": 165.91427612304688, "wires": [ [ "66c16f164c043fb7" ] ] }, { "id": "4fa523d63475cb29", "type": "custom http request", "z": "25255a8572cbdb40", "name": "Get Summary", "method": "GET", "ret": "txt", "paytoqs": "ignore", "requestbody": "payload", "response": "summary", "responseType": "msg", "url": "http://expertflow-ai-llm-connector-svc.expertflow:8000/ef-llm-connector/conversation-summary/{{payload.conversation.id}}", "tls": "", "persist": false, "proxy": "", "insecureHTTPParser": false, "authType": "", "senderr": false, "headers": [ { "keyType": "other", "keyValue": "tenantid", "valueType": "other", "valueValue": "ai-03" } ], "permissionsRequired": [ "custom-http-request-controller-node" ], "x": 1910.914306640625, "y": 165.914306640625, "wires": [ [ "a356ca1db414e0a6" ] ] }, { "id": "81178f5bb49fb784", "type": "function", "z": "25255a8572cbdb40", "name": "parse to json", "func": "msg.past_events = \"[]\";\nmsg.summary = JSON.parse(msg.summary);\nmsg.sentiment = JSON.parse(msg.sentiment);\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 2580.514404296875, "y": 165.5142822265625, "wires": [ [ "45098e9f663eed81" ] ] }, { "id": "45098e9f663eed81", "type": "Update Conversation Data", "z": "25255a8572cbdb40", "name": "Update Summary/Sentiment", "datas": [ { "key": "CONVERSATION_SUMMARY", "datatype": "STRING", "value": "summary.data.summary", "type": "msg" }, { "key": "CUSTOMER_SENTIMENTS", "datatype": "STRING", "value": "sentiment.data.sentiment.overall_sentiment", "type": "msg" } ], "permissionsRequired": [ "update-conversation-data-controller-node" ], "x": 2835.9140625, "y": 165.78094482421875, "wires": [ [] ] }, { "id": "4f59b54587db48b4", "type": "global-config", "env": [], "modules": { "conversation-studio": "1.0.0" } } ]