Redesigning account signup around a hard gateway deadline

A 13.4-second provisioning call outlived the browser's roughly 10-second gateway. I moved that work behind an explicit asynchronous handoff.

Disclosure: Client and internal project details have been anonymized.

Overview

Account registration waited for a Workato automation workflow to create downstream ERP and company accounts, link the customer, and prepare verification. Warm calls completed in time, but a cold call took 13.4 seconds—longer than the browser-facing gateway's roughly 10-second limit.

The browser and backend then disagreed: the browser received a 599 error while the workflow continued and created the customer. Retrying was unsafe because the integration deduplicated by email and could not distinguish a retry from a genuinely duplicate signup.

Execution traces showed that timeout configuration could not make the workflow safe. The redesigned request ends at the state the storefront controls: it creates the commercetools customer, records its site code, and returns a processing message. Workato completes provisioning after the browser request ends, so slow success can no longer be presented as signup failure.

The challenge

The original flow completed several dependent operations before responding: customer creation, a Workato call, downstream account and business-unit provisioning, association, and verification messaging.

This design was reasonable because the application wanted provisioning to finish before telling the customer that registration had succeeded. It also centralized the downstream account and business-unit work in the integration recipe.

Registration inherited a short timeout from faster integrations. Giving registration more time fixed that configuration issue but exposed the harder constraint: the browser-facing gateway still ended the request first.

Discovering the timeout that configuration could not fix

Execution traces showed a cold Workato call taking 13.4 seconds. The backend completed the workflow, but the Frontastic action gateway stopped the browser request at roughly 10 seconds and returned a 599.

The customer existed in commercetools and the downstream account system even though the browser showed a failure.

Increasing the application's timeout could not help. The gateway ended the customer-facing request first, and aborting that request could not guarantee that Workato stopped processing.

Redesigning registration as an asynchronous workflow

The durable fix was to remove Workato from the browser request.

The revised registration action:

  1. Derives an AU or NZ site code from the request locale.
  2. Creates the commercetools customer with that site code.
  3. Returns a processing message without calling Workato.
  4. Lets Workato discover the customer in the background and complete provisioning.

The site code became the handoff between the storefront and Workato. Centralizing the locale mapping prevented the frontend and backend from producing conflicting regional values.

Keeping verification separate from authentication

Asynchronous provisioning meant customers could verify their email before the required business context was ready. The previous flow signed them in immediately, creating an incomplete session with no business-unit or store data.

I stopped signing customers in during confirmation. They now return to the normal sign-in path, which builds the complete session once provisioning is ready. The registration screen also makes the new boundary clear: the application is processing, and an email will follow when it is ready.

The guarantee that shipped

The backend records each created customer and site code in an informational log. Those records prove that the storefront completed its part of the handoff even when downstream configuration prevented New Zealand provisioning.

Verification

Execution traces and a live test account—present in both the commerce and downstream systems despite a browser 599—established that the timeout described the caller, not the final workflow state.

Australian and New Zealand test results, combined with backend logs, isolated two failures at their actual boundaries: downstream regional configuration and storefront address-phone mapping. The storefront changes corrected the address-phone mapping and removed mobile-only validation. With the downstream configuration aligned, verification passed regional site-code handling, the unverified-user login block, the processing message, and the asynchronous response-speed criterion.

Downstream boundary

The integration continues to own deduplication, provisioning completion, and recovery after the storefront handoff. Its existing email-based identity rule can confuse a retry with a genuinely new contact and can create duplicate business units for different contacts.

The storefront intentionally makes no claim about those downstream states. Its responsibility ends after persisting the customer and regional site code, which is the narrower guarantee that removes the gateway race from the browser request.

Outcome

With the downstream configuration aligned, the revised flow created Australian and New Zealand customers with the correct regional site code, while the login path continued to block unverified users. Registration no longer waits on the call measured at 13.4 seconds, so that call cannot race the browser gateway inside the signup request.

The verified storefront boundary is explicit: the browser reports only the state the application can prove, and both regional paths passed verification. Slow downstream success can no longer be presented to the customer as signup failure.

Technology

TypeScriptcommercetoolsFrontasticWorkatoHumio

Let’s build something useful.

Have a project in mind or just want to say hello? I’d love to hear from you.

hello@amielfilarca.me Metro Manila, Philippines
Start a conversation