Skip to content

LoginFrequency__c

Sobject

apex
global class LoginFrequency__c extends SObject

Extends: SObject

Tracks monthly login activity per user, including total login count and number of unique days logged in. Used for login adoption reporting.


Fields

FieldDescription
global String CompositeKey__cComposite unique key combining User ID, year, and month to ensure one record per user per month.
global Decimal LoginMonth__cThe calendar month (1-12) for this login frequency record.
global Decimal LoginYear__cThe calendar year for this login frequency record.
global Date ReportingDate__cFormula-generated date set to the first day of the login month/year, enabling relative date filtering in reports (e.g.
global Decimal TotalLoginCount__cTotal number of login events for this user in the given month.
global Decimal UniqueLoginCount__cNumber of distinct days the user logged in during the given month.
global Id User__cThe user whose login activity is tracked by this record.
global User User__rThe user whose login activity is tracked by this record.

Field Details

CompositeKey__c

apex
global String CompositeKey__c

Composite unique key combining User ID, year, and month to ensure one record per user per month.

Field Attributes:

AttributeValue
Data TypeText(40), case-insensitive
Requiredfalse
Uniquetrue
External IDtrue

LoginMonth__c

apex
global Decimal LoginMonth__c

The calendar month (1-12) for this login frequency record.

Field Attributes:

AttributeValue
Data TypeNumber(4,0)
Requiredfalse
Uniquefalse
External IDfalse

LoginYear__c

apex
global Decimal LoginYear__c

The calendar year for this login frequency record.

Field Attributes:

AttributeValue
Data TypeNumber(4,0)
Requiredfalse
Uniquefalse
External IDfalse

ReportingDate__c

apex
global Date ReportingDate__c

Formula-generated date set to the first day of the login month/year, enabling relative date filtering in reports (e.g. THIS_YEAR, LAST_N_MONTHS).

Field Attributes:

AttributeValue
Data TypeDate
Requiredfalse
FormulaDATEVALUE(TEXT(LoginYear__c) & '-' & TEXT(LoginMonth__c) & '-' & '01')

TotalLoginCount__c

apex
global Decimal TotalLoginCount__c

Total number of login events for this user in the given month. Includes all login types (UI, API, etc.).

Field Attributes:

AttributeValue
Data TypeNumber(10,0)
Requiredfalse
Uniquefalse
External IDfalse

UniqueLoginCount__c

apex
global Decimal UniqueLoginCount__c

Number of distinct days the user logged in during the given month. A user who logs in 5 times on the same day counts as 1 unique day.

Field Attributes:

AttributeValue
Data TypeNumber(4,0)
Requiredfalse
Uniquefalse
External IDfalse

User__c

apex
global Id User__c

The user whose login activity is tracked by this record.

Field Attributes:

AttributeValue
Data TypeUser
Requiredfalse

User__r

apex
global User User__r

The user whose login activity is tracked by this record.

Field Attributes:

AttributeValue
Data TypeUser
Requiredfalse