Pretty, Pretty, Presets

Brave Hager
May 27, 2025 • 3 minutes

Building an all-in-one, global HR platform is complicated. The amount of stuff that Justworks tracks for a single company on our platform is pretty crazy. And the combinatorial explosion of different states¹ a company can be in makes exhaustive testing just about impossible.Still, our teams have high expectations for how easily we can test and explore different permutations of Justworks’ product experience, quickly. Not just for end-to-end testing, but also for manual QA, new-hire trainings, sales demos—the list goes on. To meet their expectations, we built Presets. A tool that does one thing, and one thing only—create Justworks companies.

Before Presets, every team had its own homegrown tool for spinning up test companies. These tools worked — sort of — but they were narrowly scoped, fragile, and often incompatible across domains. If you needed a company with payroll, benefits, and time tracking all wired up, good luck. For use cases we couldn’t support, non-technical folks were stuck cobbling together companies through a mix of internal-facing and customer UIs (sometimes spending hours just to create one company).

Today, anyone at Justworks can use Presets to reliably create companies end-to-end across multiple domains and services in seconds.

The Presets UI. We try to keep it as clean as possible, but there’s a lot hiding under the surface.

Presets started as a solution to a very narrow problem: launching a unified version of our health insurance shopping experience. At the time, we had multiple versions of the flow—each handling different types of health insurance, with their own logic, quirks, and carrier-specific rules. Even doing discovery was hard. We couldn’t reliably create companies that represented all the combinations we needed to explore, let alone test. We needed a reliable way to spin up companies in precise scenarios, across dozens of edge cases, over and over again. So we built Presets to unblock the project.

Presets itself is a small, delightfully boring service. The secret sauce is Temporal(opens in a new tab). Each step in the process — onboarding members, configuring payroll, setting up benefits — is a Temporal workflow. Temporal gives us a few critical things. First, reliability: workflows survive intermittent failures, crashes, deployments, and can wait arbitrarily long on external services without losing state. Second, it gives us a clear ownership model. Each team can own and evolve their part of the company creation process independently, without stepping on each other. And third, observability: every step in the workflow is tracked, making it easy to see exactly what happened and debug issues quickly.

The anatomy of a company creation workflow in Temporal Web.

At the time, the Benefits team was already exploring Temporal for some of our most complex automation needs. Specifically, we needed better tools for automating our carrier fulfillment platform — the system that communicates health insurance changes to our various carriers. Temporal is great here for entirely different reasons than in Presets. Whereas generating Presets companies needs to be fast, working with health insurance carriers often involves longer timelines. Some changes take minutes to process, but others can be processing for days, if not weeks. Temporal’s ability to reliably manage state across such vast timeframes makes it invaluable for both use cases.

We were able to leverage our existing expertise with Temporal to quickly prototype the initial version of Presets. We started with just a single cURL-able API endpoint:

curl -X POST -H "Content-Type: application/json" \
  http://localhost:8080/companies -d '{}'

# {
#   "workflow_id": "9f78cf93-ebcf-4791-aeb5-57c85fc15276",
#   "run_id": "0196eb8f-c383-7e24-9be0-9067bcdd3a4b",
#   "url": "https://..."
# }

In a bit of a “build it and they will come” moment, more and more people started using our tool. Incidentally, by solving our own QA problems, we ended up solving a whole set of even more fundamental challenges for other teams. Teams can spin up complex, realistic companies on demand, which means faster iteration, better testing, and more confident shipping. Designers can explore real workflows. PMs can validate edge cases. QA can test gnarly scenarios without hours of setup. When creating high-fidelity test data is cheap and consistent, the entire product development cycle gets tighter — and faster.

Now, when we start development on something new, we’re more likely to ask: what could we add to Presets to make this project easier to build?

Presets UI for configuring company health insurance.

In the past two weeks, Presets created over 5,500 companies and executed nearly 40,000 Temporal workflows. We’re excited about the future of the project, but we’re not ready to declare victory quite yet. There’s still so much of Justworks that Presets doesn’t support. Plus, even with durable execution, reliability can still be an issue. Of those 5,000 company workflows, roughly 2% timed out or failed. In most cases, these failures were due to issues in downstream services that Presets depends on.

Looking forward, we’re excited to see Presets adopted in new areas of Justworks. Right now, our test automation team is migrating our existing E2E Playwright(opens in a new tab) test suite to Presets. At the same time, our Partner API team is working to expose Presets externally to accelerate the development of third-party integrations. Most excitingly, we’re curious to see how Presets could be productized to provide instant, highly personalized demos of Justworks.

Presets has come a long way from a one-off tool built to unblock a single project. While it’s already delivered wins in speed, confidence, and quality, there’s still plenty of headroom. We’re continuing to expand its coverage across domains, improve its reliability, and make it even easier to use.

¹ States as in “state machine,” not “United States of America.” In case you were curious, Justworks does operate in all 50 states (and 20+ countries), so even our states can be in different states.