---
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:117](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/36eea0d308f1312d1a446ec8813ed30b0bdba62c/packages/b2c-tooling-sdk/src/operations/mrt/mrt-backend.ts#L117)

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

## Properties

### canFallbackToLegacy?

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

Defined in: [packages/b2c-tooling-sdk/src/operations/mrt/mrt-backend.ts:130](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/36eea0d308f1312d1a446ec8813ed30b0bdba62c/packages/b2c-tooling-sdk/src/operations/mrt/mrt-backend.ts#L130)

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:121](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/36eea0d308f1312d1a446ec8813ed30b0bdba62c/packages/b2c-tooling-sdk/src/operations/mrt/mrt-backend.ts#L121)

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:135](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/36eea0d308f1312d1a446ec8813ed30b0bdba62c/packages/b2c-tooling-sdk/src/operations/mrt/mrt-backend.ts#L135)

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:141](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/36eea0d308f1312d1a446ec8813ed30b0bdba62c/packages/b2c-tooling-sdk/src/operations/mrt/mrt-backend.ts#L141)

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:119](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/36eea0d308f1312d1a446ec8813ed30b0bdba62c/packages/b2c-tooling-sdk/src/operations/mrt/mrt-backend.ts#L119)

Resolved user preference.
