CommentCatalogEvent

Overview 

CommentCatalogEvent is a class in the Salesforce Marketing Cloud Unified SDK for Android that captures user comments on catalog objects.

Package: com.salesforce.marketingcloud.sfmcsdk.components.events

Platform: androidJvm

SDK Version: 11.0.0 (SFMC SDK v3.1.0)


Class Declaration 

1class CommentCatalogEvent : CatalogEvent

Description 

An event to capture when a user comments on a catalog object. This event extends CatalogEvent and is used for tracking user engagement when they add comments to catalog items such as products, blog posts, or other trackable objects.


Inheritance Hierarchy 

1Event
2  └── EngagementEvent
3        └── CatalogEvent
4              └── CommentCatalogEvent

Inherited Properties 

From CatalogEvent 

catalogObject 

1val catalogObject: CatalogObject

A property that holds the catalog object associated with this event.

From EngagementEvent 

category 

1open override var category: Event.Category

The Event category Name. Category contains list of allowed values.

priority 

1open override val priority: Priority

Defines the priority level for the event.


Inherited Methods 

From EngagementEvent 

attributes() 

1open override fun attributes(): Map<String, Any>

Returns a map of event attributes for this event.

Returns: Map<String, Any> - The Event attributes for this event.

name() 

1open override fun name(): String

Returns the name for the event. This value must match the Event Name used when creating the event in the Marketing Cloud UI to trigger associated actions.

Returns: String - The event name.


Related Types 

CatalogObject 

The catalogObject property uses the CatalogObject class, which represents various items that can be tracked.

Constructor:

1@JvmOverloads
2constructor(
3    type: String,
4    id: String,
5    attributes: Map<String, Any> = mapOf(),
6    relatedCatalogObjects: Map<String, List<String>> = mapOf()
7)

Parameters:

  • type: String - A type name representing the catalog object
  • id: String - A unique id representing the catalog object
  • attributes: Map<String, Any> - A map of user-supplied values (optional, defaults to empty map)
  • relatedCatalogObjects: Map<String, List<String>> - A map of related catalog objects (optional, defaults to empty map)

Properties:

  • val type: String
  • val id: String
  • val attributes: Map<String, Any>
  • val relatedCatalogObjects: Map<String, List<String>>

Sibling Classes 

Other classes that extend CatalogEvent:

  • ViewCatalogEvent - Captures when a user views a catalog object
  • ViewCatalogDetailEvent - Captures when a user views detailed catalog information
  • QuickViewCatalogEvent - Captures quick views of catalog items
  • ShareCatalogEvent - Captures catalog item sharing events
  • ReviewCatalogEvent - Captures catalog item review events
  • FavoriteCatalogEvent - Captures when users mark catalog objects as favorites

Usage Notes 

As a sealed class hierarchy member, CommentCatalogEvent is part of a controlled type system for engagement events. The class inherits its core functionality from CatalogEvent and EngagementEvent, providing a standardized way to track user comment interactions with catalog objects in the Salesforce Marketing Cloud ecosystem.

The event name returned by name() must match the Event Name configured in the Marketing Cloud UI to properly trigger associated actions and workflows.