Help Center

Calculating relative date conditions for timeline rollups

If a timeline rollup uses a relative date condition - such as within the last X days - BlueConic will automatically recalculate when the result of the query would change.

Timeline Event Rollup for Last 7 days relative dates.png

For example, if you create a rollup that counts the number of orders in the last 7 days, BlueConic evaluates relevant profiles and tracks when the recalculation should happen, counting 7 days in the future (UTC, rounding up until midnight). When a timeline event is added, BlueConic will calculate the rollup and then plan to recalculate in 7 days.

Example showing a sliding window to re-evaluate a rollup for the last 7 days (UTC)

A profile has 4 orders eligible to be counted in a rollup:

  • April 1 04:00
  • April 2 05:00
  • April 4 06:00
  • April 8 07:00

On April 10, the rollup is evaluated and BlueConic calculates the number of orders placed in the past 7 days (UTC) and schedules a re-evaluation time:

  • NumberOfOrdersInLast7days: 2
  • The system will reschedule a re-evaluation for April 12 at 00:00 (when April 4 order would no longer qualify for the 'last 7 calendar days' condition).

If no new orders have been placed, on April 12 at 00:00, the system will re-evaluate:

  • NumberOfOrdersInLast7days: 1
  • The system will reschedule a re-evaluation for April 16 00:00 (when the April 8 order would no longer match the sliding date condition).

If no new orders have been placed, on April 16 at 00:00, the system will re-evaluate:

  • NumberOfOrdersInLast7days: 0
  • The system won’t schedule a re-evaluation. (There are no order events that match the condition anymore, and no existing order events that will match the condition in the future.)

 

Was this article helpful?
0 out of 0 found this helpful