Account, Contact, Opportunity and Case Forms use an activity timeline to display activities (emails, phone calls, survey responses, etc.) related to the record. The TekStack sorts the timeline by the "Sort Order" field on the activity pointer table, which exists but is not populated by default. Using the "Sort Order" is superior to the default Microsoft configuration for timelines, which uses "Modified On" to sort the activities. Modified On is not a good field to use for sorting, since the order might not be what a user would expect. For example, if an appointment activity takes place on Sunday, but a user updates the appointment with meeting notes on Tuesday, the Modified On date will be Tuesday, even though the meeting occured on Sunday.
 
To address this shortcoming, TekStack includes logic to automatically set the sort order on activities. You need to register each activity type that you would like the sort order set. 
 
Navigate to Configure > Organization > TekStack Settings
 
In the Common tab, there is a section called "Activity Sort Order Plugin Steps"
 
 
For each activity that you would like to set, click + to add a new activity. Enter the logical name of the activity table.
 
 
You can look up the logical name of the table in the Maker Portal. Navigate to the table and click Properties. 
 
 
Once the activity table is added to the list, TekStack will set the sort order automatically when the activity is created or updated.
 

Sort order Logic

The sort order is set according to the following logic.
 
Activity Type: Appointment, Phone Call, Task
 
If End Date contains Data

Set Sort Date to End Date

Otherwise if Due Date contains Data

Set Sort Date to Due Date

Otherwise 

Set Sort Date to Created On date

Activity Type: Email
 
If Date Sent contains data:

Set Sort Date to Date Sent

Otherwise

Set Sort Date to Created On Date