---
schema_version: "1"
id: 3d97afd6e0ce989ec173f30ad4f3f0a010dc494887d67a86a8e7bc5d653671b1
title: ActivityMetric
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/object_reference/sforce_api_objects_activitymetric.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_activitymetric.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 60960d6bd3a128bc0aa10e38fca0242108491b5be7ea33d3da52cff403c0382b
description: Represents activities that were added to Salesforce automatically by Einstein Activity Capture and manually by users.
---
# ActivityMetric

Represents activities that were added to Salesforce automatically by Einstein Activity Capture and manually by users.

This object is available in API version 45.0.

## Supported Calls

create(), describeSObjects(), query(), retrieve(), update(), upsert()

## Special Access Rules

Unless otherwise noted, Einstein Activity Capture and Activity Metrics must be enabled.

## Fields

| Field | Details |
| --- | --- |
| BaseId | 
Type

reference

Properties

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

Description

The ID of the record that the activities apply to.



 |
| BaseType | 

Type

string

Properties

Filter, Group, Nillable, Sort

Description

The entity that corresponds to the BaseId



 |
| FirstCallDateTime | 

Type

dateTime

Properties

Create, Filter, Nillable, Sort, Update

Description

Indicates the date when the first call was made. This field is available only to Sales Engagement users. Einstein Activity Capture and Activity Metrics aren’t required.



 |
| FirstEmailDateTime | 

Type

dateTime

Properties

Create, Filter, Nillable, Sort, Update

Description

Indicates the date when the first email was sent. This field is available only to Sales Engagement users. Einstein Activity Capture and Activity Metrics aren’t required.



 |
| InactiveDays | 

Type

int

Properties

Filter, Group, Nillable, Sort

Description

Indicates the number of days since the most recent activity was completed. This field is derived from the Last Activity Date field.



 |
| LastActivityDateLastModDate | 

Type

dateTime

Properties

Filter, Nillable, Sort

Description

Indicates when the LastActivityDateTime field was last modified.



 |
| LastActivityDateTime | 

Type

dateTime

Properties

Create, Filter, Nillable, Sort, Update

Description

Indicates the date when the most recent activity was completed.



 |
| LastCallDateLastModDate | 

Type

dateTime

Properties

Filter, Nillable, Sort

Description

Indicates when the LastCallDateTime field was last modified.



 |
| LastCallDateTime | 

Type

dateTime

Properties

Create, Filter, Nillable, Sort, Update

Description

Indicates the date when the most recent call was made through Sales Dialer or Inbox.



 |
| LastEmailDateLastModDate | 

Type

dateTime

Properties

Filter, Nillable, Sort

Description

Indicates when the LastEmailDateTime field was last modified.



 |
| LastEmailDateTime | 

Type

dateTime

Properties

Create, Filter, Nillable, Sort, Update

Description

Indicates the date when the most recent email was sent or received.



 |
| LastEmailReceivedDateTime | 

Type

dateTime

Properties

Create, Filter, Nillable, Sort, Update

Description

Indicates the date when the most recent email was received.

Available in API version 54.0 and later.





 |
| LastEmailSentDateTime | 

Type

dateTime

Properties

Create, Filter, Nillable, Sort, Update

Description

Indicates the date when the most recent email was sent.

Available in API version 54.0 and later.





 |
| LastEventDateLastModDate | 

Type

dateTime

Properties

Filter, Nillable, Sort

Description

Indicates when the LastEventDateTime field was last modified.



 |
| LastEventDateTime | 

Type

dateTime

Properties

Create, Filter, Nillable, Sort, Update

Description

Indicates the date when the most recent event was completed.



 |
| LastTaskDateLastModDate | 

Type

dateTime

Properties

Filter, Nillable, Sort

Description

Indicates when the LastTaskDateTime field was last modified.



 |
| LastTaskDateTime | 

Type

dateTime

Properties

Create, Filter, Nillable, Sort, Update

Description

Indicates the date when the last task was completed.



 |
| NextActivityDateLastModDate | 

Type

dateTime

Properties

Filter, Nillable, Sort

Description

Indicates when the NextActivityDateTime field was last modified.



 |
| NextActivityDateTime | 

Type

dateTime

Properties

Create, Filter, Nillable, Sort, Update

Description

Indicates the date of the next scheduled task or event. Only open tasks in the future are included.



 |

## Usage

Use this object to see data about sales activities that were added to Salesforce manually and by Einstein Activity Capture. Activity Metric fields are derived from your activity data. For example, the Inactive Days field indicates the number of days since the most recent activity was completed. Create a trigger that notifies a user when there isn’t any activity on an account for a certain amount of time.