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

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

# Interface: RunMrtWithFallbackOptions

Defined in: [packages/b2c-tooling-sdk/src/operations/mrt/mrt-backend.ts:101](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/1dedfc1ffefa01c3d5bff62c8f7e7e682a1a91cd/packages/b2c-tooling-sdk/src/operations/mrt/mrt-backend.ts#L101)

Options controlling [runMrtWithFallback](../functions/runMrtWithFallback.md).

## Properties

### canFallbackToLegacy?

> `optional` **canFallbackToLegacy**: `boolean`

Defined in: [packages/b2c-tooling-sdk/src/operations/mrt/mrt-backend.ts:114](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/1dedfc1ffefa01c3d5bff62c8f7e7e682a1a91cd/packages/b2c-tooling-sdk/src/operations/mrt/mrt-backend.ts#L114)

Whether a legacy fallback target actually exists (i.e. legacy credentials
are configured). When `auto` would otherwise fall back but this is `false`,
the original SCAPI error is rethrown instead of running the legacy branch —
which would throw a misleading "provide an API key" error and bury the real
SCAPI failure (e.g. a missing scope) that the user needs to fix. Defaults to
`true`.

***

### hasScapiConfig

> **hasScapiConfig**: `boolean`

Defined in: [packages/b2c-tooling-sdk/src/operations/mrt/mrt-backend.ts:105](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/1dedfc1ffefa01c3d5bff62c8f7e7e682a1a91cd/packages/b2c-tooling-sdk/src/operations/mrt/mrt-backend.ts#L105)

True iff a [ScapiMrtConnection](ScapiMrtConnection.md) is available.

***

### onFallback()?

> `optional` **onFallback**: (`reason`) => `void`

Defined in: [packages/b2c-tooling-sdk/src/operations/mrt/mrt-backend.ts:119](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/1dedfc1ffefa01c3d5bff62c8f7e7e682a1a91cd/packages/b2c-tooling-sdk/src/operations/mrt/mrt-backend.ts#L119)

Invoked once when `auto` mode falls back from SCAPI to legacy, with the
SCAPI rejection reason. Use to warn the user.

#### Parameters

##### reason

`string`

#### Returns

`void`

***

### onResolve()?

> `optional` **onResolve**: (`backend`) => `void`

Defined in: [packages/b2c-tooling-sdk/src/operations/mrt/mrt-backend.ts:125](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/1dedfc1ffefa01c3d5bff62c8f7e7e682a1a91cd/packages/b2c-tooling-sdk/src/operations/mrt/mrt-backend.ts#L125)

Invoked with the backend that will actually serve the call — before the
SCAPI attempt, and again with `'legacy'` if `auto` falls back. Use for
`-D`/debug output.

#### Parameters

##### backend

[`MrtBackend`](../type-aliases/MrtBackend.md)

#### Returns

`void`

***

### preference

> **preference**: [`MrtBackendPreference`](../type-aliases/MrtBackendPreference.md)

Defined in: [packages/b2c-tooling-sdk/src/operations/mrt/mrt-backend.ts:103](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/1dedfc1ffefa01c3d5bff62c8f7e7e682a1a91cd/packages/b2c-tooling-sdk/src/operations/mrt/mrt-backend.ts#L103)

Resolved user preference.
