Ranking in Rules Engine

It would be great if we could rank accounts in the Rules Engine, similar to ranking in Report Builder. For example, ranking accounts so that only X number receives a certain CTA or action. A specific use case would be ranking our top 50 customers by spend to automatically generate CTAs and other field triggers as part of our top 50 customer engagement program.

Great request, Calvin - I'm adding my vote.

I like the fact that this could also satisfy another much-requested rules-engine enhancment: the ability to select the "most recent" of a series based on a date.

Right now, to get the 'most recent' record, MaxDate has to be grabbed from the larger data set then joined back into that larger set to "flag" the record that's most recent.

The same "ranking" feature in Transformations would allow you to select the "Top 1" by a date for the most recent record in the same way that "Top 50" might allow all contacts with the top 50 health scores to be selected.

NOTE: I think this ranking has to be allowed within sub-groups - treated as another aggregator, essentially - so the top 5 or "x" within, say, each Customer Type could be selected.

Great suggestion Calvin!

A function like TOP, LIMIT, or RANK in rules engine would be quite useful!

Jumping on here with a vote to rank not just customers, but any records. I may want to find the Contacts with the most pageviews, regardless of their Accounts, for example.

I concur with all of you, need rank() over partition by kind of function in rules


Ranking opportunites would be another use case. If a customer has multiple contract/Oppts. I have a use case for ranking them by contract start date.

Great suggestion! I want ranking sort in Rule Engine, too.

When I sort by count field which I created with Rule engine tasks,

We can update data from small count to large count.

It indicates we can update most large count record's data to the updated records.

I was looking for this exactly today, thanks Scott.

Right now, to get the 'most recent' record, MaxDate has to be grabbed from the larger data set then joined back into that larger set to "flag" the record that's most recent.

+1 for me, any updates? This would be great. We would like to use ranking in rules engine for several areas: 

Contact level reporting for Top 50 accounts on a dashboard  (Being able to use a tile report with ranking would be...incredible...so, double bonus if that became possible) 

Use in Journey Orchestrator - sending emails to Top X accounts in different segments or by territory

Potentially help prioritize CTAs for some of our high volume touch teams>currently we use a score to sort for this team, but could see this functionality making a ‘sort’ logic much easier 

We have many use cases where we are looking for the Top X and these functions would be great if we could have then integrated into the the product. 

Examples that we have: Support Incidents that we are ingesting - What are the top kinds of support incidents? 

Hi All,

This is a great idea, I can see how this is useful. I’ve added this to the roadmap and will push any updates. 

Hi @rakesh , any updates on this?

Hi @rakesh !

One of my customer was also looking for this feature to limit the number of CTAs created by a rule (ex - 50 a day)? Or is there a data function in Gainsight rule that shows the top x rows? Do we have any ETA?

 My users are only generating a type of retention CTA for customers who are at high risk. Due to the workload limit of our team members, we need to cap the number of this CTA to around 50 a week. Therefore, we need to be able to get the top 50 risk scores. Right now, we plan to pull the data out of Gainsight, calculate the top 50 and then enter that into gainsight back manually.

ccing @saewonpark 

+1 for our org as well. While the method outlined here is awesome, it’s not feasible past a few records. I need top 300. No way I’m doing all those merges.

Hi All.

I came across this use case recently, and I have calculated the Rank through Rules.

Here is the details.