Case Lifecycle report is a standard Salesforce report type provided, but probably the one that is not so famous, not many people use, a bit confusing and very less official article about this.
What is the Case Lifecycle report?
Run case lifecycle reports to view the results of the Range field, which indicates the length of time since the case last changed status or owner. Each time the status or owner changes, the counter begins again at zero --- copy from Using Custom Report Types to Report on Support Activity.
Here are a few in the trailblazer community throughout the years:
List of Salesforce articles:
Let us walk through this report type with samples:
- 1st row: duration at 7.9 minutes, the case owned by 'Johan Dev501' for 7.9 minutes, before hand over to the new owner.
After a few minutes, hours, or days, refreshing the report will not change anything, except the duration for the last items, which will keep counting.
- 2011 - https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000A7ThYSAV
- 2013 - https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000A7Mt7SAF
- 2013 - https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000A7Z2gSAF
- 2013 - https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000A7iXtSAJ
- 2014 - https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000A7syiSAB
- 2014 - https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000A8JsWSAV
- 2015 - https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000A7dltSAB
- 2016 - https://trailhead.salesforce.com/trailblazer-community/feed/0D53A00002j2vkQSAQ
- 2017 - https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000A80zOSAR
- 2018 - https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000A7UcBSAV
- 2018 - https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000A8FNMSA3
- 2020 - https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000A8ifqSAB
- 2020 - https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000A91WPSAZ
- 2021 - https://trailhead.salesforce.com/trailblazer-community/feed/0D54S00000A96K8SAJ
Ideas related to this in IdeaExchange:
- 2013 - Need to add "Action" filter Case Lifecycle Report
- 2015 - Case Lifecyce report Business Duration Hours
- 2015 - Bucket Business Hours Duration in Case LifeCycle Report
- 2021 - Case Lifecycle report with duration filter doesn't filter as expected
- 2022 - Enable Case duration or age in business hours to enable the 'Business Hours Age' field
From all the above documents and conversations that can be found using Google search, nothing really explained how the Case Lifecycle report works?
What is the Case Lifecycle report?
It is a standard report type that tracks the duration of a case when the case owner or status is changed.
There are 5 fields available in the Case Lifecycle report:
- Case History Owner
- Case History Status
- Case History Last Modified By
- Case History Last Modified Date
- Duration
1. New Case Creation
Remember, every time the case owner or status is changed, a new entry will be created for the case lifecycle report, so creating a new case will generate a new entry for the lifecycle report.
The below report uses using minutes unit.
As mentioned earlier, changing the case owner will create a new entry to the lifecycle report.
- 1st row: duration at 7.9 minutes, the case owned by 'Johan Dev501' for 7.9 minutes, before hand over to the new owner.
- 2nd row: duration at 1.083 minutes, the latest duration since it was assigned to a new owner and it has been held for 1.083 minutes
Let us refresh the report without changing anything on the case
- 2nd row: now the duration changed to 5.1 seconds
3. Change the Case owner
Changing the case owner will create a new entry to the lifecycle report.
- 3rd row: the duration start for the new owner
4. Change Status
Changing the case status will create a new entry to the lifecycle report.
- Case History Last Modified Date, show when does the change happen
- Case History Owner, show the owner when the entry is created
- Case History Status, show the status when the entry is created
- Notice that Age keeps counting from the beginning; this is because the case is still open
5. Closing the case
Changing the case status will create a new entry to the lifecycle report.
- But, the duration on the last entry keeps counting, no matter the case status
6. Re-open the case
Changing the case status will create a new entry to the lifecycle report.
- Duration of the initial Closed entry stopped at 4.033 minutes
7. Re-closing the case
After a few minutes, hours, or days, refreshing the report will not change anything, except the duration for the last items, which will keep counting.
Can this report type be customized?
Can we use a custom field instead of standard status and owner? Unfortunately, not; see the above list of idea exchanges. Can we track only the owner or status? Unfortunately, also not.
Can we get the data with SOQL?
The closest we can get is by query to the CaseHistory object but the result will not have duration and age.
SELECT Id, CaseId, CreatedBy.Name, CreatedDate, Field, OldValue, NewValue FROM CaseHistory WHERE CaseId = '5000I00002FBKqF' AND Field IN ('Owner','Status') ORDER BY CreatedDate
Note: The owner will show double, as ID and Name, so you just need to get one as needed.
For the owner with Name, the DataType field = Text, while for the owner with Id, the DataType field = EntityId
If you have anything to add for the Case Lifecycle report type, please comment on this blog.
No comments:
Post a Comment