AgentforcePageContext

struct AgentforcePageContext

Represents the current page context within a Salesforce application.

This structure encapsulates information about the user's current location and context within the application, enabling the Agentforce SDK to provide contextually relevant responses and suggestions.

PropertyTypeDescription
actionNameString?The current action being performed on the page
appNameString?The name of the current Salesforce application
objectApiNameStringThe API name of the current Salesforce object
pageNameString?The name of the current page, if applicable
pageTypeString?The type of page currently being displayed
recordIdString?The unique identifier of the current record, if viewing a specific record
MethodSignatureDescription
initinit(appName:objectApiName:attributes:)Creates a new page context with the specified app and object information