Skip to content
masterclassBuddyTech Buzz5 fresh blogs · 5:00 AM IST

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

Disruption signalport strike · storm01Impact agentwhich orders?02ERP orders& inventoryPlanner agentreroute · resupply03Carrier quotesAPI tools04Cost & delaysimulation05Planner approves06Customers &suppliers notified07orders at riskoptions

How it works, step by step

  1. News, weather or carrier feeds report a disruption, such as a port strike.
  2. An impact agent finds which open orders and products travel through that route.
  3. A planner agent proposes options: reroute, switch supplier or ship from another warehouse.
  4. It requests live quotes and transit times from carrier APIs.
  5. Each option is simulated for cost, delay and stock-out risk.
  6. A human planner picks an option; the agent never books on its own.
  7. 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
  1. AGuesswork
  2. BContracted rate tables and carrier APIsCorrect answer
  3. CThe model's estimate
  4. DSocial media

Why: Prices must be exact.

2Before orders change, the recovery plan needs…Asked almost every time
  1. AThe customer's consent
  2. BA human planner's approvalCorrect answer
  3. CThe model's confidence
  4. DThe supplier's signature

Why: Approval before changing orders.

3When should customers be told new dates?Asked almost every time
  1. AAfter the original date passes
  2. BNever
  3. COnly if they ask
  4. DAs soon as a delay is confirmedCorrect answer

Why: Early notice builds trust.

4Where should freight rates come from?Very often asked
  1. AThe model's memory
  2. BLive carrier quote APIsCorrect answer
  3. CLast year's slides
  4. DCustomer emails

Why: Rates change constantly, so they must come from live sources.

5Why use code for the cost simulation?Very often asked
  1. AResults must be exact and reproducibleCorrect answer
  2. BModels cannot read numbers
  3. CCode is more creative
  4. DIt is cheaper always

Why: The model explains results.

6How should recovery options be presented?Very often asked
  1. AOne answer only
  2. BRandomly
  3. CWithout costs
  4. DTop options with trade-offsCorrect answer

Why: Planners choose with context.

7What links a part shortage to finished goods?Very often asked
  1. AThe invoice
  2. BThe org chart
  3. CThe website
  4. DThe bill of materialsCorrect answer

Why: Propagate impact through BOMs.

8How is uncertain disruption length handled?Very often asked
  1. AIgnore it
  2. BWait until it ends
  3. CScenarios with robust or staged choicesCorrect answer
  4. DAssume the best case

Why: Revise as information arrives.

9Which metric shows the planner's value?Very often asked
  1. ANumber of signals
  2. BModel size
  3. CReport length
  4. DOn-time delivery under disruptionsCorrect answer

Why: Track it alongside recovery cost.

10Minor disruptions should be…Very often asked
  1. AIgnored entirely
  2. BSent to customers
  3. CBatched into summaries below a thresholdCorrect answer
  4. DFully planned every time

Why: Thresholds avoid alert fatigue.

11Each recovery option is costed by…Very often asked
  1. AThe model's estimate
  2. BA fixed percentage
  3. CSupplier promises only
  4. DA code-based simulationCorrect answer

Why: Costs must be reproducible and correct.

12When options trade revenue against cost, the choice should be…Very often asked
  1. AMade automatically by the cheapest rule
  2. BRandom
  3. CLeft to suppliers
  4. DMade by the planner with trade-offs shownCorrect answer

Why: Business priorities need human judgement.

13Who confirms the recovery plan?Often asked
  1. AThe carrier
  2. BThe customer
  3. CThe impact agent
  4. DA human plannerCorrect answer

Why: The planner owns the decision and its cost.

14When should customers be told the new dates?Often asked
  1. AImmediately after the disruption
  2. BAfter the plan is approvedCorrect answer
  3. CNever
  4. DBefore options are priced

Why: Sharing unconfirmed dates causes confusion and lost trust.

