Local Commerce Grid
Independent stores working as one local fulfillment network.
Local Commerce Grid is a Slack-native commerce agent that helps independent retailers save sales together. When one store is out of stock, Grid finds a safe match at another nearby merchant, explains the recommendation, asks for human approval, reserves the inventory exactly once and coordinates the handoff through completion.
The result is marketplace-level availability without forcing merchants to give up their customer relationships, margins or private commercial data.

Inspiration
Independent stores lose sales for a frustrating reason: the product a customer wants often exists a few blocks away, but local merchants have no shared fulfillment layer to find it and move it in time.
Large marketplaces solve this with centralized inventory, logistics and customer data. That convenience comes with a difficult tradeoff for small merchants. They can gain reach while losing control of the relationship, their margins and valuable commercial intelligence.
We asked a different question: what if local stores could coordinate like one network without becoming one centralized marketplace?
Slack was the natural coordination layer. Merchants already use it to communicate, approve work and handle exceptions. Local Commerce Grid turns that familiar workspace into a private, consent-driven fulfillment network.
What it does
Grid takes a plain-language customer request such as:
Find 2 pairs of Aster Runner blue size 9 within 25 minutes
It then runs a complete commerce workflow inside Slack:
- Captures the exact product, variant, quantity and deadline.
- Uses Slack's native agent experience to interpret the request and show live progress.
- Calls the Commerce MCP server to ask nearby merchant agents for fulfillment offers.
- Lets each merchant evaluate its own inventory, forecast and safety-stock rules privately.
- Ranks only the safe offers and explains why alternatives were rejected.
- Requests explicit approval from the supplying merchant.
- Shows the supplying merchant an agreed fulfillment credit before approval.
- Reserves inventory atomically so the same units cannot be promised twice.
- Tracks preparation, pickup, transit and completion in Slack.
- Produces an impact receipt with the sale saved, revenue retained locally, units rebalanced, delivery time and transfer distance.

The working product
1. Capture demand in Slack
Merchants can start in the Grid Messages tab, click a suggested prompt, use the Find in Grid modal, mention Grid in a channel or run the /grid slash command.

2. Get an explainable recommendation
Grid does not simply return the nearest store. It checks whether a transfer would leave each supplier above its private safety-stock and forecast thresholds. It also checks whether the item can arrive before the customer's deadline.
In the sample transaction, City Kicks is selected because it can transfer two units in 14 minutes while remaining safely stocked. Oak & Sole is rejected because the transfer would create a projected stockout. Runner's Corner is rejected because it cannot meet the deadline.

3. Keep the merchant in control
The supplying merchant sees the requested quantity, post-transfer inventory, demand forecast, ETA and transfer credit before anything moves. Inventory is not reserved until that merchant clicks Approve & reserve.

4. Align incentives through shared-sale economics
Grid gives both merchants a reason to collaborate. The requesting store saves the sale and keeps its customer relationship. The supplying store moves useful inventory and receives an agreed fulfillment credit. Instead of losing the entire transaction to a large marketplace, local merchants share the value they create.
The working sample shows a ₹320 fulfillment credit to the supplying merchant before approval. A future settlement layer can also give the requesting store a configurable referral credit for originating the customer request. That extension is part of the roadmap and is not represented as a completed payment integration today.
5. Coordinate fulfillment
After approval, Grid moves the transaction through a controlled state machine: preparing, ready, in transit and fulfilled. Every action is visible in Slack and invalid state changes are rejected.


6. Measure local impact
The final receipt makes the outcome concrete. In the demonstrated transaction, Grid retains ₹7,998 inside the local merchant network, rebalances two units and completes a 1.4 km transfer in 14 minutes.
These values come from the working sample transaction and are not claimed pilot results.

How we built it
Local Commerce Grid deliberately separates conversational intelligence from commerce authority.
Slack-native agent experience
The product uses Slack's native agent Messages tab, suggested prompts, thread status and generated thread titles. App Home provides network metrics and a structured entry point. Block Kit messages, modals, buttons, direct messages, channel mentions and the /grid slash command keep the complete workflow inside Slack.
The Slack app uses Bolt for JavaScript and Socket Mode. It subscribes to direct messages, app mentions, App Home opens and agent context changes. The assistant:write scope enables the native agent experience.

Real MCP integration
The coordinator is a real MCP client. It communicates with a Commerce MCP server over an in-process transport using the official Model Context Protocol SDK. The server exposes seven typed tools:
search_catalogsource_demandrequest_supplier_approvalreserve_inventoryadvance_fulfillmentget_network_snapshotreset_demo
This is not a label placed on ordinary function calls. Tool inputs are validated with Zod, calls cross an MCP client/server boundary and the tool layer can be audited independently from Slack presentation code.
Safe commerce engine
OpenAI's Responses API is optional and has one narrow role: converting plain language into a typed demand request. A deterministic fallback parser keeps the complete demo functional without a model key.
All consequential decisions remain deterministic. The Grid engine owns inventory checks, private merchant policy, deadline matching, ranking, reservation, money, idempotency and valid fulfillment transitions. A language model never decides whether stock can move.
Privacy model
Each merchant policy engine evaluates local inventory, forecast and safety stock within its own boundary. The coordinator receives a limited fulfillment offer or a rejection reason. It does not receive the merchant's complete inventory position, sales history, margins or demand model.
The sample sandbox represents merchants as isolated policy contexts and store channels so reviewers can test the complete flow in one workspace. The production design connects separate merchant workspaces through approved coordination surfaces.
Architecture

