Untitled

Overview

Represents different types of instrumentation events in the Agentforce SDK. This enumeration categorizes all the trackable events within the SDK, each carrying an EventInfo payload with specific details. The events cover the complete lifecycle of Agentforce interactions from initialization through conversation completion.

Declaration

enum AgentforceInstrumentationEvent

Properties

Property Type Description
recommendationClick String Static marker for recommendation click events.
recommendedActionClick String Static marker for recommended action click events.

Methods

Method Signature Description
initializeAgentforce case initializeAgentforce(eventInfo: EventInfo) Tracks the initialization and bootstrap process of the Agentforce SDK.
initializeAgents case initializeAgents(eventInfo: EventInfo) Tracks the initialization and discovery of available agents.
resetChat case resetChat(eventInfo: EventInfo) Tracks conversation reset operations.
switchAgents case switchAgents(eventInfo: EventInfo) Tracks agent switching during active conversations.
initialResponseReceived case initialResponseReceived(eventInfo: EventInfo) Tracks the time from user input until the first response content is received.
finalResponseReceived case finalResponseReceived(eventInfo: EventInfo) Tracks the complete response time from user input to final completion.
perfEvent case perfEvent(eventInfo: EventInfo) Generic performance event for various system operations.
userInteractionEvent case userInteractionEvent(eventInfo: EventInfo) Tracks user interaction events throughout the interface.
errorEvent case errorEvent(eventInfo: EventInfo) Tracks error events across all SDK operations.

Example Usage

// Track initialization performance
let initEvent = AgentforceInstrumentationEvent.initializeAgentforce(
    eventInfo: EventInfo(
        name: "SDKBootstrap",
        startTime: startTime,
        endTime: endTime
    )
)

// Track user interactions
let userEvent = AgentforceInstrumentationEvent.userInteractionEvent(
    eventInfo: EventInfo(
        name: "MessageSent",
        properties: [
            EventInfoProperty.voiceOrText: "text",
            EventInfoProperty.messageId: messageId
        ]
    )
)