Build a Rural Artisan Group Bulk Order Quote Negotiator — implementation
Linked challenge: Build a Rural Artisan Group Bulk Order Quote Negotiator
Prompt source
implementation67 lines11 sectionsNo variables1 code block
## Build
Process buyer requests for bulk custom artisan crafts using Beckn quoting schemas. Calculate cooperative production capacity based on daily limits and material lead times, and generate structured multi-tier price quotes.
## User
Rural craft cooperative catalog manager
## Workflow
1. Ingest buyer requests for bulk custom artisan craft orders via simplified Beckn quoting schemas.
2. Extract requested quantities, customization requirements, and delivery timelines from the request.
3. Calculate feasible production capacity and raw material lead times using cooperative constraints.
4. Generate a structured price quote indicating feasibility, lead time, and validity horizons.
## Interface
Artisan cooperative dashboard showing incoming bulk requests, capacity calculations, and generated quote previews.
## Data
Generate synthetic buyer request datasets and cooperative production profiles specifying daily capacity and raw material lead times.
Starter examples below are synthetic. They are not downloaded records.
## Source
[Beckn protocol specifications](https://raw.githubusercontent.com/beckn/protocol-specifications/master/README.md)
Applies Beckn Protocol Core specifications for ordering events, specifically quote calculation and negotiation.
## Tools
pydantic-ai, fastapi, pandas.
Pydantic AI orchestrates the extraction of request parameters and ensures the calculated quote adheres to a strict schema.
Language model capable of extracting numerical constraints and generating structured commercial negotiation responses.
## Deliverables
Submit runnable source, pinned dependencies, setup commands, a working interface, example outputs, and a recorded end-to-end demo. Include tests and an action log.
## Acceptance
- Successfully parses bulk order requests into structured internal parameters.
- Accurately calculates total lead time as (requested quantity / daily capacity) + material lead time.
- Marks the quote as CAPACITY_EXCEEDED_REJECTED if the calculated lead time exceeds the requested delivery days.
## Starter Examples
```json
[
{
"input": {
"request_id": "REQ-001",
"requested_quantity": 200,
"delivery_days_requested": 30,
"daily_capacity": 10,
"material_lead_time_days": 5
},
"expected_output": {
"capacity_feasible": true,
"estimated_lead_time_days": 25,
"unit_price_tier_1": 1200,
"quote_status": "READY_FOR_BUYER",
"note": "Simplified synthetic app record, not official schema"
}
},
{
"input": {
"request_id": "REQ-002",
"requested_quantity": 500,
"delivery_days_requested": 15,
"daily_capacity": 10,
"material_lead_time_days": 10
},
"expected_output": {
"capacity_feasible": false,
"estimated_lead_time_days": 60,
"unit_price_tier_1": null,
"quote_status": "CAPACITY_EXCEEDED_REJECTED",
"note": "Simplified synthetic app record, not official schema"
}
}
]
```
## Safety
Ensures no real B2B commercial data is exposed; relies entirely on synthetic capacity and request mockups.
Use mock external writes. Require human review before any real deployment.