The application is written in modern JavaScript on Node.js. It is tested with Vitest and ESLint, versioned on GitHub and deployed as a production Socket Mode service on Railway.
Challenges we ran into
Protecting privacy while still explaining the result
A useful recommendation needs evidence, but exposing every store's stock and sales history would defeat the product's purpose. We designed a narrow offer contract that shares only what the coordinator needs: fulfillable quantity, ETA, distance, transfer credit and a policy-safe explanation.
Making AI useful without giving it control of inventory
Natural-language input benefits from a model, while inventory and financial decisions require predictable rules. Separating intent parsing from the deterministic commerce engine gave us a flexible interface without probabilistic reservations or routing.
Coordinating human consent with atomic execution
Approval and reservation cannot be treated as the same casual button click. We created an explicit approval state, an idempotent reservation operation and a fulfillment state machine so retries cannot double-reserve stock or skip required steps.
Building a complete native Slack experience
The workflow spans agent messages, App Home, modals, Block Kit actions, direct messages, mentions, slash commands and live status updates. Keeping the state consistent across every Slack surface required a shared transaction model and careful action handling.
Accomplishments that we're proud of
- A complete working flow runs inside Slack from demand capture to final impact receipt.
- Slack's native agent capabilities are visible in the Messages tab through prompts, status updates and thread titles.
- A real MCP client/server boundary exposes seven validated commerce tools.
- Recommendations explain both the winning match and rejected alternatives.
- Merchant approval is required before an atomic inventory reservation.
- The supplying merchant sees a clear fulfillment credit before deciding whether to participate.
- Fulfillment follows a deterministic and auditable state machine.
- App Home and the final receipt quantify sales saved, revenue retained and inventory rebalanced.
- The hosted Railway service exposes a health endpoint for Slack and MCP connection status.
- Automated tests cover Slack agent configuration, offer ranking, rejection reasons, the MCP boundary, reservation safety, fulfillment transitions and parsing fallback.
What we learned
The strongest role for AI in commerce is often translation and coordination, not unchecked decision-making. A model can make a complex system easy to talk to, while deterministic tools protect inventory and money.
Explainability also changes behavior. A merchant is more likely to trust a network recommendation when Grid can show that another store was excluded to prevent its stockout or because it could not meet the customer deadline.
Most importantly, a shared network does not require a shared database. Carefully designed agents and narrow tool contracts can create collective capability while leaving sensitive data with its owner.
Slack Agents for Good Track: What impact does your project have?
Local Commerce Grid is designed to strengthen local economic resilience.
Independent merchants often compete against the logistics and availability of giant marketplaces one store at a time. Grid lets them compete as a network. A shop can save a customer relationship when its own shelf is empty. A nearby merchant can move useful inventory and earn a fulfillment credit. The sale, margin and customer connection remain in the local business community.
This shared-sale model makes cooperation economically sustainable. The requesting store retains the customer and avoids a lost sale. The supplying store earns for contributing inventory. A future referral credit can reward the store that originated the request, with the split controlled by merchant-approved network policy.
The privacy model matters to that impact. Merchants should not have to surrender raw inventory, sales patterns or margins to participate. Grid asks each store to share only a safe offer. Human approval remains mandatory before stock moves.
Grid can also reduce avoidable long-distance fulfillment by finding inventory already available nearby. The impact receipt makes every outcome measurable through revenue retained locally, units rebalanced, merchants involved, time to fulfillment and transfer distance.
Our next impact milestone is a small merchant pilot where we can measure saved-sale rate, fulfillment speed, local revenue retention, stockout avoidance and merchant trust with real consent.
What's next for Local Commerce Grid
- Connect real point-of-sale and ecommerce systems so availability updates automatically.
- Support separate merchant Slack workspaces with secure network membership and identity.
- Add courier and pickup integrations for live local handoffs.
- Introduce settlement, reconciliation, configurable referral credits and merchant reputation tools.
- Expand beyond footwear into books, hardware, pharmacy-safe nonprescription goods and other local retail categories.
- Give merchants configurable policies for transfer credits, service radius, protected stock and operating hours.
- Pilot with a small neighborhood merchant association and publish measured outcomes with participant consent.
Built With
- Slack AI capabilities
- Slack native agent Messages tab
- Slack Agent APIs and
assistant:write - Slack Bolt for JavaScript
- Slack App Home
- Slack Block Kit
- Slack modals and interactivity
- Slack slash commands
- Slack Socket Mode
- Slack developer sandbox
- Model Context Protocol (MCP)
- Official MCP TypeScript SDK
- OpenAI Responses API
- Node.js
- JavaScript
- Zod
- Vitest
- ESLint
- Railway
- GitHub
Try it
- Open the Local Commerce Grid Slack sandbox.
- Open Grid under Agents & apps.
- Open the Home tab and click Reset sample data.
- Open the Messages tab.
- Send
Find 2 pairs of Aster Runner blue size 9 within 25 minutes. - Request merchant approval, approve the reservation and advance the fulfillment through completion.
You can also run:
/grid find 2 pairs of Aster Runner blue size 9 within 25 minutes
Project links
- Live product: https://grid-agent-production.up.railway.app/
- Slack developer sandbox: https://local-commerce-grid.enterprise.slack.com/
- Source code: https://github.com/jayshreeanand/local-commerce-grid
- Slack App ID:
A0BH0MZUZRQ - Production health: https://grid-agent-production.up.railway.app/health
Built With
- javascript
- mcp-typescript-sdk
- model-context-protocol-(mcp)
- node.js
- openai-responses-api
- railway
- slack-agent-apis
- slack-agent-view
- slack-ai-capabilities
- slack-block-kit
- slack-bolt-for-javascript
- slack-events-api
- slack-socket-mode
- slack-web-api
- zod

Log in or sign up for Devpost to join the conversation.