Skip to main content
sarah_johnson
Contributor ⭐️⭐️⭐️⭐️
April 3, 2018
Question

Create CTA "A" only if CTA "B" does not exist

  • April 3, 2018
  • 20 replies
  • 326 views
I need the ability to suppress the creation of CTA "B" if the customer already has CTA "A" opened.  

In our use case, the customer lifecycle is fairly linear, so until issue "A" is cleared up, of course issue "B" is going to be an issue because "B" is dependent on "A."  (In real terms, if the customer hasn't loaded their users, for example, of course there is going to be an issue with their usage of the product.)  Our CSMs do not want to see CTA "A" and "B" together.  They just want to see CTA "A" ... and when that's closed out, the system can evaluate whether CTA "B" is now an issue. 

I've built a bionic rule that does the following: 
1. Data task identifies all customers where "B" is an issue. 
2. Data task identifies all customers where CTA "A" currently exists in Open status.
3. Merge task combines the two data sets, keeping only the customers that are eligible for CTA "B" and do NOT already have CTA "A" raised.  
Action: Raise CTA "B" for those customers 

This isn't working.  The Action is raising CTA "B" for all customers in Data set 1, so it would seem that my attempt to merge out the ones identified in Data set 2 is failing.  

But my overarching question is, Am I approaching this in the best way, or is there a better way? 
If this is the best way, perhaps I need help troubleshooting my rule. 

20 replies

david_narunsky
Contributor ⭐️⭐️⭐️
April 3, 2018
I suggest two different rules/CTAs. Write one for situation A, then a second rule that monitors the conditions for situation B and assigns the new CTA. Deal with it in stages.
dan_ahrens
Expert ⭐️⭐️⭐️
April 3, 2018
Hi Sarah,

I think you're on the right track, but you should flip your filter at step 2 to return all customers where CTA "A" is NOT in open status. 

Then merge those two data sets keeping accounts where both conditions are true (inner join). This would give you all customers where "B" is an issue and for which CTA "A" is not currently open. 
VP of Customer Success at Forcepoint
sarah_johnson
Contributor ⭐️⭐️⭐️⭐️
April 3, 2018
I'm not understanding why the second data should look for customers where CTA "A" is not opened?  Sure, it would return customers where CTA "A" was opened at one point but is now closed, but CTA "A" may never have been opened for the customer, and now CTA "B" is an issue.  Those customers would not get CTA "B" raised. 

I am not sure any of the Join Types will work for me because I am trying to EXCLUDE the accounts that appear in the data set at step 2, then raise CTA "B" for the customers who remain in the data set after the merge.
david_narunsky
Contributor ⭐️⭐️⭐️
April 3, 2018
Don't think of it as looking for when CTA "A" is not opened. Think about it in terms of separating the conditions. Have CTA A"A look for one set of conditions from the data and CTA "B" look for a different set of conditions.
dan_ahrens
Expert ⭐️⭐️⭐️
April 3, 2018
@Sarah - the reason for filtering the second step in that way is that you want to exclude all customers that have CTA "A" open, right?

It's ok if your list on data task 2 includes customers that never had CTA "A" open or other reasons, as all that you want with this rule is to find customers who currently have CTA "B" condition but who do NOT currently have CTA "A" open. 

You'll actually want to do a left join - start by looking for all customers who have condition "B" (the left data set) AND then only keep customers who do NOT have CTA "A" open (the right data set). 

@David - there's not a need to separate this into two different rules, as the bionic nature of Bionic rules allows you to evaluate multiple different data sets and merge them into a single output comprised of multiple steps. 

Bionic rules was actually created, in part, to eliminate the need to create multiple rules chained together to accomplish a single (complex) task. 
VP of Customer Success at Forcepoint
darkknight
Expert ⭐️
April 3, 2018
@Dan to your point on not needing to split them into separate rules: multi-tasked bionic rules are awesome and provide flexibility for when you have no other way to achieve an objective but to merge various data sources. But I am an advocate for splitting tasks up into separate rules whenever possible because it makes troubleshooting far less complicated and cumbersome.
Jeff Kirkpatrick
sarah_johnson
Contributor ⭐️⭐️⭐️⭐️
April 4, 2018
@Dan, 
I'm following you now, on the reason for having task 2 pull customers where CTA "B" is not open. 

Here's where I'm stuck.  That second task has a source of CTA, not Account/Customer Info, so instead of returning me a list of customers without CTA "A", it's returning me nothing.  I only have 2 customers with CTA "A" raised, to test this with.  I know how I would do this in SQL 🙂 or even a Salesforce report, but I'm not sure how, in the GS Rules Engine, to query customers withOUT a particular CTA so that I actually get results in that data set to exclude in the merge?

Thank you!
sarah_johnson
Contributor ⭐️⭐️⭐️⭐️
April 4, 2018
I edited my above comment because I was referencing the wrong CTA.
dan_ahrens
Expert ⭐️⭐️⭐️
April 5, 2018
Hey Sarah, I built a sample out in a demo org to simulate your conditions:


First task is to look for all accounts where "NPS Product Comment" (CTA A) does not have a status of "Open" or "Work in Progress". The count aggregation ensures I have one record per Account ID.



The second task looks for all accounts that have a CTA of "Product Risk" type (Condition 😎. The count aggregation ensures I have one record per Account ID.



Next I merge the two data sets using the inner merge (retain common from both data sets) on ID. This will check every Condition B account to see if it also does not have CTA A currently open (but did have it open at one time). 



This is the output results. 

VP of Customer Success at Forcepoint
dan_ahrens
Expert ⭐️⭐️⭐️
April 5, 2018
And if I wanted to include accounts for which CTA A may never have been opened and which is not open now, a simple change can get you that. 

Change the filter on CTA A's task to includes instead of excludes. 

Change your merge to a left merge and add a field to show the value for the CTA A merge (this will be null if the CTA A is not open, it will have the customer name if the CTA A is open).



And then add a filter task to exclude any records where the field we added in the previous step is not null.

VP of Customer Success at Forcepoint