# Review Environments

Create an assignment rule for automatic pool or environment resolution

* [`sfp server review-envs rules create`](#sfp-server-review-envs-rules-create)
* [`sfp server review-envs rules delete ID`](#sfp-server-review-envs-rules-delete-id)
* [`sfp server review-envs rules update ID`](#sfp-server-review-envs-rules-update-id)

## `sfp server review-envs rules create`

Create an assignment rule for automatic pool or environment resolution

```
USAGE
  $ sfp server review-envs rules create -r <value> -b <value> --priority <value> [--json] [-e <value>] [-t <value>] [--sfp-server-url
    <value>] [-g <value>...] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] [-p
    <value> | -e <value>] [-d <value>...] [--description <value>] [--inactive] [--pool-type SANDBOX|SCRATCH_ORG]

FLAGS
  -b, --branch=<value>              (required) Git branch pattern (supports wildcards: *, feature/*, */hotfix)
  -d, --domain=<value>...           SFP domain pattern(s) - can be specified multiple times or comma-separated (supports
                                    wildcards: *, sales-*, *-analytics). Leave empty to match any domain
  -e, --email=<value>               Email address for authenticated user. Ignored if --application-token is provided.
                                    Can be set via SFP_SERVER_USER env var.
  -e, --environment-name=<value>    Dedicated environment name to assign when patterns match (mutually exclusive with
                                    --pool-tag)
  -g, --logsgroupsymbol=<value>...  Symbol used by CICD platform to group/collapse logs in the console. Provide an
                                    opening group, and an optional closing group symbol.
  -p, --pool-tag=<value>            Pool tag to assign when patterns match (mutually exclusive with --environment-name)
  -r, --repository=<value>          (required) Repository identifier in format owner/repo (GitHub/GitLab) or
                                    org/project/repo (Azure DevOps)
  -t, --application-token=<value>   Application token for CI/CD authentication. Can be set via SFP_SERVER_TOKEN env var
                                    (CLI flags take precedence over env vars).
      --description=<value>         Description of the assignment rule
      --inactive                    Create the rule as inactive
      --loglevel=<option>           [default: info] logging level for this command invocation
                                    <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>
      --pool-type=<option>          Type of pool (SANDBOX or SCRATCH_ORG). If not specified, the server will auto-detect
                                    based on the pool tag
                                    <options: SANDBOX|SCRATCH_ORG>
      --priority=<value>            (required) Priority for conflict resolution (0-1000, higher wins)
      --sfp-server-url=<value>      URL of the SFP server. Can be set via SFP_SERVER_URL env var or config: sfp
                                    config:set server-url

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Create an assignment rule for automatic pool or environment resolution

EXAMPLES
  $ sfp server review-envs rules create --repository myorg/myrepo --pool-tag feature_dev --branch "feature/*" --domain "sales" --domain "service" --priority 10

  $ sfp server review-envs rules create --repository myorg/myrepo --pool-tag prod --branch main --domain "*" --priority 100 --description "Production branch uses prod pool"

  $ sfp server review-envs rules create --repository myorg/myrepo --pool-tag hotfix --branch "hotfix/*" --priority 50 --description "Hotfix branches match any domain"

  $ sfp server review-envs rules create --repository myorg/myrepo --environment-name my-review-env --branch main --priority 100 --description "Main branch uses dedicated environment"

  $ sfp server review-envs rules create --repository myorg/myrepo --pool-tag scratch_dev --branch "dev/*" --priority 30 --pool-type SCRATCH_ORG
```

*See code:* [*src/commands/server/review-envs/rules/create.ts*](https://source.flxbl.io/flxbl/sfp-pro)

## `sfp server review-envs rules delete ID`

Delete a pool assignment rule

```
USAGE
  $ sfp server review-envs rules delete ID [--json] [--repository <value>] [-e <value>] [-t <value>] [--sfp-server-url <value>] [-g
    <value>...] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] [--confirm]

ARGUMENTS
  ID  Pool assignment rule ID to delete

FLAGS
  -e, --email=<value>               Email address for authenticated user. Ignored if --application-token is provided.
                                    Can be set via SFP_SERVER_USER env var.
  -g, --logsgroupsymbol=<value>...  Symbol used by CICD platform to group/collapse logs in the console. Provide an
                                    opening group, and an optional closing group symbol.
  -t, --application-token=<value>   Application token for CI/CD authentication. Can be set via SFP_SERVER_TOKEN env var
                                    (CLI flags take precedence over env vars).
      --[no-]confirm                Confirm deletion without prompting
      --loglevel=<option>           [default: info] logging level for this command invocation
                                    <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>
      --repository=<value>          The repository identifier. E.g `owner/repo` for GitHub/GitLab or `org/project/repo`
                                    for Azure DevOps
      --sfp-server-url=<value>      URL of the SFP server. Can be set via SFP_SERVER_URL env var or config: sfp
                                    config:set server-url

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Delete a pool assignment rule

EXAMPLES
  $ sfp server review-envs rules delete rpa_123456

  $ sfp server review-envs rules delete rpa_123456 --no-confirm
```

*See code:* [*src/commands/server/review-envs/rules/delete.ts*](https://source.flxbl.io/flxbl/sfp-pro)

## `sfp server review-envs rules update ID`

Update a pool assignment rule

```
USAGE
  $ sfp server review-envs rules update ID [--json] [--repository <value>] [-e <value>] [-t <value>] [--sfp-server-url <value>] [-g
    <value>...] [--loglevel trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL] [-b <value>] [-d
    <value>...] [--priority <value>] [--description <value>] [--active]

ARGUMENTS
  ID  Pool assignment rule ID to update

FLAGS
  -b, --branch=<value>              New branch pattern
  -d, --domain=<value>...           New domain pattern(s) - can be specified multiple times or comma-separated. Use
                                    empty string to clear (match any domain)
  -e, --email=<value>               Email address for authenticated user. Ignored if --application-token is provided.
                                    Can be set via SFP_SERVER_USER env var.
  -g, --logsgroupsymbol=<value>...  Symbol used by CICD platform to group/collapse logs in the console. Provide an
                                    opening group, and an optional closing group symbol.
  -t, --application-token=<value>   Application token for CI/CD authentication. Can be set via SFP_SERVER_TOKEN env var
                                    (CLI flags take precedence over env vars).
      --[no-]active                 Set rule as active or inactive
      --description=<value>         New description
      --loglevel=<option>           [default: info] logging level for this command invocation
                                    <options: trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL>
      --priority=<value>            New priority (0-1000)
      --repository=<value>          The repository identifier. E.g `owner/repo` for GitHub/GitLab or `org/project/repo`
                                    for Azure DevOps
      --sfp-server-url=<value>      URL of the SFP server. Can be set via SFP_SERVER_URL env var or config: sfp
                                    config:set server-url

GLOBAL FLAGS
  --json  Format output as json.

DESCRIPTION
  Update a pool assignment rule

EXAMPLES
  $ sfp server review-envs rules update rpa_123456 --priority 20

  $ sfp server review-envs rules update rpa_123456 --branch "release/*" --domain "sales" --domain "service"

  $ sfp server review-envs rules update rpa_123456 --domain "" # Clear domain patterns (match any)

  $ sfp server review-envs rules update rpa_123456 --no-active

  $ sfp server review-envs rules update rpa_123456 --description "Updated rule for release branches"
```

*See code:* [*src/commands/server/review-envs/rules/update.ts*](https://source.flxbl.io/flxbl/sfp-pro)


---

# Agent Instructions: 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:

```
GET https://docs.flxbl.io/flxbl/sfp/cli-reference-v51-release-v3/server/review-envs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
