Question

Aggregation of data over time

  • 25 April 2017
  • 2 replies
  • 31 views

I want to create a rule in which it calculates the SUM of each value for a specific field over time. For example, I want to trigger at CTA when a client submits more than 5 tickets in a week. I am already compiling rach ticket they submit, the date submitted in. I created a rule where created date is less than 8 days ago but how can I add all tickets they've submitted in the last 7 days? Changing the field to "SUM" is only summing up the values for that day. Calculated field doesn't seem to be an option as I can't create a calculation off of case numbers. 

2 replies

I have another similar CTA where I want to alert CSMs when their client has sent over 50 emails. We send the number of email they send each day as a field so not sure how to sum up email sends over time (when I use the SUM filter it is only summing THAT day not the previous days)
Userlevel 5
Hey Berin,



You can do this in Custom rules and in Bionic rules. For custom rules you need to set the filter to fetch the data for last 7 days. Once you do this, a single rule run will only generate today's aggregate of past 7 days. You need run a historical run of the rule for last month to get the daily aggregate for past month



In case of bionic rules, you can do this in Transformation(A.K.A Aggregate) task where you can put date field in Group By. Once you hit on the gear icon on the date field you would get options to Group by week or day or month. This would group give the results you expect but do this only for a single run. If you have to schedule it then filter the data according to the schedule.

Reply