Salesforce Agent
This workflow leverages AI to optimize business conversations by integrating a query function to the Salesforce database. Its main function is to provide conversational responses to the inputs of
Salesforce Agent Workflow Documentation
🧩 Overview
The Salesforce Agent workflow automates conversational interactions that require real‑time access to Salesforce data. A user submits a query through the chat interface, the agent (powered by an OpenAI language model) interprets the request, optionally queries Salesforce via a dedicated tool, and returns a natural‑language response. This streamlines data retrieval and decision support directly within a chat environment.
⚙️ Main Features
- Seamless integration of an OpenAI language model for natural‑language understanding.
- Built‑in Salesforce query tool to fetch real‑time data.
- Context‑aware agent that manages tool usage and conversation state.
- Real‑time chat output displayed in the Playground UI.
- Configurable streaming of model responses and structured output schemas.
🔄 Workflow Steps
| Component Name | Role in the Workflow | Key Inputs | Key Outputs |
|---|---|---|---|
| Chat Input | Receives the user’s message and optional files. | Text input, conversation ID, sender details. | Structured chat message. |
| Advanced Agent | Orchestrates the LLM and tools, executes queries, and generates the reply. | User message, OpenAI model, Salesforce tool. | Agent’s text response. |
| Chat Output | Displays the agent’s reply to the user. | Response text, sender metadata, session ID. | Visible chat message. |
Note: The OpenAI Model supplies the language model instance used by the agent, while the Salesforce Tool provides the query capability. These components are configured as inputs to the Advanced Agent but are not part of the linear execution path.
🧠 Notes
- The workflow requires valid OpenAI API credentials; the API key must be stored securely in the environment.
- Salesforce credentials (username, password, security token, domain) are required for the Salesforce Tool to connect to the org.
- The agent uses the
gpt-4o-minimodel by default; this can be adjusted in the OpenAI Model settings. - Streaming is disabled by default; enable it in the Advanced Agent settings if incremental response delivery is desired.
- Structured output schemas are optional; if enabled, the agent must return JSON that conforms to the defined schema.
- The conversation is maintained per session ID (
Saleforcein the example); changing the session ID creates an isolated chat thread.