Solved

Bionic Rule Help

  • 16 April 2019
  • 7 replies
  • 112 views

Userlevel 7
Badge +10
I need some help configuring a rule, and I've tried about a hundred different things and still can't get it to work as I want it to.



Goal of Rule:



We are using the Contract object in SF, so I want to ping that object by account, and then, fire an CTA based on the Contract Start Date of the contract with the largest NCV.



Current Process:



Task 1: Dataset



Use Contract Object and pull all contracts with the status of Active



Show: Account ID, Contract Number, Contract Start Date, Contract End Date, NCV



Task 2: Transformation



Take data from the first pull



Show: Same fields, but click on NCV and choose Max of NCV



That's where I run into issues. So, for example account, I have two active contracts. Let's say 1 for $10 with a contract start date of July of 2018, and another one for $5 with a contract start date of April of 2019. I only want the transformation to return that first contract so that when I write my On-boarding rule, it gets excluded because the start date is not recent. I tried to do a Merge of the Dataset and the Transformation, but that didn't work either.



Does that make sense? Any ideas what I'm doing wrong?


icon

Best answer by kate_green 16 April 2019, 23:19

View original

7 replies

Badge
Hi Heather,



Are there any filters in place on "start date" to fetch only recent contracts ?






Badge
HI Heather - Because the fields Contract Number, Contract Start Date, and Contract End date are unique for each line, taking the MAX of NCV will give you the MAX for each unique line of data.



You'll need to pull two separate datasets and then merge them.



Dataset 1 (same as yours above):



Use Contract Object and pull all contracts with the status of Active



Show: Account ID, Contract Number, Contract Start Date, Contract End Date, NCV



Dataset 2:



Use Contract Object



Show: Account ID, MAX of NCV



Merge (retain all from left dataset):



Left: Dataset 1



Right: Dataset 2



Merge on fields: Account ID, NCV



Show all fields from above (account id, ncv, contract number, start date, end date)



Use the merge to fire the CTA. Does that help?


Userlevel 7
Badge +2
This is the same approach I was going to recommend, except I think you'll want to right merge instead of left merge.



Reason being is that you want only one record per account ID - the oppty with the highest dollar value.


Badge
Yes, thanks Dan! Then you'll only get one record per account.


Userlevel 7
Badge +10
Thanks, @kate_green and @dan_ahrens! I feel silly for not being able to figure that out, but you know how it is when you have been starring at something for hours. I appreciate the help!






Userlevel 7
Badge +1
@heather_hansen Thanks for posting! There is never a silly thing when it comes to learning and always welcome to ask any questions realted to the product, so that others learn from this post.



Happy posting!


Userlevel 7
Badge +2
Just in case anyone else stumbles upon this post, I decided to make a how-to video post that demonstrates how to accomplish @heather_hansen's use case.



https://community.gainsight.com/conversations/how-to-aggregate-and-merge-data-in-the-rules-engine-5cc73f10e4b0f65098ff23bd


Reply