Agent Operations
[Conversation] Start
The Start Conversation
operation is used to start a conversation with a defined agent.

Input Fields
Module Configuration
This refers to the Agentforce configuration set up in the getting started section.
General Operation Fields
- Agentslist: This field contains the available and active agents in Agentforce. It is important to make sure that the agent is assigned to the connected app, which is used in the Mule app to connect to Salesforce.
XML Configuration
Below is the XML configuration for this operation:
<ms-agentforce:start-agent-conversation
agent="0XxHs000000uuUzKAI"
doc:name="Start agent conversation"
doc:id="5d600a2b-8361-46c9-884c-8aed36d73ffa"
config-ref="Agentforce_Config"
/>
Output Field
Payload Fields
- sessionId: This field holds the sessionId of the started conversation. This id must be used in the continue conversation and end conversation. By using the sessionId, it is guaranteed that the agent remembers the history of the conversation, unless it has been ended.
Attributes
- messages: This field contains additional data along the message by the agent.
This operation responds with a json
payload.
Example Response
Below is an example output for this operation:
{
"payload": {
"sessionId": "b5e760b7-89d9-4989-aa32-9939b6daee1a"
},
"attributes": {
"messages": [
{
"reason": null,
"feedbackId": "",
"contentSafe": false,
"message": "Hi, I'm an AI service assistant. How can I help you?",
"type": "Inform",
"planId": "",
"id": "4ff04f2b-05a6-4686-bd84-558a8543e577"
}
]
}
}
[Conversation] Continue
The Continue Conversation
operation is used to continue a conversation with a defined agent by using the previously generated sessionId.

Input Fields
Module Configuration
This refers to the Agentforce configuration set up in the getting started section.
General Operation Fields
- Message: This field contains the message (prompt) to the agent.
- Session Id: This field contains the sessionId of a conversation.
- Message Sequence Number: A number that you provide to represent the sequence ID. Increase this number for each subsequent message in this session.
XML Configuration
Below is the XML configuration for this operation:
<ms-agentforce:continue-agent-conversation
doc:name="Continue agent conversation"
doc:id="d742f501-1260-4ead-b95a-e3d73cb35479"
config-ref="Agentforce_Config" messageSequenceNumber="10">
<ms-agentforce:message ><![CDATA[#[payload.prompt]]]></ms-agentforce:message>
<ms-agentforce:session-id ><![CDATA[#[payload.sessionId]]]></ms-agentforce:session-id>
</ms-agentforce:continue-agent-conversation>
Output Field
Payload Fields
- payload: This field holds the message from the agent.
Attributes
- messages: This field contains additional data along the message by the agent.
This operation responds with a json
payload.
Example Response
Below is an example output for this operation:
{
"payload": "Sure, I can help with that! Could you please provide your email address so I can look up your contact record?",
"attributes": {
"messages": [
{
"reason": null,
"feedbackId": "a7952ab0-befc-4f5d-acd8-5c1e61c68f11",
"contentSafe": false,
"message": "Sure, I can help with that! Could you please provide your email address so I can look up your contact record?",
"type": "Inform",
"planId": "a7952ab0-befc-4f5d-acd8-5c1e61c68f11",
"id": "df968408-edbd-46d6-aaef-816386cbbbb7"
}
]
}
}
[Conversation] End
The End Conversation
operation is used to end a conversation with a defined agent by using the previously generated sessionId.

Input Fields
Module Configuration
This refers to the Agentforce configuration set up in the getting started section.
General Operation Fields
- Session Id: This field contains the sessionId of a conversation.
XML Configuration
Below is the XML configuration for this operation:
<ms-agentforce:end-agent-conversation
doc:name="End agent conversation"
doc:id="28936074-6a24-4aeb-a0a9-b215d85121d5"
config-ref="Agentforce_Config">
<ms-agentforce:session-id ><![CDATA[#[payload.sessionId]]]></ms-agentforce:session-id>
</ms-agentforce:end-agent-conversation>
Output Field
Payload Fields
- payload: This field holds status of the conversation, if successful Session Ended is displayed.
Attributes
- messages: This field contains additional data along the message by the agent.
This operation responds with a json
payload.
Example Response
Below is an example output for this operation:
{
"payload": "Session Ended",
"attributes": {
"messages": [
{
"reason": "ClientRequest",
"feedbackId": "",
"contentSafe": false,
"message": null,
"type": "SessionEnded",
"planId": null,
"id": "72d5fb28-a0fe-4ce9-b582-4d39f6f0a920"
}
]
}
}
Example Use Cases
Prompt templates can be used in various scenarios, such as:
- Customer Service Agents: For customer service teams, prompt templates can be very useful to provide case summaries, case classifications, summarizing large datasets, and more.
- Sales Operation Agents: For sales teams, prompt templates help with writing sales emails, summarizing cases for specific accounts, assessing the probability to close deals, and more.
- Marketing Agents: For marketing teams, prompt templates can help generate product descriptions, create newsletters, plan social media campaigns, and more.