Skip to main content
Users
CloudPortalLogin
  • Powered byPowered by
Developing with Sitecore CDP
Data privacy
Before you start sending data
Integrating with Sitecore CDP
Stream API
Batch API
REST APIs
Data lake export service
  • Sitecore CDP for developers
  • Stream API
  • Sitecore Engage SDK reference
  • Functions
  • Engage.updatePointOfSale(pointOfSale)

Engage.updatePointOfSale(pointOfSale)

The updatePointOfSale() function updates the value of pointOfSale that you previously specified in the settings object. Then, every event that you send inside the scope of this function will automatically include the updated point of sale.

sidebar. Parameters

Parameter

Type

Description

pointOfSale

string

The new point of sale.

You must set this value to the name of a point of sale that exists in your instance of Sitecore CDP.

Here's an example of a scenario where an organization uses multiple points of sale. The default point of sale is specified as "myretailsite" in the settings object. If certain conditions are met, the point of sale is updated to "myretailsite/europe". Then, a VIEW event is sent with the new point of sale.

RequestResponse
import { init } from "@sitecore/engage";

const loadEngage = async () => {
  const engage = await init({
      // ...
      pointOfSale: "myretailsite"
  });

  if (region === "europe") {
      engage.updatePointOfSale("myretailsite/europe");
      engage.pageView({
          // ...
      });
  };
};

Do you have some feedback for us?

If you have suggestions for improving this article,

Privacy policySitecore Trust CenterCopyright © 1999-2025 Sitecore