Recognize the failure customers actually see

A customer completes a service enquiry and presses Submit. The button appears to pause, so the customer taps it again. Perhaps the first request reached the server and the response was lost; perhaps the browser retried; perhaps the customer opened a second tab because no confirmation appeared. A form that creates a case on every POST can then create two cases and two acknowledgments for one intention. The reverse error is possible too: a business that merges every enquiry from the same email address may discard a legitimate second request. The design question is therefore how to recognize the same submission attempt, not how to guess whether two people or two messages look similar.

HTTP POST is commonly used for HTML forms and is not inherently idempotent: identical POST requests can have additional effects. A disabled button after the first click improves feedback and reduces casual double taps, but it does not cover a network retry, a refreshed page, two browser tabs, or a client that bypasses the interface. Keep the button behavior as one usability measure, while putting the decisive duplicate protection on the server. Treat a submission as a business operation with a stable identity and an explicit state: received, being processed, accepted, or failed. That state is more informative than an animation on the customer’s screen.

Give one attempt one key

One practical pattern is to issue a random, opaque submission key when a fresh form attempt starts. The browser sends that key with the POST and keeps it when retrying the same attempt after uncertainty. The server binds it to the form type, the appropriate customer or session scope, and a canonical representation or fingerprint of the submitted values. It atomically reserves the key before creating the case. A later request with the same key and same intended payload returns the existing result or its current processing status. The same key with materially different values should be rejected with an explanation rather than repurposed. Stripe’s API documents this pattern for its own requests, including parameter comparison; that is an example of a design principle, not a claim that every form must copy Stripe’s exact retention or response semantics.

The boundary between retry and new request must be visible to customers. If a person wants to add another service address or ask a separate question, offer “Start a new enquiry,” which creates a new key. If they want to correct an accepted enquiry, provide an edit or follow-up path linked to its case identifier; reusing the old submission key with changed fields is ambiguous. Do not use an email address, telephone number, IP address or text similarity as the key. Those values can be shared, change over time, contain personal data, and collide across legitimate requests. Keep the key out of public URLs when that would expose it through browser history or referrers, and decide how long the server must recognize retries based on the actual customer journey.

Coordinate the case and its side effects

Saving the idempotency key is only useful if its reservation and case creation cannot race. Two requests may arrive together. A database uniqueness rule or equivalent atomic operation should allow one request to claim the key, while the other observes the resulting state. If the first request is still running, the second should receive a clear processing response or wait under a bounded rule; it must not start a second case. Decide what the user sees when validation fails before a case exists: show the field errors and let the same attempt be corrected according to the system’s documented key policy. Avoid permanently marking a key as completed before a durable case has been saved.

Acknowledgment email, staff notification and CRM export are separate side effects. A single case can still generate duplicate messages if those jobs are queued twice or retried without their own identity. Give each downstream action a stable operation identifier tied to the accepted case and event, and record whether it has been completed. If a message fails after the case is saved, show the customer the case confirmation while support retries the message; do not create another case to make the email work. If an external service gives an uncertain result, reconcile its state before repeating an action that could send twice. The aim is a consistent case and communication trail, not merely one row in the database.

Make the confirmation trustworthy

After acceptance, return a durable reference that staff can locate, together with the next expected step in plain language. A confirmation page should say the enquiry was received, not promise that a booking is confirmed or a technician assigned if those decisions have not happened. If a retry is recognized, show the same reference and current state, rather than an alarming “duplicate” error that makes the customer start again. If processing is still underway, say so and offer a safe way to check later. If the first attempt failed, explain whether the customer should retry with the same attempt or start a fresh one. The wording should reflect actual system state, not optimistic front-end timing.

Consider an illustrative service enquiry. The customer requests a site visit for one address, presses Submit, and loses connectivity before seeing the response. The server has already created case Q. Reopening the form with the same attempt key and same details should retrieve Q, even though the customer does not know that the first request succeeded. The customer then wants to enquire about a different branch. That is a new intention, so the interface issues a new key and creates another case. This example is a design scenario, not evidence that any particular business has measured this failure rate. It shows why a duplicate rule based only on matching phone and service type would make the wrong decision.

Test retries, changes and recovery

Test two simultaneous identical submissions with the same key; only one case and its intended acknowledgment should result. Repeat after the server has committed the case but before the browser has received the response. Try the same key with changed content and confirm that the system refuses ambiguity rather than quietly overwriting or creating a new case. Create a genuinely new key with identical content and verify that the second legitimate enquiry is accepted. Then simulate a case saved but email delivery failed, a process restart during submission, an expired key, and a customer returning from a browser back button. Inspect the database, queue and customer view together.

Operational ownership matters. Decide who investigates a customer saying “I submitted but have no confirmation,” what identifiers support can safely ask for, and how they distinguish one case from two. Log the attempt identifier, outcome and case link with appropriate access controls, but do not store whole enquiry bodies in a general diagnostic log. The retained key should be pruned under a documented policy; after it expires, explain how the customer can search for an existing case before starting again. Review actual duplicate reports and failed confirmations after release rather than claiming the design eliminated every possible repeat. A clear recovery path is part of the solution because networks and external mail services will still fail.

Set a clear operational boundary

A support agent should never be asked to delete one of two apparent cases solely because the names match. First inspect whether they share a submission key, which case received the acknowledgment, whether either case has already been assigned, and whether the customer intended a second request. If the system did create an accidental duplicate, preserve an explanation and link the records before closing one under the business policy. This protects staff from losing useful history and gives the customer one clear reference for future contact. Write the policy into the service workflow so that a technical retry rule and a human correction rule reinforce each other.

Before you proceed

  • Does the same submission key return one case even if two POST requests arrive together?
  • Can a customer clearly start a genuinely new enquiry?
  • Do case confirmation and downstream messages reflect durable state?

Sources & further reading