Authored by Paritosh Nandi
Setting the correct value for the pyAgeFromDate property
The pyAgeFromDate property holds the date to calculate the age of a work item. It is often set to be the date and time that the work item was entered. This date might not always be the same as the date that the work object was created.
So, when designing an application, it is important to understand all the business scenarios to decide the correct value for the pyAgeFromDate property.
The following are general best practices for setting value for the pyAgeFromDate property:
- The date value should correspond to the business scenario and be decided based on the same.
- The value of pyAgeFromDate can be before or but not after the work object creation date.
The work object creation request might be done by using a piece of mail, then the date that the mail was posted can be set as pyAgeFromDate to get the age of the object.
For example, a letter was sent to a bank by an account holder to change their address. The letter was posted on 1 November 2020 and was delivered to the bank on 5 November 2020. Based on the request, the bank operator created a service request to change the account holder's address. The service request work object can have the pyAgeFromDate property set as 1 November 2020 and the pxCreateDateTime set as 5 November 2020.
Alternatively, if the account holder called the bank to change the address on 1 November 2020 2:00 PM, then the service request work object change to the account holder address will have both the pyAgeFromDate property and the pxCreateDateTime property set as 1 November 2020 2:00 PM.
Displaying the pyAgeFromDate property on the UI
The preferred formats to display pyAgeFromDate on the UI are as follows:
- 1 year, 1 month ago
- 10 months from now
- 2 years, 9 months from now
Using the pyAgeFromDate property for reporting
The pyAgeFromDate property is an exposed column on the work table and the work history table. This exposed column helps in creating a report to show the age of the work objects or use the same to generate a performance or quality report or case metrics, etc.
Using the pyAgeFromDate property for SLA purposes
The pyAgeFromDate property can be used to calculate the goal or deadline for an SLA as per the business scenario rather than using the pxCreateDateTime property to calculate the same.