Inspiration
As an associate warehouse management system consultant professional in the supply chain industry, I’ve constantly seen challenges in maintaining optimal inventory levels across distributed warehouses. Often, warehouse managers are stuck in a reactive loop, manually reviewing reports to catch inventory anomalies. I wanted to leverage Salesforce AI and automation to solve this problem and create a proactive agent to notify and assist in inventory rebalancing decisions in real-time.
What it does
The AI-Driven Smart Inventory Rebalancing Agent monitors inventory levels across warehouse locations using data uploaded to Salesforce Data Cloud. It automatically identifies understocked and overstocked items based on predefined thresholds and notifies inventory managers by: Sending emails detailing affected locations and quantities. Posting Slack messages to relevant channels for quick action. The system works through a Salesforce Agentforce Agent that uses LLM-powered logic to trigger autolaunched flows, process Data Cloud records, and carry out smart notifications without user input.
How we built it
- Data Source Integration: Exported inventory details as .csv from the Manhattan Warehouse Management System (WMS) sandbox. Ingested data into Salesforce Data Cloud via Data Streams and mapped to a Data Model Object (Inventory_Details_CSV__DMO).
- Automation Flows: Built two Autolaunched Flows: One to identify understocked locations. One for overstocked scenarios. These flows: Filter inventory using custom logic. Loop through records. Generate dynamic email and Slack messages.
- Agentforce Agent: Created an agent action (Getting_inventory_Details_3) that connects to the understocked flow. Provided LLM instructions to interpret when to trigger actions, based on data patterns.
- Notifications: Slack API integration for real-time alerts. Salesforce Send Email action configured with string formatting and logic. (Which has a limit for number of emails sent. So, it may show error in this environment if the limit is over.) Included handling for edge cases like no recipient or missing fields.
- End-to-End Testing: Verified flows using Data Cloud test records. Confirmed emails and Slack messages are received as expected.
Challenges we ran into
- Authentication errors with the original Manhattan WMS API (as we couldn't get the OAuth credentials), fallback to CSV ingestion.
- Issues with Salesforce YAML schema validation in Ingestion API.
- Salesforce flow limitations around collection variables in the Email body.
- Auto-generated problem records in Data Lake Objects during stream setup.
- Designing a fully LLM-instructable agent that works seamlessly with auto-launched flows.
Accomplishments that we're proud of
- Fully functional Agent force integration with no user input required.
- Delivered real-time email + Slack alerts from uploaded CSV data using only native Salesforce tools like salesforce with slack.
- Successfully built custom Agent Action Instructions, Inputs, and Outputs that work without prompting.
- Cleaned, transformed, and uploaded real inventory data with structured flow-based decision logic.
- Learned to combine Data Cloud, Flows, and Agent force into a practical working agent.
What we learned
- How to use Salesforce Data Cloud to store and map structured data.
- Best practices for designing auto launched flows from scratch with dynamic variables.
- Crafting actionable, LLM-readable Agent Action instructions.
- Limitations of Email action and workaround methods.
- Troubleshooting data stream and data lake object ingestion issues.
What's next for AI-Driven Smart Inventory Rebalancing Agent
- Integrate a rebalance recommendation engine to suggest inventory transfers between locations.
- Enable bi-directional Slack interactivity (e.g., allow managers to approve rebalance from Slack).
- Schedule automated uploads or API ingestion for real-time warehouse syncs.
- Include dashboard visualizations for inventory levels and alerts.
- Expand to multi-item support with user-triggered agent prompts.
- Add support for Auto Tendering rules based on inventory imbalances.
Built With
- agentforce
- ai
- api
- cloudsalesforce
- csv
- data
- excel
- flow
- salesforce
- slack
- webhooks)
Log in or sign up for Devpost to join the conversation.