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?
Page 1 / 1
Hi Heather,
Are there any filters in place on "start date" to fetch only recent contracts ?
Are there any filters in place on "start date" to fetch only recent contracts ?
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?
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?
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.
Reason being is that you want only one record per account ID - the oppty with the highest dollar value.
Yes, thanks Dan! Then you'll only get one record per account.
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!
@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!
Happy posting!
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
https://community.gainsight.com/conversations/how-to-aggregate-and-merge-data-in-the-rules-engine-5cc73f10e4b0f65098ff23bd
Reply
Sign up
If you ever had a profile with us, there's no need to create another one.
Don't worry if your email address has since changed, or you can't remember your login, just let us know at community@gainsight.com and we'll help you get started from where you left.
Else, please continue with the registration below.
Welcome to the Gainsight Community
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.