---
title: "SXA Storefront shared events"
slug: "sxa-storefront-shared-events"
abstract: "The Commerce Foundation layer provides the mechanism that enables a rendering on a storefront page to communicate with other renderings on the page. The current implementation uses a CXACartContext service that interacts with the CXAObservable service and uses various shared events."
---
# SXA Storefront shared events

SXA Storefront uses the following shared events:

- Event: Description
- CXAEvent.ClearMessage: Requests the Message Summary rendering to remove messages that are displayed.
- CXAEvent.SendMessage: Requests the Message Summary rendering to display the message.Event argument:CXAMessageType enum:InfoErrorWarning

```csharp
{
  type:
CXAMessageType,
  message: String
}

```

- CXAEvent.CartUpdated: Emits the event when the latest cart is received. This event is emitted by the CXACartContext whenever the object received by the context is of type CartJsonResult.
- CXAEvent.SetPrice: Requests the Product Price rendering to display the price of the current product variant or product bundle selection.Event argument:

```csharp
{
  productId: String,
  listPrice: Number,
  adjustedPrice:
Number,
  isOnSale: Boolean,
  savingsMessage:
String
}

```

- CXAEvent.SelectedProduct: Emits an event when a product variant is selected.

```csharp
Event argument:
{
  CurrentCatalogName:
String,
  CurrentProductId:
String,
  CurrentVariantId:
String
}

```

- CXAEvent.SelectedBundleProduct: Emits an event when a product bundle is selected.Event argument:

```csharp
{
  bundleSelection:
BundleSelection
}

```

- CXAEvent.SelectedProductValid: Emits the event to indicate that the current product selection is valid so that the Add to Cart component can enable the Add to Cart button.
- CXAEvent.SelectedProductInvalid: Emits the event to indicate that the current product selection is valid so that the Add to Cart component can disable the Add to Cart button.
- CXAEvent.BundleStockStatusValid: Emits the event to indicate that the current bundle selection’s stock status is valid so that the Product Bundle can then request for the Bundle Selection’s price.Event argument:

```csharp
{
  productId: String
}

```

- CXAEvent.GetStockInfo: Product Inventory component emits this event when the response is received from the API endpoint Catalog/GetCurrentProductStockInfo.Event argument:

```csharp
{
  productId: String,
  stockInfos: Array
}

```

- CXAEvent.DiscountApplied: CXACartContext emits the event after calling to the API endpoint Cart/ApplyDiscount.
- CXAEvent.DiscountRemoved: CXACartContext emits the event after calling to the API endpoint Cart/RemoveDiscount.