---
editLink: false
lastUpdated: false
---

[@salesforce/b2c-tooling-sdk](../../../modules.md) / [operations/mrt](../index.md) / createEnvironmentWithBackend

# Function: createEnvironmentWithBackend()

> **createEnvironmentWithBackend**(`options`): `Promise`\<[`MrtEnvironmentResult`](../interfaces/MrtEnvironmentResult.md)\>

Defined in: [packages/b2c-tooling-sdk/src/operations/mrt/env.ts:1593](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/8fc17d8708d025c83fb0c44ca73198a200605153/packages/b2c-tooling-sdk/src/operations/mrt/env.ts#L1593)

Creates an environment, routing to the SCAPI or legacy backend per the given
preference (with safe `auto` fallback). SCAPI accepts only the display name;
the legacy-only configuration fields are forwarded to the legacy backend and
ignored by SCAPI.

## Parameters

### options

[`CreateEnvironmentBackendOptions`](../interfaces/CreateEnvironmentBackendOptions.md)

## Returns

`Promise`\<[`MrtEnvironmentResult`](../interfaces/MrtEnvironmentResult.md)\>
