Skip to main content
Sitecore Documentation
  • Learn
  • Downloads
  • Changelog
  • Roadmap
XP
Sitecore Experience Commerce
  • Sitecore Experience Commerce
    • Commerce Connect
                • A customizable domain model
                • Service layer API
                • Service method pipelines
                • Passing data between pipeline components
                • System messages
                • Success
                • Configuration
                • Use a custom factory
                • The EaPlanProvider class
                • The ContactFactory class
                • The ItemClassificationService class
                • The CommerceContext class
                • Service provider
                • Custom Commerce Connect cart and orders entities
  1. Integration service layers
  1. Sitecore Experience Commerce
  2. Commerce Connect
  3. Commerce Connect Integration
  4. Integrating with Commerce Connect
  5. Integration service layers
  6. The CommerceContext class

The CommerceContext class

Version:

The CommerceContext class is used to determine the current product and inventory location that is the focus of the site. This class is currently only used by the inventory rule conditions when no stock location or product id is provided to calculate against.

If you have suggestions for improving this article, let us know!

Documentation Assistant

This assistant uses AI to generate responses based on Sitecore documentation. While it has access to official sources, answers may be incomplete or inaccurate and should not be considered official advice or support.
Powered by
k
kapa.ai
Protected by reCAPTCHA

© Copyright 2026, Sitecore A/S or a Sitecore affiliated company.
All rights reserved.

Privacy policySitecore Trust CenterTerms of use