...
Get first 20 conversations with pagination
Check date range and remove conversations if not fall in specific date range
Get all saved tickets handled in last 2 months for these posts (* Performance Impact –1 detail has been explained later)
Run an iteration of conversations and apply filter with following criteria
Check Page reply filtering enabled or not, if enabled, remove the conversations
Check Last message id of the done conversations, if new communication doesn’t match with last message id, keep it in the list else discard.
Remove all the conversations that already a ticket
if no tickatable conversation found, then check conversations with next pagination and follow steps 1 –4 again (* Performance Impact - 2)
If tickatable data found return conversation data and display
...
Our tool has a policy that, we will show last 2 months data to our client. So if any communication comes within this period and not handled, it will consider as ticket-able. Otherwise we will not consider it.
User can choose any data date range like
Last 7 days
Last 15 days
Last 30 days
Last 60 days
Custom range within last 60 days
...