Loading
Salesforce now sends email only from verified domains. Read More
Agentforce and Einstein Generative AI
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Data Model and Calculated Fields for Agent Analytics

          Data Model and Calculated Fields for Agent Analytics

          The data model for Agent Analytics is based on Session Tracing, which is a collection of DLOs (Data Lake Objects) and DMOs (Data Model Objects) that contain detailed session trace logs of agent behavior. The data model also includes references to every LLM call the reasoning engine makes to support joins with feedback data or guardrails metrics. Extended Service Data Model DMOs such as GenAiFeedback, GenAIContentCategory, and TenantEnrichedUsageEvent support feedback, Trust Layer, and flex credit analytics.

          Analytics Data Model

          An entity relationship diagram (ERD) showing the data model for Agent Analytics.

          Analytics Calculated Fields

          The analytics semantic layer is the infrastructure that represents the link between the different entities of session tracing and their connection with the Analytics data entities. To view the model, in Data 360, go to the semantic model tab and open Agentforce Analytics Foundations. The Analytics Semantic Layer provides comprehensive calculated fields for querying session and agent performance data. For example, understand the relationship between session duration and quality ratings by combining `Session_Count`, and `Average_Session_Duration_clc` measures with the `Quality_Score_clc` dimension, or track weekly or monthly performance trends by combining the `Unique_Sessions_clc`, and `Abandonment_Rate_clc` measures with `Session_Date dimension`.

          Measures and Dimensions

          Measures are calculated numerical values that provide quantitative insights into agent performance, including engagement rates, deflection rates, escalation rates, abandonment rates, timing metrics like session duration and response latency, and aggregate counts of interactions, sessions, and users. Dimensions are categorical fields used to group, filter, and segment this analytical data, providing status indicators and classifications such as abandonment status, engagement status, entity types (user vs. agent), and session states that enable analysts to slice and dice the quantitative measures across different categories for deeper performance analysis and targeted reporting.

          Analytics also extends with intent-specific insights from Agent Optimization. These insights include intent-level metrics, such as their duration and quality scores that measure the relevance of agent responses. Tags generated by the LLM help cluster and categorize these intents for deeper analysis of user engagement patterns.

          Measures
          Label Field Name Description
          Abandonment Rate Abandonment_Rate_clc Abandonment rate percentage (abandoned sessions ÷ all sessions)
          Abandoned Sessions Abandoned_Sessions_clc Number of sessions where users left due to error, browser crash, or timeout
          Agent Messages Agent_Messages_clc The total number of messages sent by the agent
          Agent Triggered Actions Agent_Triggered_Actions_clc The total number of agent-triggered actions across all sessions
          Agent to User Message Ratio Agent_User_Message_Ratio_clc The ratio of agent messages to user messages across all sessions
          Average Agent Interaction Latency Average_Agent_Interaction_Latency_clc Average agent response time in milliseconds
          Average Answer Faithfulness Score Average_Answer_Faithfulness_Score_clc

          Average score (0–1) measuring how closely the agent's response adheres to grounded source data (such as knowledge base articles).

          Note
          Note To use this metric, in Setup, toggle on Audit and Feedback and Knowledge/RAG Quality Data and Metrics.
          Average Answer Relevance Score Average_Answer_Relevance_Score_clc

          Average score (0–1) measuring the relevance of the agent's response to the user's request.

          Note
          Note To use this metric, in Setup, toggle on Audit and Feedback and Knowledge/RAG Quality Data and Metrics.
          Average Context Relevance Score Average_Context_Relevance_Score_clc

          Average score (0–1) measuring whether the agent retrieved the correct data source to answer the user's question.

          Note
          Note To use this metric, in Setup, toggle on Audit and Feedback and Knowledge/RAG Quality Data and Metrics.
          Average Interactions Per Session Average_Interactions_Per_Session_clc Average number of interactions per session
          Average Moment Duration Average_Moment_Duration_clc Average duration of an intent in seconds
          Average Quality Score Average_Quality_Score_clc Average relevance score (1-5) of agent responses across sessions
          Average Session Duration Average_Session_Duration_clc Average session duration in seconds
          Average User Interactions Average_User_Interactions_clc Average number of user interactions across all sessions
          Deflected Sessions Deflected_Sessions_clc Sessions ended by user (not by escalation or abandonment)
          Deflection Rate Deflection_Rate_clc Deflection rate percentage (deflected sessions ÷ all sessions)
          Engaged Sessions Engaged_Sessions_clc Sessions where user received reply based on agent-triggered action
          Engagement Rate Engagement_Rate_clc Engagement rate percentage (engaged sessions ÷ all sessions)
          Interaction Error Rate Error_Rate_clc The interaction error rate across all sessions. Errors are only recorded for interactions that contain at least one action or LLM step.
          Escalated Sessions Escalated_Sessions_clc Number of sessions escalated to human or different agent
          Escalation Rate Escalation_Rate_clc Escalation rate percentage (escalated sessions ÷ all sessions)
          Interruption Count Interruption_Count_clc Number of voice interactions interrupted by the user
          Interruption Rate Interruption_Rate_clc Percentage of voice interactions interrupted by the user relative to total session interactions
          Quality Score Reasoning Quality_Score_Reasoning_clc Explanation for assigned quality score
          Stickiness Rate Stickiness_Rate_clc Ratio of daily active users to monthly active users; the percentage of monthly users who are also active daily
          Success Rate Success_Rate_clc The percentage of agent interactions that included action steps and completed without errors
          Unique Interactions Unique_Interactions_clc Number of distinct user and agent interactions recorded
          Unique Moments Unique_Moments_clc Number of distinct intents recorded within defined time frame
          Unique Sessions Unique_Sessions_clc Number of distinct sessions recorded within a time frame
          Unique Tags Unique_Tags_clc Number of unique tags created within defined time frame
          Unique Users Unique_Users_clc The number of unique users interacting with the agent. For Service Agents, this includes messaging end users; for other agent types, this counts users by session participant role.
          User Messages User_Messages_clc The total number of messages sent by the user
          Adherence Response Rate Adherence_Response_Rate_clc Percentage of agent responses for which instruction adherence meets the defined threshold (high adherence), derived from Trust Layer instruction adherence evaluation
          Average Agent Toxicity Score Average_Agent_Toxicity_Score_clc

          Average toxicity detector score (0–1) for agent output, aggregated from Trust Layer category scores.

          Note
          Note To use this metric, in Setup, toggle on Audit and Feedback and related Trust Layer data.
          Average User Prompt Injection Average_User_Prompt_Injection_clc

          Average likelihood of prompt injection detected in user prompts (prompt defense), derived from Trust Layer evaluation.

          Note
          Note To use this metric, in Setup, toggle on Audit and Feedback and related Trust Layer data.
          Negative User Feedback Negative_User_Feedback_clc Count of negative user feedback events on agent responses (for example, thumbs down), from Gen AI feedback data joined to session trace
          Positive User Feedback Positive_User_Feedback_clc Count of positive user feedback events on agent responses (for example, thumbs up), from Gen AI feedback data joined to session trace
          Task Resolution Rate Task_Resolution_Rate_clc

          Percentage of sessions or interactions evaluated as fully resolved by the Task Resolution detector (Trust Layer).

          Note
          Note Task Resolution evaluation is available as a beta detector; see Trust Layer documentation for availability.
          Total Flex Credits Total_Flex_Credits_clc Sum of flex credits attributed to agent or generative AI usage, typically sourced from enriched usage events
          Dimensions
          Label Field Name Description
          Abandonment Status Abandonment_Status_clc Indicates whether user left the session
          Agent Adherence Status Agent_Adherence_Status_clc Instruction adherence level for the response (for example, high, low, uncertain), from Trust Layer InstructionAdherence evaluation on GenAIContentCategory
          Agent Interaction Latency Agent_Interaction_Latency_clc Time for agent to respond to user request (milliseconds)
          Deflection Status Deflection_Status_clc Indicates whether session ended at user's request
          Engagement Status Engagement_Status_clc Indicates if user received reply based on agent action
          Escalation Status Escalation_Status_clc Specifies if escalation moved session to different agent
          Is Session Ended Is_Session_Ended_clc Indicates whether session has ended
          Is Interaction With Errors Is_Interaction_With_Errors_clc Identifies interactions that encountered errors. Errors are only recorded for interactions that contain at least one action or LLM step.
          Is User Is_User_clc Indicates whether entity is an agent or user
          Moment Duration Moment_Duration_clc Duration of the intent in seconds
          Quality Score Quality_Score_clc Relevance score (1-5) of agent response to user request
          Session Ambiguous Session_Ambiguous_clc Indicates whether the session could not be classified clearly as deflected, escalated, abandoned, or cleanly ended
          Session Duration Session_Duration_clc Session duration in seconds

          Calculated Field Formulas

          The following formulas define how key calculated fields are computed from the underlying data model.

          Measure Formulas
          Label Field Name Formula
          Abandonment Rate Abandonment_Rate_clc
          [Abandoned_Sessions_clc]/[Unique_Sessions_clc]
          Abandoned Sessions Abandoned_Sessions_clc
          COUNTD(IF [Abandonment_Status_clc] THEN [AI_Agent_Session].[AI_Agent_Session_Id] END)
          Agent Messages Agent_Messages_clc
          COUNTD(
            IF [AI Agent Session Participant].[AI Agent Session Participant Role] = "AGENT"
            THEN [AI Agent Interaction Message].[AI Agent Interaction Message Id]
            ELSE NULL
            END
          )
          Agent Triggered Actions Agent_Triggered_Actions_clc
          COUNTD(
            IF [AI Agent Interaction Step].[Ai Agent Interaction Step Type] = "ACTION_STEP"
            THEN [AI Agent Interaction Step].[AI Agent Interaction Step Id]
            ELSE NULL 
            END
          )
          Agent to User Message Ratio Agent_User_Message_Ratio_clc
          [Agent_Messages_clc]
          /
          [User_Messages_clc]
          Average Agent Interaction Latency Average_Agent_Interaction_Latency_clc
          AVG(IF [AI_Agent_Interaction].[Ai_Agent_Interaction_Type] = 'TURN' THEN [Agent_Interaction_Latency_clc] END)
          Average Answer Faithfulness Score Average_Answer_Faithfulness_Score_clc
          AVG(
            IF NOT ISNULL([AI Agent Interaction].[Telemetry Trace]) 
               AND [AI Agent Interaction].[Telemetry Trace] != 'NOT_SET' 
            THEN [AI Retriever Quality Metric].[Faithfulness Relevancy Score] 
            END
          )
          Average Answer Relevance Score Average_Answer_Relevance_Score_clc
          AVG(
            IF NOT ISNULL([AI Agent Interaction].[Telemetry Trace]) 
               AND [AI Agent Interaction].[Telemetry Trace] != 'NOT_SET' 
            THEN [AI Retriever Quality Metric].[Answer Relevancy Score] 
            END
          )
          Average Context Relevance Score Average_Context_Relevance_Score_clc
          AVG(
            IF NOT ISNULL([AI Agent Interaction].[Telemetry Trace]) 
               AND [AI Agent Interaction].[Telemetry Trace] != 'NOT_SET' 
            THEN [AI Retriever Quality Metric].[Context Precision Score] 
            END
          )
          Average Interactions Per Session Average_Interactions_Per_Session_clc
          AVG(IF [Is_Session_Ended_clc] THEN {FIXED[AI_Agent_Session].[AI_Agent_Session_Id]:[Unique_Interactions_clc]} END)
          Average Moment Duration Average_Moment_Duration_clc
          AVG([Moment_Duration_clc])
          Average Quality Score Average_Quality_Score_clc
          AVG([Quality_Score_clc])
          Average Session Duration Average_Session_Duration_clc
          AVG([Session_Duration_clc])
          Average User Interactions Average_User_Interactions_clc
          AVG( IF [Is_User_clc] THEN { FIXED [AI_Agent_Session_Participant].[Participant] : [Unique_Interactions_clc] } END )
          Deflected Sessions Deflected_Sessions_clc
          COUNTD(IF [Deflection_Status_clc] THEN [AI_Agent_Session].[AI_Agent_Session_Id] END)
          Deflection Rate Deflection_Rate_clc
          [Deflected_Sessions_clc]/[Unique_Sessions_clc]
          Engaged Sessions Engaged_Sessions_clc
          COUNTD( IF [Engagement_Status_clc] THEN [AI_Agent_Interaction].[AI_Agent_Session] END )
          Engagement Rate Engagement_Rate_clc
          [Engaged_Sessions_clc]/[Unique_Sessions_clc]
          Interaction Error Rate Error_Rate_clc
          COUNTD(
            IF [Is_Interaction_With_Errors_clc]
            THEN 
              [AI Agent Interaction].[AI Agent Interaction Id]
            END
          ) / [Unique_Interactions_clc]
          Escalated Sessions Escalated_Sessions_clc
          COUNTD(IF [Escalation_Status_clc] THEN [AI_Agent_Session].[AI_Agent_Session_Id] END)
          Escalation Rate Escalation_Rate_clc
          [Escalated_Sessions_clc]/[Unique_Sessions_clc]
          Interruption Count Interruption_Count_clc
          COUNTD(
            IF [AI Agent Interaction Step].[Ai Agent Interaction Step Type] = 'INTERRUPT_STEP'
            THEN [AI Agent Interaction Step].[AI Agent Interaction Step Id]
            END
          )
          Interruption Rate Interruption_Rate_clc
          COUNTD(
            IF [AI Agent Interaction Step].[Ai Agent Interaction Step Type] = 'INTERRUPT_STEP'
            THEN [AI Agent Interaction Step].[AI Agent Interaction Id]
            END
          ) / [Unique_Interactions_clc]
          Success Rate Success_Rate_clc
          COUNTD(
            IF [Is_Interaction_Engaged_clc] AND NOT [Is_Interaction_With_Errors_clc]
            THEN 
              [AI Agent Interaction].[AI Agent Interaction Id]
            END
          ) / [Unique_Interactions_clc]
          Stickiness Rate Stickiness_Rate_clc
          (AVG(IF [Is_User_clc] THEN {FIXED DATE([AI Agent Session].[Start Timestamp]): [Unique_Users_clc]} END))
          /
          (AVG({FIXED UPPER(LEFT(DATENAME("Month", [AI Agent Session].[Start Timestamp]),3)) + " " + STR(YEAR([AI Agent Session].[Start Timestamp])): [Unique_Users_clc]}))
          Unique Interactions Unique_Interactions_clc
          COUNTD(IF [AI_Agent_Interaction].[Ai_Agent_Interaction_Type] = 'TURN' THEN [AI_Agent_Interaction].[AI_Agent_Interaction_Id] END)
          Unique Moments Unique_Moments_clc
          COUNTD([AI_Agent_Moment].[AI_Agent_Moment_Id])
          Unique Sessions Unique_Sessions_clc
          COUNTD([AI_Agent_Session].[AI_Agent_Session_Id])
          Unique Tags Unique_Tags_clc
          COUNTD([AI_Agent_Tag].[AI_Agent_Tag_Id])
          Unique Users Unique_Users_clc
          COUNTD(
            IF [Is_User_clc]=TRUE THEN
              [AI Agent Session Participant].[Participant]
            END
          )
          User Messages User_Messages_clc
          COUNTD(
            IF [Is_User_clc]
            THEN [AI Agent Interaction Message].[AI Agent Interaction Message Id]
            ELSE NULL
            END
          )
          Dimension Formulas
          Label Field Name Formula
          Abandonment Status Abandonment_Status_clc
          IF [Is_Session_Ended_clc] AND { FIXED [AI_Agent_Session].[AI_Agent_Session_Id] : MAX([Deflection_Status_clc]) }=FALSE AND { FIXED [AI_Agent_Session].[AI_Agent_Session_Id] : MAX([Escalation_Status_clc]) }=FALSE THEN TRUE ELSE FALSE END
          Agent Interaction Latency Agent_Interaction_Latency_clc
          DATEDIFF('MILLISECONDS', [AI_Agent_Interaction].[Start_Timestamp], [AI_Agent_Interaction].[End_Timestamp])
          Deflection Status Deflection_Status_clc
          IF [AI_Agent_Interaction_Step].[Ai_Agent_Interaction_Step_Type] = 'SESSION_END' AND ( [AI_Agent_Interaction_Step].[Name] = 'CLOSED_USER_REQUEST' OR [AI_Agent_Interaction_Step].[Name] = 'CLOSED_ACTION' ) THEN TRUE ELSE FALSE END
          Engagement Status Engagement_Status_clc
          { FIXED [AI Agent Session].[AI Agent Session Id] : MAX(
            IF [Is Interaction Engaged]
            THEN TRUE
            ELSE FALSE
            END) }
          Escalation Status Escalation_Status_clc
          { FIXED [AI Agent Session].[AI Agent Session Id] : MAX(
            IF 
              [AI Agent Interaction Step].[Ai Agent Interaction Step Type]='SESSION_END'
              AND
              [AI Agent Interaction Step].[Name]='CLOSED_TRANSFERRED'
            THEN TRUE
            ELSE FALSE
            END )}
          Is Interaction With Errors Is_Interaction_With_Errors_clc
          { FIXED [AI Agent Interaction].[AI Agent Interaction Id] : MAX(
            IF NOT ISNULL([AI Agent Interaction Step].[Error Message]) 
               AND LEN(TRIM([AI Agent Interaction Step].[Error Message])) > 0 
               AND [AI Agent Interaction Step].[Error Message] != "NOT_SET"
            THEN TRUE
            ELSE FALSE
            END
          ) }
          Is Session Ended Is_Session_Ended_clc
          { FIXED [AI Agent Session].[AI Agent Session Id] : MAX(
            IF [AI Agent Interaction].[Ai Agent Interaction Type]='SESSION_END'
              OR DATEDIFF('HOUR', { FIXED [AI Agent Session].[AI Agent Session Id] : MAX(
                                    [AI Agent Interaction].[End Timestamp]) },
                                  NOW()
                       ) >= 24
            THEN TRUE
            ELSE FALSE
            END
            )
          }
          Is User Is_User_clc
          IF 
            [AI Agent Session Participant].[AI Agent Session Participant Role]='USER'
            AND
            ([AI Agent Session Participant].[Participant Object] = 'MessagingEndUser' 
             OR
             NOT ([AI Agent Session Participant].[AI Agent Type] IN ('EinsteinServiceAgent', 'AgentforceServiceAgent')))
          THEN TRUE
          ELSE FALSE
          END
          Moment Duration Moment_Duration_clc
          DATEDIFF('SECOND', [AI_Agent_Moment].[Start_Timestamp], [AI_Agent_Moment].[End_Timestamp])
          Quality Score Quality_Score_clc
          INT([AI Agent Moment Relevance Score].[AI Agent Tag.Value])
          Session Duration Session_Duration_clc
          { FIXED [AI Agent Session].[AI Agent Session Id] : MAX(
            IF [Is Session Ended]
            THEN DATEDIFF( 'SECOND',
              { FIXED [AI Agent Session].[AI Agent Session Id] : 
                  MIN( IF [AI Agent Interaction].[Ai Agent Interaction Type]='TURN' 
                  THEN [AI Agent Interaction].[Start Timestamp]
                  END
                  ) },
              { FIXED [AI Agent Session].[AI Agent Session Id] : 
                  MAX(IF [AI Agent Interaction].[Ai Agent Interaction Type]='TURN' 
                  THEN [AI Agent Interaction].[End Timestamp]
                  END
                  ) }
              )
            END 
          ) }
           
          Loading
          Salesforce Help | Article