FreshCart is a demo grocery store app built to show how customer-facing intelligence can span platforms, not stay locked into one ecosystem.
The main goal is to demonstrate a multi-platform integration pattern:
- CRM and customer service workflows are managed through Salesforce Agentforce.
- Product inquiry and product intelligence are handled with Azure OpenAI and the Microsoft Agent Framework.
An orchestrator routes requests to the right platform based on intent.
This project was built to validate a practical architecture where different platforms do what they do best. It also exercises a custom NuGet package that wraps the Salesforce Agentforce REST API as a first-class agent in the Microsoft Agent Framework.
The idea is simple: the future is multi-platform, just like the industry previously evolved toward multi-cloud. Customer success teams need to stay adaptable and flexible, and leverage the best capabilities across systems.
A customer sends a message. An Orchestrator decides which agent and platform should handle it:
- Product questions (prices, sizes, ingredients, recommendations) are answered by a Product Concierge agent powered by Azure OpenAI through the Microsoft Agent Framework.
- Customer service topics (refunds, returns, order issues, shipping, account context) are routed to a Customer Service agent powered by Salesforce Agentforce.
Developers can enable debug mode in the chat UI to see which platform handled each response, making the routing logic and integration boundaries easy to observe.
-
Created an ASP.NET Core web app foundation The app was set up as a .NET web project (
net10.0) with static frontend assets and controller-based APIs. -
Added Microsoft Agent Framework dependencies The project includes Agent Framework packages to create and orchestrate specialized AI agents.
-
Integrated Salesforce Agentforce for CRM flows A dedicated
CustomerServiceAgentwas implemented using the Agentforce REST client, authenticated with OAuth client credentials from environment variables. -
Built a Product Concierge agent on Azure OpenAI A separate
ProductConciergeAgentwas created with Azure OpenAI viaAIProjectClientandDefaultAzureCredentialfor product and catalog questions. -
Created an intent-based Orchestrator agent The
OrchestratorAgentwas configured with routing instructions and tools so each incoming message is directed to exactly one specialist agent. -
Implemented customer session handling Session IDs are tracked per customer conversation to keep context across turns and to support session end operations.
-
Exposed chat APIs for the frontend
ChatControllerexposes:POST /api/chatto send a message and receive the routed responseDELETE /api/chat/session/{customerId}to end a session
-
Built a simple grocery storefront UI The frontend (
wwwroot) includes a product catalog, cart, and chat panel. User messages are posted to the backend API and responses are rendered in chat bubbles. -
Added debug trace visualization Debug mode in the UI renders the routing path so developers can observe which agent/platform handled each request.
-
Connected runtime configuration via
.envThe app loads environment variables at startup (Agentforce domain, key, secret, and agent ID), enabling local development without hardcoding credentials. -
Validated with scenario-driven prompts Product prompts (recommendations, pricing, ingredients) and CRM prompts (refunds, returns, shipping) were used to verify orchestration behavior.
This flow demonstrates a practical multi-platform pattern: route each intent to the best-fit system instead of forcing all workloads into one platform.
flowchart LR
U[Customer in Web UI] --> O[Orchestrator Agent\nMicrosoft Agent Framework]
O -->|Product inquiry| P[Product Concierge Agent\nAzure OpenAI via AIProjectClient]
O -->|CRM and service inquiry| C[Customer Service Agent\nSalesforce Agentforce REST API]
P --> R[Unified response to UI]
C --> R
- .NET 10 SDK (this project targets
net10.0) - Salesforce org with an active Agentforce agent
- Agentforce Connected App configured for OAuth 2.0 client credentials
- Azure access for model inference used by Product Concierge (DefaultAzureCredential)
Create a .env file in the project root and set:
AGENTFORCE_DOMAIN=your-org.my.salesforce.com
AGENTFORCE_CONSUMER_KEY=your-connected-app-consumer-key
AGENTFORCE_CONSUMER_SECRET=your-consumer-secret
AGENTFORCE_AGENT_ID=your-agent-idIf you are using Azure authentication locally, sign in first:
az logindotnet restore
dotnet runOpen the app in your browser at the local URL printed by ASP.NET Core (commonly http://localhost:5000 or https://localhost:5001).
- Start the app with
dotnet run. - Open the FreshCart UI in your browser.
- Ask a product question, for example:
What products do you have for pasta night? - Ask a CRM/service question, for example:
I want to return my last order. - Toggle Debug Mode in the chat panel and verify routing path changes by intent.
- End session from the UI to test session cleanup behavior.
You can also call the backend directly:
curl -X POST http://localhost:5000/api/chat \
-H "Content-Type: application/json" \
-d '{"customerId":"demo-user","message":"I need a refund","sessionId":""}'This is a developer-facing demo. It is not intended for end users or production use.