Shopper Context API

Use the Shopper Context API to add personalization features for your shoppers, such as:

  • Sending a specific promotion based on the shopper’s store selection.
  • Giving early access to products if the shopper is at a specific location.

You can use the Shopper Context API to track contextual information about a shopper, such as location, device type, and more. You can even set a date and time in the future to preview responses for upcoming site changes.

Until now, B2C Commerce has relied on session-based information to provide information about the shopper. In a headless world, as APIs become stateless, new mechanisms are needed to provide details about the shopper. To handle this, we’ve introduced the new Shopper Context API.

In order to use the Shopper Context API, you should be set up to use SLAS. For making calls to Shopper Context APIs, a valid SLAS token is needed.

Let’s look at a shopper’s personalized journey while browsing for jackets in the Northern Trail Outfitters shopping app:

  1. She visits the shopping app and starts as a guest shopper
  2. She’s from Seattle and notices that signing up to receive email promotions gets 15% off her purchase.
  3. After signing up, she logs into the shopping app. The two contexts that reveal about the shopper are that:
    • She’s browsing from the city Seattle.
    • She’s logged into the shopping app.
  4. She takes advantage of the 15% off and makes a purchase!

ShopperContextJourney

Shopper context feature has out of the box integration with PWA kit and offers following benefits:

  • Enable merchants to build an experience where shoppers can view future dated promotions.
  • Gain larger share of wallet by showing location-specific inventory and pricing to target segment.
  • Render accurate pricing and promotions based on shopper’s store selection.
  • Support for OCAPI gives greater flexibility to personalize hybrid storefronts.