ShareCatalogEvent

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

SDK Version: 11.0.0

Platform: androidJvm (Android)


Overview 

An event to capture when a user shares a catalog object.

ShareCatalogEvent is part of the Salesforce Marketing Cloud Unified SDK for Android and is used to track sharing interactions with catalog items within your application.


Class Declaration 

1class ShareCatalogEvent : CatalogEvent

Inheritance Hierarchy 

1Event (abstract)
2  └── EngagementEvent (sealed)
3        └── CatalogEvent (sealed)
4              └── ShareCatalogEvent

Properties 

Inherited from CatalogEvent 

catalogObject 

  • Type: CatalogObject
  • Description: Represents the catalog item associated with this event

Inherited from EngagementEvent 

category 

1open override var category: Event.Category
  • Description: The Event category Name. Category contains list of allowed values

priority 

1open override val priority: Priority
  • Description: Defines the priority level for the event

Methods 

Inherited from EngagementEvent 

attributes() 

1open override fun attributes(): Map<String, Any>
  • Returns: Map<String, Any> - The Event attributes for this event
  • Description: Returns a map containing string keys and any type values representing event attributes

name() 

1open override fun name(): String
  • Returns: String - The name for the event
  • Description: The name for the event. This value must match the Event Name used when creating the event in the Marketing Cloud UI for proper tracking functionality

Related Types 

CatalogObject 

Represents various items that can be tracked such as products or blog posts.

Constructor:

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

Parameters:

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

Usage 

ShareCatalogEvent is used to track when users share catalog objects in your application. As a subclass of CatalogEvent, it requires a CatalogObject that identifies what item was shared.

This event integrates with the Salesforce Marketing Cloud’s engagement tracking system and should be tracked using the EventManager component of the SDK.


Related Classes 

Other catalog event types in the same package:

  • ViewCatalogEvent - Captures when a user views a catalog object
  • ViewCatalogDetailEvent - Captures when a user views catalog object details
  • QuickViewCatalogEvent - Captures quick view interactions
  • ReviewCatalogEvent - Captures when a user reviews a catalog object
  • CommentCatalogEvent - Captures when a user comments on a catalog object
  • FavoriteCatalogEvent - Captures when a user favorites a catalog object

Notes 

  • This is a concrete implementation of CatalogEvent specifically for tracking sharing actions
  • As part of a sealed class hierarchy, type safety is ensured at compile time
  • The @JvmOverloads annotation on CatalogObject provides Java interoperability with overloaded constructors
  • Events must be configured in the Marketing Cloud UI with matching event names for proper tracking