Back to prompt library
Build an Open Network Logistics Accessibility and Drop-Off Coordinator — implementation
Linked challenge: Build an Open Network Logistics Accessibility and Drop-Off Coordinator
Prompt source
implementation140 lines11 sectionsNo variables1 code block
## Build
Coordinate mock last-mile courier assignments across decentralized delivery networks using Beckn protocol schemas. Match specialized recipient accessibility requirements with courier physical mobility parameters.
## User
Delivery hub operations coordinator managing accessible parcel dispatch for elderly and mobility-impaired recipients.
## Workflow
1. Parse incoming Beckn fulfillment requests containing recipient accessibility constraints and landmark directions.
2. Cross-reference courier equipment capabilities and delivery vehicle access constraints against recipient physical barriers.
3. Synthesize a validated Beckn on_confirm fulfillment packet containing step-by-step accessible drop-off instructions.
4. Simulate asynchronous callback telemetry and generate exception manifests when courier parameters do not meet accessibility needs.
## Interface
Dispatcher workspace showing pending fulfillment orders, courier constraint filters, and generated Beckn protocol callback logs.
## Data
Generate 30 synthetic Beckn fulfillment payloads containing varying accessibility profiles (staircase-only, elevator outage, landmark drop-off) stored in local JSON format.
Starter examples below are synthetic. They are not downloaded records.
## Source
[Beckn protocol specifications](https://raw.githubusercontent.com/beckn/protocol-specifications/master/README.md)
Uses Beckn protocol core transaction packet structure with context and message separation and asynchronous server-to-server callback conventions.
## Tools
langgraph, fastapi, pydantic.
LangGraph manages stateful multi-step routing logic between incoming Beckn order intents, constraint matching, and callback generation.
Local or hosted LLM with multi-step reasoning capabilities and JSON mode output.
## 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
- Validates incoming Beckn context headers including domain, action, and transaction_id.
- Correctly matches courier vehicle and physical capacity against building barrier profiles.
- Outputs compliant Beckn on_confirm message payloads with complete fulfillment metadata.
- Generates a structured exception notice when accessibility criteria cannot be fulfilled.
## Starter Examples
```json
[
{
"input": {
"context": {
"domain": "nic2004:55204",
"action": "confirm",
"transaction_id": "tx_logistics_101",
"bap_id": "mock_buyer_app.org",
"bpp_id": "mock_logistics_pp.org"
},
"message": {
"order": {
"id": "ord_9901",
"fulfillment": {
"end": {
"location": {
"address": "Flat 302, Green Heights, Pune",
"accessibility_flags": [
"elevator_available",
"wheelchair_ramp"
]
}
}
}
},
"courier_profile": {
"courier_id": "c_44",
"transport_mode": "two_wheeler",
"max_carry_weight_kg": 15
}
}
},
"expected_output": {
"context": {
"domain": "nic2004:55204",
"action": "on_confirm",
"transaction_id": "tx_logistics_101"
},
"message": {
"order": {
"id": "ord_9901",
"status": "ACCEPTED",
"fulfillment": {
"state": "ASSIGNED",
"assigned_courier_id": "c_44",
"dropoff_instructions": "Use ground ramp and take elevator directly to floor 3."
}
}
},
"accessibility_matched": true
}
},
{
"input": {
"context": {
"domain": "nic2004:55204",
"action": "confirm",
"transaction_id": "tx_logistics_102",
"bap_id": "mock_buyer_app.org",
"bpp_id": "mock_logistics_pp.org"
},
"message": {
"order": {
"id": "ord_9902",
"fulfillment": {
"end": {
"location": {
"address": "Floor 4, Old Chawl, Girgaon, Mumbai",
"accessibility_flags": [
"staircase_only",
"narrow_corridor",
"weight_heavy_25kg"
]
}
}
}
},
"courier_profile": {
"courier_id": "c_12",
"transport_mode": "bicycle",
"max_carry_weight_kg": 10
}
}
},
"expected_output": {
"context": {
"domain": "nic2004:55204",
"action": "on_confirm",
"transaction_id": "tx_logistics_102"
},
"message": {
"order": {
"id": "ord_9902",
"status": "REJECTED",
"fulfillment": {
"state": "UNASSIGNED",
"assigned_courier_id": null,
"dropoff_instructions": null
}
}
},
"accessibility_matched": false,
"rejection_reason": "courier_weight_and_staircase_limit_exceeded"
}
}
]
```
## Safety
All carrier allocations and status callbacks are executed in a simulated sandbox environment without actual financial or delivery liabilities.
Use mock external writes. Require human review before any real deployment.