> For the complete documentation index, see [llms.txt](https://docs.flxbl.io/flxbl/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flxbl.io/flxbl/codev/pools/overview.md).

# Pools

<figure><img src="/files/OdtfgSnlxeAS0UylhZUd" alt="Pools dashboard"><figcaption><p>The Pools page showing sandbox and scratch org pools with instance counts and availability</p></figcaption></figure>

Every Salesforce developer knows the pain of setting up an environment from scratch — creating the org, installing managed packages, deploying metadata, importing data, configuring users. It can take hours before any real work begins.

Pools solve this by maintaining a collection of pre-built, ready-to-use environments. When a developer needs an org, they grab one from the pool — fully set up, packages installed, ready in seconds. When they are done, the environment expires and the pool replenishes itself.

codev makes this entire pattern available out of the box. You define a pool, and codev handles provisioning, monitoring, expiration, cleanup, and replenishment automatically through its workflow engine. No cron jobs to set up, no scripts to maintain.

## Pool types

### Sandbox pools

Sandbox pools maintain a set of pre-created Salesforce sandboxes cloned from your production org or a source sandbox. Each sandbox has a managed lifecycle — it is created, made available, assigned when fetched, and automatically expired and cleaned up when no longer needed.

Use sandbox pools when you need environments that start from your production data and configuration.

### Scratch org pools

Scratch org pools maintain a set of pre-built scratch orgs created from your DevHub. During provisioning, codev clones your repository, installs all managed package dependencies, deploys all your packages, and enables source tracking — so the scratch org is ready for development the moment it is fetched.

Use scratch org pools when you need clean, isolated environments for feature development or CI validation.

## Lifecycle

Both pool types follow the same pattern — environments are ephemeral with a managed lifecycle:

1. **Provisioned** — codev creates the environment and installs everything it needs
2. **Available** — ready to be fetched by a developer
3. **Assigned** — a developer is using it
4. **Expired** — the lease has run out, and the environment is cleaned up or refreshed

codev monitors each pool on a recurring schedule and automatically replenishes it when available instances drop below the configured minimum. You never have to think about pool maintenance.

## Getting started

* [Creating and configuring pools](/flxbl/codev/pools/creating-pools.md)
* [Fetching and using environments](/flxbl/codev/pools/using-pools.md)
* [Pool monitoring and health](/flxbl/codev/pools/monitoring.md)

## Further reading

For advanced pool configuration — custom scratch org definitions, artifact fetching from registries, source tracking details, managed package keys, DevHub setup — see the sfp pool documentation:

* [Scratch org pools](https://docs.flxbl.io/flxbl/sfp/environment-management/pools/scratch-org-pools)
* [Sandbox pools](https://docs.flxbl.io/flxbl/sfp/environment-management/pools/sandbox-pools)
* [Pool CLI commands](https://docs.flxbl.io/flxbl/sfp/cli-reference-v51-release-v3/advanced/pool)

## Pools and review environments

Pools also serve as the foundation for **review environments** — a feature in the [Inspect](/flxbl/codev/inspect/overview.md) section that automatically assigns a pool environment to each pull request for validation. If your team wants per-PR environments, review environments build on top of pools with assignment rules that map branch patterns and domains to specific pools.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.flxbl.io/flxbl/codev/pools/overview.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
