LangGraph blueprint · Logistics & Retail
Supply-chain disruption planner
When a route breaks, agents find the affected orders, price the options and wait for a planner's choice.
- Steps
- 7
- Subjective questions
- 32
- Objective questions
- 32
The problem and the outcome
Problem: A port strike or storm leaves planners rebuilding shipments by hand in spreadsheets.
Outcome: Ranked recovery options within the hour, and customers told the new dates.
Architecture
How it works, step by step
- News, weather or carrier feeds report a disruption, such as a port strike.
- An impact agent finds which open orders and products travel through that route.
- A planner agent proposes options: reroute, switch supplier or ship from another warehouse.
- It requests live quotes and transit times from carrier APIs.
- Each option is simulated for cost, delay and stock-out risk.
- A human planner picks an option; the agent never books on its own.
- Affected customers and suppliers are notified with the new dates.
Tech stack
- LangGraph multi-agent
- ERP and inventory APIs (SAP, Oracle)
- Carrier rate and transit-time APIs
- Simulation / optimisation code
- Planner approval UI
Key design decisions
- Agents propose options; costs and delays come from simulation code and live quotes, not the model's estimates.
- A planner chooses; the system never books shipments on its own.
- Customer notifications go out only after a plan is approved.
Common mistakes
- Letting the model invent freight rates or transit times.
- Optimising only cost and ignoring stock-out risk for key customers.
- Notifying customers before the plan is confirmed.
What to measure
- Time from disruption to approved plan
- Orders delivered on the new date
- Extra freight cost
- Stock-outs avoided
Most-asked interview questions
Subjective questions 32
1Design a supply-chain disruption planner with LangGraph.Asked almost every time
Ingest disruption signals (port closures, supplier delays, weather, strikes), match them to affected purchase orders and shipments, then run parallel branches: find alternative suppliers, alternative routes and inventory reallocation. A simulation node computes cost, delay and service impact with code. The planner ranks options, explains trade-offs and pauses for a planner's approval before updating orders and notifying customers.
2How do you identify which orders a disruption affects?Asked almost every time
Join the disruption's location, supplier or lane with open purchase orders, shipments in transit and bills of materials, then propagate to finished goods and customer orders that depend on them, prioritised by due date and value.
3How do you rank recovery options?Asked almost every time
Score each option by total cost (freight, expediting, penalties), delay against customer due dates, service level, risk and capacity, with weights agreed by the business, and show the top options with their trade-offs rather than one answer.
4Why use code for the cost and delay simulation instead of the model?Very often asked
Numbers must be correct and reproducible. Code applies real rates, transit times, inventory levels and constraints the same way every time. The model is good at understanding the situation and proposing options; the calculation belongs in deterministic tools.
5Why should the simulation be code, not the model?Very often asked
Costs, lead times and inventory projections must be exact and reproducible; code uses real rates and constraints, while the model explains results and drafts communications.
6How do you get reliable freight rates and lead times?Very often asked
Use contracted rate tables, carrier APIs and historical lane performance, with freshness dates, rather than letting the model estimate prices.
7How do you monitor disruption signals?Very often asked
Subscribe to carrier and port status feeds, supplier updates, news and weather APIs, classify relevance with filters and a model, deduplicate, and score severity before triggering planning.
8How do you handle inventory reallocation between warehouses?Very often asked
Check available stock, safety stock and transfer lead times, simulate the effect on each region's service level, and propose transfers that protect priority customers.
9When should customers be informed?Very often asked
As soon as a delay to their committed date is confirmed (after planner approval), with the new estimated date and options, rather than waiting until the original date passes.
10How do you measure the planner's value?Very often asked
On-time delivery under disruptions, cost of recovery versus baseline, time from signal to plan, planner acceptance rate and customer complaints.
11How do you handle uncertainty in disruption duration?Very often asked
Model scenarios (short, expected, long), compute options for each, and prefer robust choices or staged decisions that can be revised as information arrives.
12How do you design the planner's graph from disruption to approved plan?Very often asked
A detection node turns signals into a disruption record, an impact node finds affected parts, orders and customers through the bill of materials, parallel branches generate options (expedite, reroute, reallocate, alternate supplier), a simulation node costs each with code, then an approval interrupt waits for the planner before writing changes back.
13How do you balance cost against service level when choosing a plan?Very often asked
Score each option on total cost, number of late orders weighted by customer priority and penalties, and risk, show the trade-offs side by side, and let planners set weights per product line; never pick automatically when the options trade revenue against cost.
14How would you rank recovery options?Often asked
Score each on total cost, delivery delay, stock-out risk and customer priority, with weights the business sets. Show the trade-offs side by side, highlight the recommended option and explain why, and let the planner choose.
15What makes a good disruption signal?Often asked
Reliable and early: carrier status feeds, port and weather alerts, supplier notifications and news, each with a location and expected duration that can be matched to routes and orders.
16How do you integrate with ERP systems?Often asked
Read purchase orders, inventory and BOMs from the ERP (SAP, Oracle, Dynamics) via APIs, and write approved changes back through controlled transactions with audit trails.
17How do you find alternative suppliers?Often asked
Search approved supplier lists by part or material, check qualification status, capacity, price and lead time, and flag suppliers that need qualification before use.
18What does the planner approval step show?Often asked
Affected orders, ranked options with cost and delay, assumptions, risks, and the customer communications that will be sent, with buttons to approve, modify or request more options.
19How do you avoid alert fatigue from minor disruptions?Often asked
Set severity thresholds by impact on orders and customers, batch low-impact signals into daily summaries, and only trigger full planning for material risks.
20How do you test the planner?Often asked
Replay past disruptions with historical data, compare recommended options with what planners chose and the actual outcomes, and test edge cases like multiple simultaneous disruptions.
21How do you handle multiple disruptions at once?Often asked
Aggregate affected orders across disruptions, solve allocation jointly where resources are shared (inventory, capacity), and prioritise by customer and margin.
22What is safety stock and how does it relate?Often asked
Extra inventory held to absorb variability in demand and supply; the planner uses it as a buffer but should flag when using it risks future shortages.
23How do you explain recommendations to planners?Often asked
Show the calculation inputs, assumptions and the reasons an option ranks higher, in business language with links to data, so planners can challenge them.
24How do you handle a supplier's partial shipment?Often asked
Record the received quantity, recompute shortages for the missing part, allocate the received stock to the highest-priority orders first, and trigger options only for the remaining gap.
25How do you include carbon emissions in recovery options?Often asked
Estimate emissions per option from mode, distance and weight using standard factors, show them next to cost and service impact, and let policy cap high-emission options such as air freight unless the business impact justifies it.
26How would you forecast demand changes caused by a disruption?Often asked
Combine the baseline forecast with known effects such as customers pulling orders forward or substituting products, use signals from order intake and sales teams, and show scenarios rather than a single number when uncertainty is high.
27How do you keep the planner from recommending infeasible plans?Often asked
Check every option against constraints in code: capacity at plants and warehouses, carrier availability, supplier qualification, minimum order quantities and customs lead times, and drop options that violate them before they reach planners.
28What is a bill of materials (BOM)?Sometimes asked
The list of components and quantities needed to make a product; it is how a part shortage is traced to affected finished goods.
29How do you keep data fresh for planning?Sometimes asked
Sync ERP and logistics data frequently, show data timestamps in plans, and re-run plans when key inputs change.
30How do you roll out the planner?Sometimes asked
Start with one region or product line in advisory mode, compare with planners' decisions, then expand and allow more automated steps.
31What should be logged?Sometimes asked
Signals received, affected orders identified, options computed, the chosen plan, approvals and changes written to the ERP.
32How do you share disruption plans with suppliers and customers?Sometimes asked
Publish agreed changes through the existing portals or EDI messages, send revised dates and quantities, and record acknowledgements, so partners work from the same plan.
Objective questions 32
1Freight costs in the simulation should use…Asked almost every time
Why: Prices must be exact.
2Before orders change, the recovery plan needs…Asked almost every time
Why: Approval before changing orders.
3When should customers be told new dates?Asked almost every time
Why: Early notice builds trust.
4Where should freight rates come from?Very often asked
Why: Rates change constantly, so they must come from live sources.
5Why use code for the cost simulation?Very often asked
Why: The model explains results.
6How should recovery options be presented?Very often asked
Why: Planners choose with context.
7What links a part shortage to finished goods?Very often asked
Why: Propagate impact through BOMs.
8How is uncertain disruption length handled?Very often asked
Why: Revise as information arrives.
9Which metric shows the planner's value?Very often asked
Why: Track it alongside recovery cost.
10Minor disruptions should be…Very often asked
Why: Thresholds avoid alert fatigue.
11Each recovery option is costed by…Very often asked
Why: Costs must be reproducible and correct.
12When options trade revenue against cost, the choice should be…Very often asked
Why: Business priorities need human judgement.
13Who confirms the recovery plan?Often asked
Why: The planner owns the decision and its cost.
14When should customers be told the new dates?Often asked
Why: Sharing unconfirmed dates causes confusion and lost trust.
15Alternative suppliers must be checked for…Often asked
Why: Unqualified suppliers add risk.
16Approved changes are written back to…Often asked
Why: Controlled transactions.
17How is the planner tested?Often asked
Why: Compare with real outcomes.
18Safety stock is…Often asked
Why: Using it may risk future shortages.
19Multiple simultaneous disruptions need…Often asked
Why: Shared resources overlap between disruptions.
20Recommendations should show…Often asked
Why: Planners can challenge them.
21Disruption signals come from…Often asked
Why: Classify relevance and severity.
22Inventory reallocation must consider…Often asked
Why: Protect priority customers.
23Partially received stock should be allocated to…Often asked
Why: Priority allocation limits the damage.
24Carbon impact of an option is estimated from…Often asked
Why: Standard factors convert transport into emissions.
25Infeasible options are removed by…Often asked
Why: Planners should only see workable plans.
26Demand during a disruption is best shown as…Often asked
Why: Scenarios make uncertainty explicit.
27Plans should display…Sometimes asked
Why: Stale data misleads planners.
28Where should rollout begin?Sometimes asked
Why: Expand after comparison.
29What should be logged for each plan?Sometimes asked
Why: This gives full traceability.
30Which ERP systems might be integrated?Sometimes asked
Why: Read orders and inventory.
31Parallel branches in the planner explore…Sometimes asked
Why: Faster option generation.
32Agreed plan changes are shared with partners through…Sometimes asked
Why: Partners need the same plan in their systems.
Track your progress through every blueprint in your dashboard.
Start learning