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

[@salesforce/b2c-tooling-sdk](../../modules.md) / [discovery](../index.md) / sfraPattern

# Variable: sfraPattern

> `const` **sfraPattern**: [`DetectionPattern`](../interfaces/DetectionPattern.md)

Defined in: [packages/b2c-tooling-sdk/src/discovery/patterns/sfra.ts:42](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/e7c16f1ae423da0aa47b3e10be88f9770b53619b/packages/b2c-tooling-sdk/src/discovery/patterns/sfra.ts#L42)

Detection pattern for SFRA projects.

Detects SFRA workspaces by checking for:
1. A cartridge named `app_storefront_base` - the core SFRA cartridge that serves as the
   foundation for SFRA-based storefronts. Per Salesforce documentation, this cartridge
   is essential and should not be renamed. (Primary detection method)
2. A package.json with `paths.base` containing `app_storefront_base` - used in multi-repo
   setups with sgmf-scripts where the SFRA base cartridge is external to the project.
   (Secondary heuristic, less common)

## See

https://developer.salesforce.com/docs/commerce/b2c-commerce/guide/b2c-customizing-sfra.html

## Example

```
// Use in custom detection
import { sfraPattern } from '@salesforce/b2c-tooling-sdk/discovery';

const customPatterns = [sfraPattern, ...otherPatterns];
const result = await detectWorkspaceType(workspacePath, { patterns: customPatterns });
```
