Einstein Recommendations

POST sendViewProduct

POST /activities/{siteId}/viewProduct

Display name: viewProduct.

Tells the Einstein engine when a user opens a product page.

Parameters

  • siteId (path, EinsteinSiteIdParam, required)
  • x-cq-client-id (header, ClientIdParam, required)

Request body

Media type: application/json. Schema: object.

  • product (ProductForView, required)
  • userId (UserIdParam) Application-provided unique identifier for logged in users (hashed).
  • cookieId (CookieIdParam) The unique identifier of an anonymous shopper. If you're making API requests from a traditional B2C Commerce storefront, pass the dwanonymous_* cookie value (See Browser-Based Local Data Storage for more information).
  • clientIp (ClientIpParam) The IP address of the end user. Use this parameter if you're sending activities server-side for a client application.
  • clientUserAgent (ClientUserAgentParam) The User Agent of the end user. Use this paramenter if you're sending activities server-side for a client application.
  • realm (RealmParam) A unique four-character ID that you can get from your Account Executive (AE) or Customer Success Manager (CSM). The realm is often the first four characters of the Einstein Site ID. However, if your site changes realms in B2C Commerce, the Einstein Site ID won’t use the correct realm.

Responses

  • 200 A successful response contains a UUID for the given user.

    Media type: application/json. Schema: ActivityResponse.

  • 400 A validation error response contains an array of invalid parameters.

    Media type: application/json. Schema: ValidationError.