Skip to main content
Hi!





I am trying to trigger a CTA for what we deem as an "Inactive" client which is based on usage date of our platform. I am not sure what would work best, creating new MDA where I can add some calculated fields or trying to calculate the data in a Bionic Rule using the Transformation task.





We have a field in the MDA labled "UsageEvent". This field contains each unique usage event performed by a user of our platform. The usage comes with the UserName and a SessionID (and some other data). The tracking description is populated in that field via an S3 connector with our dev team.





I am trying to trigger a CTA based on at least 1/2 of the licensed users on the account having a count of usage events < x amount. So if the account meets the criteria, to trigger a CTA for the CSM to alert them of a potentially risky client.





I am not that well versed using the Transformation task and have been struggling trying to create this calculation. Is this possible? Or, how would you attack this problem?





Thanks in advance!



Update: I am able to use the Transformation task and get a count of usage events per user over the previous month.





Just not sure how I would go from the user level to the account level in this situation as we are looking for 1/2 of users to not meet the threshold of usage events in the month to trigger the CTA.





Any advice?




Hi Manmeet,





One way to solve this would be to have the following bionic rule actions:







  1. Fetch from UsageEvent object - show AccountID, Account Name, UserName and UsageEvents (aggregate using count) - this will give you a row per user and the count of usage events

  2. Pivot the step 1 fetch to show count of user name for each account (pivot on account ID and group by account ID and account name)

  3. Filter the step 1 fetch by adding a filter where usage events > x amount. Group by account ID and account name to get a count of users where they have the desired number of usage events

  4. Merge step 2 and step 3 data (you'll have to retain all records from step 1 to account for customers who may not have any users with >x usage events) so that for each account you'll have a row with the total number of users and the number of users with >x number of usage events

  5. Transform the step 4 merge using a calculated field (formula = users with >x usage events / all users *100) to get a percentage per account of users with >x usage data
Then you can use the final value created in step 5 in your filter criteria and only trigger the CTA if that calculated value is <50.





Setup rule flow looks like this:










Dan! Thank you so much, just what I needed to finish building this rule. You're the best!




Reply