|
Node |
Dispatch Find Agent |
|---|---|
|
Description |
The Dispatch Find Agent node |
Execution & Payload Details:
-
Reads from:
-
msg.payload.conversation: conversation descriptor used when dispatching. -
msg.payload.data.additionalDetails.offerToAgent: optional boolean to target a specific agent. -
msg.payload.data.requestType: request type string. -
msg.payload.priority: computed priority (e.g., from Set Priority). -
msg.payload.queue_type: selector type (e.g.,"ID","NAME"). -
msg.payload.queue_value: selector value. -
msg.payload.last_agent_id: last agent ID (e.g., from Set Last Agent ID). -
msg.correlationId: correlation ID included with the action dispatch 1.
-
-
Action JSON payload constructed:
-
{ "priority": 1, "lastAgentId": "123", "type": "ID", "queue": "123", "offerToAgent": false, "requestType": {} }
-
-
Writes to:
-
No new fields are added; the node forwards the message unchanged after dispatch.
-
-
Behavior:
-
Constructs the
FIND_AGENTaction and sends it usingsendActionsToConversationManager(conversation, [getAction("FIND_AGENT", payload)], msg.correlationId || ""). -
On success: logs and forwards the message.
-
On error: logs and calls
node.error(...); still callsdone().
-