---
schema_version: "1"
id: 82e49823e3538eb3666fd795c009029967398bd67246101d3d47f0aee253217f
title: Catalog Interaction
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/data-cloud/interactions-sdk/guides/c360a-api-catalog-interaction.md
canonical_url: https://developer.salesforce.com/docs/data/salesforce-interactions-sdk/guide/c360a-api-catalog-interaction.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 3ab937d3dd7b1f1f6ab0b35eba4ec10222d1b4218f283378d0baced0b9df6656
products:
  - Salesforce Interactions SDK
  - Data 360 Developer Documentation
---
# Catalog Interaction

A Catalog interaction is the standard interaction used to capture a customer's engagement with any trackable item from your catalog, such as products, categories, articles, and so on.

The primary purpose is to capture what the user is currently viewing or engaging with, along with all the relevant metadata for that item.

## Catalog Interaction Structure

The Catalog Interaction is defined within the main `interaction` object of the event payload.

| Field Name                            | Field Type | Description                                                                                                                                                            |
| ------------------------------------- | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `name`                                | string     | **Required**. The type of interaction that occurred. Use the [standard SDK constants](#standard-interaction-names) for this field. For example, `View Catalog Object`. |
| `catalogObject.id`                    | string     | **Required**. A unique ID representing the catalog object.                                                                                                             |
| `catalogObject.type`                  | string     | **Required**. The defined type of the catalog item. For example, `Product`, `Blog`, and so on.                                                                         |
| `catalogObject.attributes`            | object     | A dictionary of user-supplied values.                                                                                                                                  |
| `catalogObject.relatedCatalogObjects` | object     | A dictionary of related catalog objects.                                                                                                                               |

This example event shows required fields (`name`, `type`, `id`) and optional fields (`attributes`, `relatedCatalogObjects`) within the interaction payload.

```json
{
  "interaction": {
    "name": "View Catalog Object",
    "catalogObject": {
      "type": "Product",
      "id": "product-xyz",
      "attributes": {
        "name": "Product XYZ",
        "category": "Clothing",
        "color": "Red",
        "sku": "product-xyz-sku"
      },
      "relatedCatalogObjects": [
        {
          "Sizes": ["S", "M", "L"] // Related attributes or objects
        }
      ]
    }
  }
}
```

## Standard Interaction Names

Always use the built-in constants for the `interaction.name` field to ensure consistency across your instrumentation.

| Interaction Name                                                              | Value                        |
| ----------------------------------------------------------------------------- | ---------------------------- |
| `SalesforceInteractions.CatalogObjectInteractionName.ViewCatalogObject`       | `View Catalog Object`        |
| `SalesforceInteractions.CatalogObjectInteractionName.ViewCatalogObjectDetail` | `View Catalog Object Detail` |
| `SalesforceInteractions.CatalogObjectInteractionName.FavoriteCatalogObject`   | `Favorite Catalog Object`    |
| `SalesforceInteractions.CatalogObjectInteractionName.CommentCatalogObject`    | `Comment Catalog Object`     |
| `SalesforceInteractions.CatalogObjectInteractionName.ReviewCatalogObject`     | `Review Catalog Object`      |
| `SalesforceInteractions.CatalogObjectInteractionName.ShareCatalogObject`      | `Share Catalog Object`       |
| `SalesforceInteractions.CatalogObjectInteractionName.QuickViewCatalogObject`  | `Quick View Catalog Object`  |

## Implementation Examples

### Using the SDK

This example shows how to capture a catalog interaction using a `sendEvent()` call, typically triggered by a user action like clicking a "quick view" button.

```javascript
SalesforceInteractions.sendEvent({
  interaction: {
    name: "View Catalog Object",
    catalogObject: {
      type: "Product",
      id: "product-xyz",
      attributes: {
        name: "Product XYZ",
        category: "Clothing",
        color: "Red",
        sku: "product-xyz-sku",
      },
      relatedCatalogObjects: [
        {
          Sizes: ["S", "M", "L"],
        },
      ],
    },
  },
});
```

### Using the Sitemap

When tracking order interactions that occur upon page load (like viewing a product detail page), use the Sitemap configuration. This ensures the event fires consistently and loads necessary data for the catalog object.

Here’s how a catalog interaction is captured using the sitemap.

```javascript
SalesforceInteractions.init().then(() => {
  const sitemapConfig = {
    global: {},
    pageTypes: [
      {
        name: "product_detail",
        isMatch: () => true,
        interaction: {
          name: SalesforceInteractions.CatalogObjectInteractionName.ViewCatalogObject,
          catalogObject: {
            type: "Product",
            id: "product-xyz",
            attributes: {
              name: "Product XYZ",
              category: "Clothing",
              color: "Red",
              sku: "product-xyz-sku",
            },
            relatedCatalogObjects: [
              {
                Sizes: ["S", "M", "L"],
              },
            ],
          },
        },
      },
    ],
  };
  SalesforceInteractions.initSitemap(sitemapConfig);
});
```

**See Also**

- [Translation of SDK Events to Web Connector Schemas](https://developer.salesforce.com/docs/data/salesforce-interactions-sdk/guide/c360a-api-translating-sdk-events-to-web-connector-schemas.md)
- [Custom Events](https://developer.salesforce.com/docs/data/salesforce-interactions-sdk/guide/c360a-api-custom-events.md)
