Reporting on neglected accounts, leads, opportunities within a specific date range.

Hi,

We are struggling to report on neglected customers, for example, our team have to see their accounts within an 8 week cycle, how do we report on this to view the previous 8 weeks and to see the future 8 weeks.  We can see what is booked however we cannot see who hasn't been booked. 

Any help would be great.

Lou 

Parents
  • If I understand correctly you have Meetings related to Accounts via the flex-relate and you want to see which Accounts have not had a meeting booked for 8 weeks or more.

    You could do a SQL advanced report. 

    The date 8 weeks ago is: 

    DATE_SUB( CURDATE() , INTERVAL 8 WEEK ) 

    so the meetings scheduled since then which are related to Accounts (the flexfield on the meeting is "Related to" Accounts)

    select *
    from meetings 
    where parent_type = 'Accounts' 
    and date(date_start) >= DATE_SUB( CURDATE() , INTERVAL 8 WEEK ) 
    and meetings.deleted = 0

    Therefore the Accounts that have not had a meeting scheduled in the last 8 weeks are all Accounts except those with a meeting retrieved by the query above:

    select *
    from accounts
    where accounts.deleted = 0 and 
    accounts.id not in 
    (select parent_id 
    from meetings 
    where parent_type = 'Accounts' 
    and date(date_start) >= DATE_SUB( CURDATE() , INTERVAL 8 WEEK ) 
    and meetings.deleted = 0)

    Hope this works for you, note that I've not tested this thoroughly (the queries work but they were not checked against the data in detail) and may need refinement but it might get you on the right path...

    FrancescaS

  • Thank you Francesca for your reply, this is a little beyond my technical capability however there are people in the business who will understand this.  I will take this to them. 

    Thanks again

    Lou

Reply Children
No Data