15Alternative suppliers must be checked for…Often asked
  1. ALogo colour
  2. BWebsite design
  3. CNothing
  4. DQualification, capacity and lead timeCorrect answer

Why: Unqualified suppliers add risk.

16Approved changes are written back to…Often asked
  1. AThe ERP with audit trailsCorrect answer
  2. BA spreadsheet only
  3. CThe model
  4. DEmail

Why: Controlled transactions.

17How is the planner tested?Often asked
  1. ABy reading prompts
  2. BNot at all
  3. CReplaying past disruptionsCorrect answer
  4. DOnly in live crises

Why: Compare with real outcomes.

18Safety stock is…Often asked
  1. AReturned items
  2. BBuffer inventory for variabilityCorrect answer
  3. CDamaged goods
  4. DMarketing samples

Why: Using it may risk future shortages.

19Multiple simultaneous disruptions need…Often asked
  1. ANo planning
  2. BRandom choice
  3. CJoint allocation of shared resourcesCorrect answer
  4. DSeparate plans ignoring each other

Why: Shared resources overlap between disruptions.

20Recommendations should show…Often asked
  1. ANothing
  2. BInputs, assumptions and reasonsCorrect answer
  3. COnly the final choice
  4. DModel weights

Why: Planners can challenge them.

21Disruption signals come from…Often asked
  1. AOnly email
  2. BOnly phone calls
  3. COnly social media
  4. DCarrier, port, supplier, news and weather feedsCorrect answer

Why: Classify relevance and severity.

22Inventory reallocation must consider…Often asked
  1. ATransfer lead times and regional service levelsCorrect answer
  2. BOnly the cheapest warehouse
  3. CNothing
  4. DWarehouse names

Why: Protect priority customers.

23Partially received stock should be allocated to…Often asked
  1. AThe newest orders
  2. BNobody until the rest arrives
  3. CThe highest-priority orders firstCorrect answer
  4. DOrders in alphabetical order

Why: Priority allocation limits the damage.

24Carbon impact of an option is estimated from…Often asked
  1. AThe supplier's name
  2. BOrder value only
  3. CThe planner's location
  4. DMode, distance and weightCorrect answer

Why: Standard factors convert transport into emissions.

25Infeasible options are removed by…Often asked
  1. APlanners noticing later
  2. BCustomers
  3. CConstraint checks in code before reviewCorrect answer
  4. DAsking the model politely

Why: Planners should only see workable plans.

26Demand during a disruption is best shown as…Often asked
  1. AScenarios when uncertainty is highCorrect answer
  2. BOne exact number
  3. CLast year's figure
  4. DZero

Why: Scenarios make uncertainty explicit.

27Plans should display…Sometimes asked
  1. AModel names only
  2. BRandom IDs
  3. CData timestampsCorrect answer
  4. DNo dates

Why: Stale data misleads planners.

28Where should rollout begin?Sometimes asked
  1. AOne region or product line in advisory modeCorrect answer
  2. BEverywhere at once
  3. CWith full automation
  4. DNowhere

Why: Expand after comparison.

29What should be logged for each plan?Sometimes asked
  1. AOnly the final email
  2. BNothing
  3. COnly errors
  4. DSignals, options, approvals and ERP changesCorrect answer

Why: This gives full traceability.

30Which ERP systems might be integrated?Sometimes asked
  1. APhotoshop
  2. BFigma
  3. CSlack only
  4. DSAP, Oracle or DynamicsCorrect answer

Why: Read orders and inventory.

31Parallel branches in the planner explore…Sometimes asked
  1. AOnly one option
  2. BUI themes
  3. CBilling
  4. DSuppliers, routes and reallocation togetherCorrect answer

Why: Faster option generation.

32Agreed plan changes are shared with partners through…Sometimes asked
  1. AExisting portals or EDI messagesCorrect answer
  2. BPersonal phone calls only
  3. CSocial media
  4. DNothing

Why: Partners need the same plan in their systems.

Track your progress through every blueprint in your dashboard.

Start learning