My Agentforce agent uses Prompt template with an embedded flow. When i call the agent with the agent API get the below response.
{ "messages": [ { "type": "Inform", "feedbackId": "a7f51944-6ebd-46aa-9722-7e26c7382fb2", "isContentSafe": true, "message": "The referral has been triaged successfully. Let me know if you need further assistance.", "id": "5b3d362b-70d8-4fb7-8cc4-5a281c51af38", "metrics": {}, "planId": "a7f51944-6ebd-46aa-9722-7e26c7382fb2", "result": [ { "type": "copilotActionOutput/Triage_Referral", "value": { "promptResponse": "{\n \"triageRecord\": {\n \"category\": \"Cardiology\",\n \"problem\": \"Chest Pain\",\n \"symptoms\": \"Recent onset chest pain with high probability of IHD\",\n \"priority\": \"P1 Chest pain clinic\"\n },\n \"confidenceRating\": \"high\"\n}" }, "property": "" } ], "citedReferences": [] } ], "_links": { "self": null, "messages": { "href": "https://api.salesforce.com/einstein/ai-agent/v1/sessions/0199c5fd-c4bf-7e1e-9ecf-d164ba754abc/messages" }, "messagesStream": { "href": "https://api.salesforce.com/einstein/ai-agent/v1/sessions/0199c5fd-c4bf-7e1e-9ecf-d164ba754abc/messages/stream" }, "session": { "href": "https://api.salesforce.com/einstein/ai-agent/v1/agents/0XxIc0000008RVPKA2/sessions" }, "end": { "href": "https://api.salesforce.com/einstein/ai-agent/v1/sessions/0199c5fd-c4bf-7e1e-9ecf-d164ba754abc" } } }
Triage data that i am interested in is in the result array, but connector looks for Collect array asp per the reference document. https://docs.mulesoft.com/agentforce-connector/latest/agentforce-connector-reference#Collect
Issue 1: When the connector parses the responses, it seems to be skipping result array.
Issue 2: Also the connector just picks up the message element and assigns to payload, would be good to get the Messages array as a whole as a payload.
My Agentforce agent uses Prompt template with an embedded flow. When i call the agent with the agent API get the below response.
{ "messages": [ { "type": "Inform", "feedbackId": "a7f51944-6ebd-46aa-9722-7e26c7382fb2", "isContentSafe": true, "message": "The referral has been triaged successfully. Let me know if you need further assistance.", "id": "5b3d362b-70d8-4fb7-8cc4-5a281c51af38", "metrics": {}, "planId": "a7f51944-6ebd-46aa-9722-7e26c7382fb2", "result": [ { "type": "copilotActionOutput/Triage_Referral", "value": { "promptResponse": "{\n \"triageRecord\": {\n \"category\": \"Cardiology\",\n \"problem\": \"Chest Pain\",\n \"symptoms\": \"Recent onset chest pain with high probability of IHD\",\n \"priority\": \"P1 Chest pain clinic\"\n },\n \"confidenceRating\": \"high\"\n}" }, "property": "" } ], "citedReferences": [] } ], "_links": { "self": null, "messages": { "href": "https://api.salesforce.com/einstein/ai-agent/v1/sessions/0199c5fd-c4bf-7e1e-9ecf-d164ba754abc/messages" }, "messagesStream": { "href": "https://api.salesforce.com/einstein/ai-agent/v1/sessions/0199c5fd-c4bf-7e1e-9ecf-d164ba754abc/messages/stream" }, "session": { "href": "https://api.salesforce.com/einstein/ai-agent/v1/agents/0XxIc0000008RVPKA2/sessions" }, "end": { "href": "https://api.salesforce.com/einstein/ai-agent/v1/sessions/0199c5fd-c4bf-7e1e-9ecf-d164ba754abc" } } }Triage data that i am interested in is in the result array, but connector looks for Collect array asp per the reference document. https://docs.mulesoft.com/agentforce-connector/latest/agentforce-connector-reference#Collect
Issue 1: When the connector parses the responses, it seems to be skipping result array.
Issue 2: Also the connector just picks up the message element and assigns to payload, would be good to get the Messages array as a whole as a payload.