SCAYLE Data Model
Overview
The SCAYLE Data Model serves as the central reference for all standardized constants used throughout the Storefront Application — including product attributes, navigation trees, and other API reference keys.
These constants ensure consistency across the application by defining a single source of truth for all key names used in display, filtering, and API requests.
Attribute Keys
The Storefront Application centralizes all product attribute references into a single constants file. These constants are functionally grouped to reflect their use across different parts of the application. The values listed below are the default keys used in the Storefront Application.
Core Product Data
| Entity Level | Constant Name | Default Key Value | Usage |
|---|---|---|---|
| Product | ATTRIBUTE_KEY_NAME | 'name' | Product title, accessible image alt text, generating URLs. |
| Product | ATTRIBUTE_KEY_BRAND | 'brand' | Displaying brand information and structured data. |
| Product | ATTRIBUTE_KEY_DESCRIPTION | 'description' | Displaying detailed product information on PDPs. |
| Product | ATTRIBUTE_KEY_COLOR | 'color' | Displaying product colors and filtering variants. |
| Variant | ATTRIBUTE_KEY_SIZE | 'size' | Displaying available sizes and filtering by size options. |
Merchandising & Promotions
| Entity Level | Constant Name | Default Key Value | Usage |
|---|---|---|---|
| Product | ATTRIBUTE_KEY_STOREFRONT_BADGE | 'storefrontBadge' | Displaying promotional badges (e.g., "New," "Sale"). |
| Product | ATTRIBUTE_KEY_PROMOTION | 'promotion' | Identifying applicable promotions on product cards. |
Image Handling
| Entity Level | Constant Name | Default Key Value | Usage |
|---|---|---|---|
| Image | ATTRIBUTE_KEY_PRIMARY_IMAGE | 'primaryImage' | Filtering and prioritizing the primary image in galleries. |
| Image | ATTRIBUTE_KEY_PRIMARY_IMAGE_TYPE | 'primaryImageType' | Retrieving the type of primary image (e.g., "model," "flat"). |
To find more detailed technical usage and implementation examples, please refer to the Image View Toggle Guide.
Subscription (Optional)
| Entity Level | Constant Name | Default Key Value | Usage |
|---|---|---|---|
| Variant | ATTRIBUTE_KEY_SUBSCRIPTION_ELIGIBILITY | 'subscriptionEligibility' | Checking if a product can be added to a subscription flow. |
| Variant | ATTRIBUTE_KEY_SUBSCRIPTION_INTERVALS | 'subscriptionAvailableIntervals' | Displaying subscription frequency options. |
| Variant | ATTRIBUTE_KEY_SUBSCRIPTION_TERM | 'subscriptionTerm' | Displaying subscription duration details. |
| Variant | ATTRIBUTE_KEY_SUBSCRIPTION_CANCELLATION_POLICY | 'subscriptionCancellationPolicy' | Displaying subscription cancellation terms. |
If your product data structure uses a different naming convention (e.g., your API returns 'itemColor' instead of 'color'), you only need to update the constant definition in the centralized file.
You can find these constants in the shared/constants/attributeKeys.ts file within your project.