Skip to content
Ovrflo

Software engineering

Make integrations safe to retry

See how a warehouse can recover a shipping label after a dropped connection and avoid creating a duplicate.

By Ovrflo · · 2 min read

Software integrations

A carrier creates a shipping label, but the network drops before the warehouse gets the tracking number. A packer sees a parcel with no label and tries again. The second attempt should help the packer recover the first purchase.

Give each parcel a stable reference

Save a parcel reference before sending a label request. When the carrier supports an idempotency key, a value it uses to recognize a repeated operation, reuse the same key for the same purchase. Check how long the carrier honors it and what lookup is available after that window.

Create the reference per parcel. An order may ship in more than one box. A reprint should use the parcel’s existing label.

Show when the purchase is being checked

After a timeout, show that the warehouse is checking the label. If the carrier can search by your reference, use the lookup to retrieve the tracking number. If the carrier cannot reliably look up the purchase or prevent a duplicate, flag it for review before allowing another attempt.

Test both the missing reply and two simultaneous clicks

In a test environment, have the carrier accept a request, then interrupt the reply. Reopen the packing screen and retry. Verify that the saved tracking number belongs to the parcel and that the carrier records one purchase.

Repeat with two packing screens requesting a label for the same parcel. Keep attempt records tied to the parcel so support can reconstruct what happened later.