---
schema_version: "1"
id: 80bc6a0b7f0024da0523151b01c6ab93513c609d200ba8fb4e5ca89a74d3f898
title: Einstein Profile Connector
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/commerce-cloud/einstein/references/generated-api-specs/einstein-profile-connector.md
canonical_url: https://developer.salesforce.com/docs/commerce/einstein-api/references/einstein-profile-connector
source_site: developer.salesforce.com
content_type: documentation
content_hash: b67c45404a78716cb24d05b369c962e0630f74da42b7889fc8a6a40c55b047a7
products:
  - B2C Commerce Einstein API
  - Salesforce APIs
---
Einstein Profile Connector

# Einstein Profile Connector

## API Overview

The Einstein Profile Connector API lets brands use the data they gather from their shoppers to personalize recommendations.

For setup and usage information information, see [Einstein Profile Connector](https://developer.salesforce.com/docs/commerce/einstein-api/guide/einstein-profile-connector-overview.html) in the Guides section.

* * *

_Rights of ALBERT EINSTEIN are used with permission of The Hebrew University of Jerusalem. Represented exclusively by Greenlight._

**Version:** v3

## Servers

*   `https://api.cquotient.com/v3`

Protocols: HTTPS.

## Security

*   `AMAuth` (OAuth 2.0)
    
    If you're bulk uploading files, you must pass an OAuth2 `Authorization` header with an Account Manager access token.
    
    To get that token, make the following request:
    
    ```
    curl -X POST \
      https://account.demandware.com/dwsso/oauth2/access_token \
      -H 'Authorization: Basic <INSERT BASIC AUTH HERE>' \
      -H 'Content-Type: application/x-www-form-urlencoded' \
      -d 'grant_type=client_credentials'
    ```
    
    For the Basic Authorization header, use base64 encoded `<Client ID>:<Password>`
    
    *   Header Authorization: \`JWT <AM access token>\`

## Operations

### POST sendUpdateProfile

`POST /activities/{siteId}/updateProfile`

Display name: Real-Time Activity.

Alerts the Einstein engine when a user updates their profile preferences.

#### Parameters

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

#### Request body

Media type: `application/json`. Schema: `object`.

*   `profile` (_array of UserProfileParam_, required) The array of profile data updated by the user. All profile data is treated as case sensitive.
*   `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](https://documentation.b2c.commercecloud.salesforce.com/DOC1/index.jsp?topic=%2Fcom.demandware.dochelp%2FDataProtectionAndPrivacy%2FLocalDataStorage.html&resultof=%22%64%77%61%6e%6f%6e%79%6d%6f%75%73%22%20%22%64%77%61%6e%6f%6e%79%6d%22%20) 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 parameter 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`.
    

### POST sendBulkProfile

`POST /upload/{siteId}/profile`

Display name: Bulk Upload. Security: AMAuth.

Bulk upload of profile data to the Einstein engine. All profile data is treated as case-sensitive.

#### Parameters

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

#### Request body

Media type: `multipart/form-data`. Schema: `object`.

*   `file` (_any_, required) The gzipped tsv profile data file to be uploaded.
    
    _Example_
    
    ```
    profile.tsv.gz
    ```
    

#### Responses

*   **200** A successful response is OK with no body.
*   **400** A validation error response contains a description of the problem.
*   **403** Either the provided client ID or authorization token was invalid.

## Schemas

### EinsteinSiteIdParam

The Einstein Site ID. Locate this ID in the upper-right corner of the [Einstein Configurator](https://configurator.cquotient.com). The ID has the format `xxxx-<Commerce Cloud Site ID>`.

Type: `string`.

### ClientIdParam

Make sure to pass the `x-cq-client-id` header with your B2C Commerce Account Manager API Client ID. Locate this value in Business Manager, under Administration > Site Development > Open Commerce API Settings. This settings page displays a JSON object containing the current OCAPI configuration. You can use any of the values in a `client_id` field, but ideally you should create one specifically for Einstein API calls.

Type: `string`.

### UserProfileParam

*   `name` (_string_, required) A unique name for the profile attribute.
*   `value` (_array of string_, required) An array of string values for the profile attribute.

### UserIdParam

Application-provided unique identifier for logged in users (hashed).

Type: `string`.

### 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](https://documentation.b2c.commercecloud.salesforce.com/DOC1/index.jsp?topic=%2Fcom.demandware.dochelp%2FDataProtectionAndPrivacy%2FLocalDataStorage.html&resultof=%22%64%77%61%6e%6f%6e%79%6d%6f%75%73%22%20%22%64%77%61%6e%6f%6e%79%6d%22%20) for more information).**

Type: `string`.

### ClientIpParam

The IP address of the end user. Use this parameter if you're sending activities server-side for a client application.

Type: `string`.

### ClientUserAgentParam

The user agent of the end user. Use this parameter if you're sending activities server-side for a client application.

Type: `string`.

### 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.

Type: `string`.

### ActivityResponse

*   `uuid` (_string_, required) The unique identifier for the end user. If you don't already have identifiers associated with a user, you can use this value in subsequent requests.  
    Example: `ce035cc0-2cbb-4d9e-95ed-c67fa55d1eb8`.

### ValidationError

*   `code` (_string_, required) A short error code to classify types of errors.  
    Example: `ValidationError`.
*   `errors` (_array of object_, required) A set of invalid parameters.
    *   `location` (_string_, required) The location of the invalid parameter.  
        Example: `body`.
    *   `msg` (_string_, required) A message describing why the parameter is invalid.  
        Example: ``Must provide a `products` array.``.
    *   `param` (_string_, required) The name of the invalid parameter.  
        Example: `products`.
*   `msg` (_string_, required) A descriptive message about the error that you can use to troubleshoot problems.  
    Example: ``There was a problem validating the request. See `errors`.``.