---
schema_version: "1"
id: 07b51e71f3c08a16a56660f9d74fecdf17b433d54d1abfea8478dae2a41d6dce
title: LiveAgentSession
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_liveagentsession.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_liveagentsession.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 8116a4c26a83a4214e377c582963e9a5b5f2024b658ad31fc8cb385bf71a5e66
description: This object is automatically created for each Chat session and stores information about the session. This object is available in API versions 28.0 and later.
---
# LiveAgentSession

This object is automatically created for each Chat session and stores information about the session. This object is available in API versions 28.0 and later.

![Note](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/images/icon_note.png)

#### Note

Standard fields for the LiveAgentSession object can only be modified if your administrator has given you editing permissions for these records.

## Supported Calls

create(), delete(), describeLayout(), describeSObjects(), getDeleted(), getUpdated(), query(), retrieve(), search(), undelete(), update()

## Fields

| Field Name | Details |
| --- | --- |
| AgentId | 
Type

reference

Properties

Create, Filter, Group, Sort, Update

Description

ID of the agent associated with the session.



 |
| ChatReqAssigned | 

Type

int

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The number of chat requests that were assigned to an agent during a session.



 |
| ChatReqDeclined | 

Type

int

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The number of chat requests that were declined by an agent during a session.



 |
| ChatReqEngaged | 

Type

int

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The number of chats in which an agent was engaged during a session.



 |
| ChatReqTimedOut | 

Type

int

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The number of chat requests that timed out in an agent’s queue during a session.



 |
| LastReferencedDate | 

Type

dateTime

Properties

Filter, Nillable, Sort

Description

The date and time that the session record was last referenced.



 |
| LastViewedDate | 

Type

dateTime

Properties

Filter, Nillable, Sort

Description

The date and time that the session record was last viewed.



 |
| LoginTime | 

Type

dateTime

Properties

Create, Filter, Sort, Update

Description

The date and time an agent logged in during the session.



 |
| LogoutTime | 

Type

dateTime

Properties

Create, Filter, Sort, Update

Description

The date and time an agent logged out during a session.



 |
| Name | 

Type

string

Properties

Autonumber, Defaulted on create, Filter, idLookupSort

Description

The name of the session.



 |
| NumFlagLoweredAgent | 

Type

int

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The number of assistance flags lowered by the agent.



 |
| NumFlagLoweredSupervisor | 

Type

int

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The number of assistance flags lowered by the supervisor.



 |
| NumFlagRaised | 

Type

int

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The number of assistance flags raised by the agent.



 |
| OwnerId | 

Type

reference

Properties

Create, Defaulted on create, Filter, Group, Sort, Update

Description

ID of the owner of the session record.



 |
| TimeAtCapacity | 

Type

int

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The amount of time an agent spent with the maximum number of chats in his or her queue.



 |
| TimeIdle | 

Type

int

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The amount of time an agent spent idle during the session.



 |
| TimeInAwayStatus | 

Type

int

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The amount of time an agent spent with a status of “Away” during a session.



 |
| TimeInChats | 

Type

int

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The amount of time an agent spent engaged in chats during a session.



 |
| TimeInOnlineStatus | 

Type

int

Properties

Create, Filter, Group, Nillable, Sort, Update

Description

The amount of time an agent spent with a status of “Online” during a session.



 |

## Usage

Use this object to query and manage chat session records.

## Associated Objects

This object has the following associated objects. Unless noted, they are available in the same API version as this object.

[LiveAgentSessionHistory](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_history.htm "StandardObjectNameHistory is the model for all history objects associated with standard objects. These objects represent the history of changes to the values in the fields of a standard object.")

History is available for tracked fields of the object.

[LiveAgentSessionOwnerSharingRule](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_ownersharingrule.htm "StandardObjectNameOwnerSharingRule is the model for all owner sharing rule objects associated with standard objects. These objects represent a rule for sharing a standard object with users other than the owner.")

Sharing rules are available for the object.

[LiveAgentSessionShare](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_associated_objects_share.htm "StandardObjectNameShare is the model for all share objects associated with standard objects. These objects represent a sharing entry on the standard object.")

Sharing is available for the object.