---
schema_version: "1"
id: 83462374172f87b25ce752ba857f98401fa61453a877bbb8fbce373f67c73710
title: MessagingSessionMetrics
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_messagingsessionmetrics.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_messagingsessionmetrics.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 14cfa5ae4c43e9963c99c372a699caddbce5416a361b722fe55e1aad70ec1a94
description: Represents a metric gathered about a specific enhanced messaging session, such as average agent response time. This object is available starting in October 2024 in API version 62.0 and later.
---
# MessagingSessionMetrics

Represents a metric gathered about a specific enhanced messaging session, such as average agent response time. This object is available starting in October 2024 in API version 62.0 and later.

To reference this object in reports, create a custom report type with Messaging Session as the primary object and Messaging Session Metrics as the secondary object.

Be sure to include the MessagingSessionMetricType field in your custom report. These records are available only for Messaging sessions created after October 1, 2024. 

## Supported Calls

create(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve()

## Special Access Rules

Multiple MessagingSessionMetrics records are generated when a session ends in an enhanced Messaging channel or Messaging for In-App and Web channel. These records aren't generated for standard messaging sessions.

## Fields

| Field | Details |
| --- | --- |
| MessagingSessionId | 
Type

reference

Properties

Create, Filter, Group, Sort

Description

The ID of the related messaging session.

This field is a relationship field.

Relationship Name

MessagingSession

Relationship Type

Master-detail

Refers To

MessagingSession (the master object)



 |
| MessagingSessionMetricType | 

Type

picklist

Properties

Create, Filter, Group, Restricted picklist, Sort

Description

The metric that this record captures.

Possible values are:

- AgentMessageCount—The number of messages sent by the Service rep in the session.
- AverageAgentResponseTime—The average number of seconds between an end user's message and the agent’s response in the session.
- AverageEndUserResponseTime—The average number of seconds between an agent or bot’s message and the end user's response in the session.
- EndUserMessageCount—The number of messages sent by the end user in the session.
- MaxAgentResponseTime—The longest span of time (in seconds) between an end user's message and the agent’s response in the session.
- MaxEndUserResponseTime— The longest span of time (in seconds) between an agent or bot’s message and the end user's response in the session.
- ServiceRepAcceptToFirstResponseTime— The time (in seconds) between when a Service rep accepts the work in Omni-Channel and their first response to the customer in the session. Available in API version 68.0 and later.
- ServiceRepFirstResponseTime—The time (in seconds) between when a conversation is routed to a human and when a service rep first responds. Routing is triggered either when an end user sends a message that initiates routing, or when an agent or bot decides to route the conversation to a human. Available in API version 67.0 and later.

For each closed messaging session in enhanced Messaging channels and Messaging for In-App and Web, one MessagingSessionMetrics record is generated per MessagingSessionMetricType value. This means that six MessagingSessionMetrics records are generated per session.



 |
| MessagingSessionMetricValue | 

Type

int

Properties

Create, Filter, Group, Sort

Description

The value of the measured metric. For example, if the MessagingSessionMetricType is EndUserMessageCount, a MessagingSessionMetricValue of 12 means that the end user sent 12 messages during the messaging session.



 |
| Name | 

Type

string

Properties

Autonumber, Defaulted on create, Filter, idLookup, Sort

Description

An autogenerated number identifying the MessagingSessionMetrics record.



 |