Product Variants Configuration

Create product variants with multiple variation attributes like color, size, and configuration options

Product Variants Configuration

Create product variants with multiple variation attributes like color, size, and configuration options

Intermediate Medium Risk v2.3 Backup Required

Requirements

Prerequisites

  • Base product exists
  • Variation attributes defined
  • Understanding of variant structure

SAP Commerce Version

1905 2005 2105 2205 2211

Required Modules

core catalog basecommerce variants

Business Impact

Enables complex product variations for enhanced customer choice

Parameters

tools.sapCommerceImpexLibrary.ui.parameterGuide

Impex Code

51 Linesvariantsvariationattributesenumerationcomplex-products
# Product Variants Configuration
# Creates comprehensive variant structure with multiple attributes

# Create variation attributes
INSERT_UPDATE VariationAttributeDescriptor;qualifier[unique=true];attributeType(code);generate;enclosingType(code);extensionName
;color;enum;true;VariationProduct;core
;storage;enum;true;VariationProduct;core
;connectivity;enum;true;VariationProduct;core

# Create enumeration values for color
INSERT_UPDATE HybrisEnumValue;code[unique=true];type(code);sequenceNumber
;black;Color;1
;white;Color;2
;blue;Color;3
;red;Color;4
;gold;Color;5

# Create enumeration values for storage
INSERT_UPDATE HybrisEnumValue;code[unique=true];type(code);sequenceNumber
;64GB;Storage;1
;128GB;Storage;2
;256GB;Storage;3
;512GB;Storage;4

# Create enumeration values for connectivity
INSERT_UPDATE HybrisEnumValue;code[unique=true];type(code);sequenceNumber
;4G;Connectivity;1
;5G;Connectivity;2

# Create base variation product
INSERT_UPDATE VariationProduct;code[unique=true];catalogVersion(catalog(id),version)[unique=true];baseProduct(code,catalogVersion(catalog(id),version));variationAttributeDescriptors(qualifier);name[lang=en];approvalStatus(code)
;$baseProductCode;$catalogVersion;$baseProductCode:$catalogVersion;color,storage,connectivity;$baseProductCode Variants;approved

# Create specific variants
INSERT_UPDATE VariationProduct;code[unique=true];catalogVersion(catalog(id),version)[unique=true];baseProduct(code,catalogVersion(catalog(id),version));color(code);storage(code);connectivity(code);name[lang=en];ean;approvalStatus(code)
;${baseProductCode}_BLACK_64GB_4G;$catalogVersion;$baseProductCode:$catalogVersion;black;64GB;4G;$baseProductCode Black 64GB 4G;2001234567890;approved
;${baseProductCode}_BLACK_128GB_4G;$catalogVersion;$baseProductCode:$catalogVersion;black;128GB;4G;$baseProductCode Black 128GB 4G;2001234567891;approved
;${baseProductCode}_BLACK_256GB_5G;$catalogVersion;$baseProductCode:$catalogVersion;black;256GB;5G;$baseProductCode Black 256GB 5G;2001234567892;approved
;${baseProductCode}_WHITE_64GB_4G;$catalogVersion;$baseProductCode:$catalogVersion;white;64GB;4G;$baseProductCode White 64GB 4G;2001234567893;approved
;${baseProductCode}_WHITE_128GB_5G;$catalogVersion;$baseProductCode:$catalogVersion;white;128GB;5G;$baseProductCode White 128GB 5G;2001234567894;approved
;${baseProductCode}_BLUE_256GB_5G;$catalogVersion;$baseProductCode:$catalogVersion;blue;256GB;5G;$baseProductCode Blue 256GB 5G;2001234567895;approved

# Set variant prices with progressive pricing
INSERT_UPDATE PriceRow;productId[unique=true];unit(code[unique=true,default=pieces]);currency(isocode)[unique=true];price;minqtd;unitFactor;net
;${baseProductCode}_BLACK_64GB_4G;pieces;USD;299.99;1;1;false
;${baseProductCode}_BLACK_128GB_4G;pieces;USD;399.99;1;1;false
;${baseProductCode}_BLACK_256GB_5G;pieces;USD;599.99;1;1;false
;${baseProductCode}_WHITE_64GB_4G;pieces;USD;319.99;1;1;false
;${baseProductCode}_WHITE_128GB_5G;pieces;USD;549.99;1;1;false
;${baseProductCode}_BLUE_256GB_5G;pieces;USD;649.99;1;1;false

tools.sapCommerceImpexLibrary.ui.sections.relatedSnippets

How to find SAP Commerce Impex snippets?

Access enterprise-grade SAP Commerce Impex snippet library with professional templates. Find solutions for common tasks, data imports, and system configuration. Features include categorized snippets, documentation, and best practices.

Features

  • Comprehensive Impex library with 20+ prebuilt snippets
  • Snippet categories covering all major SAP Commerce areas
  • Advanced search and filtering capabilities
  • Snippet preview and parameter configuration
  • Risk assessment and difficulty ratings
  • SAP Commerce version compatibility
  • Module requirements validation
  • Copy to clipboard functionality
  • Favorites and usage history tracking
  • Enterprise-grade templates and examples

How to use

  1. Browse snippets by category or use search to find specific functionality
  2. Preview snippet details including parameters and prerequisites
  3. Check SAP Commerce version compatibility and module requirements
  4. Configure snippet parameters for your specific environment
  5. Copy Impex code to your SAP Commerce HAC Import/Export tool
  6. Test in development environment before production use
  7. Save favorite snippets for quick access and reuse

FAQ

What is SAP Commerce Impex?

Impex is SAP Commerce's data import/export framework that uses CSV-like syntax to create, update, and manage commerce data including products, customers, orders, and system configurations.

Are these Impex snippets safe for production?

All snippets include risk assessments and prerequisites. Always review carefully, test in development first, ensure proper backups, and validate parameters before production use.

Can I modify the snippets for my specific needs?

Yes, you can copy any snippet and modify it according to your requirements. The parameter system allows for easy customization of snippet behavior and values.

What SAP Commerce versions are supported?

Snippets support multiple SAP Commerce versions from 6.7 to 2211. Each snippet shows compatible versions and required modules for proper functionality.

How do I execute an Impex snippet?

Copy the snippet code, paste it into SAP Commerce HAC (Hybris Administration Console) Import/Export tool, configure parameters, and execute. Always test with dry-run first.

What are the different risk levels?

Risk levels indicate potential impact: Low (safe operations), Medium (moderate changes), High (significant impact), Critical (major system changes requiring careful planning).