Analysing Accounts' historical data within CRM

Analysing Accounts' historical data within CRM

Hi,

we have the following business use case: our B2B partners sell on our portal and we would like to trigger some actions based on their activity. E.g. we would like to receive a notification whenever the weekly sales of the given account falls by 10% or the number of SKUs falls by 20%. 

To trigger such actions we would probably need to store historical KPI data for our accounts and trigger actions based on their dynamics. What is the best practice to do it?

Best,

Jerzy