Boolean Count | Community
Skip to main content
October 31, 2016
Solved

Boolean Count

  • October 31, 2016
  • 6 replies
  • 6295 views

We have multiple boolean fields used in part of our segmentation.

What I would like to do is sum up the "True" values of these fields and denote this number in a separate field.

Is there a way to do this inside of Marketo?  The boolean values change on a weekly basis.

Thank you

And if it can avoid using a Score Field on the original boolean field that would be best as multiple processes check the field and could leave to inflated numbers

Message was edited by: Josh Hampleman

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Justin_Norris1

I like Courtney's suggestion best, although if you need a solution that doesn't involve a round trip to the CRM, you can also check out FlowBoost (do a search in these forums for more info) or the Hoosh Excel webhook.

Also, I know you mentioned you didn't want a score field, but...

I'm not sure why you couldn't have a central processing campaign that you could schedule on a recurring basis. At that point you could zero out the field and recalculate it, e.g.,

If Boolean A = True, booleanCounter +1

If Boolean B = True, booleanCounter +1

etc.

Then you can reference that booleanCounter field anywhere you want, but the calculation of it is centralized, so I don't believe it would lead to inflated numbers.

6 replies

Diederik_Marte4
New Participant
January 10, 2017
6x Marketo Champion | Marketo Certified Solutions Architect (MCSA) | Marketo User Group Leader | International Speaker on Marketing Technology
November 4, 2016

We have nineteen boolean fields and only scoring off of three took roughly two hours to completely update the new score field.

So I don't think this is going to work out for us. 

Speaking with our Communicators I believe we need something more advanced regardless and I don't know if it will be possible.

Based on the segments used in a current mailing I would need a count of those referenced in the message.

The number of segments and the segments being used change from quarter to quarter.

SanfordWhiteman
New Participant
November 5, 2016

We have nineteen boolean fields and only scoring off of three took roughly two hours to completely update the new score field.

So I don't think this is going to work out for us.

Are you sure that the performance is actually linear (i.e. with 6 does it take 4 hours)? How many leads did you run against in those 2 hours?

November 7, 2016

Not sure if it's linear but two hours is still too much time.  I believe in those two hours roughly 27k leads were updated

November 1, 2016

@Courtney Grimes​ @Justin Norris​ @Sanford Whiteman​

Thank you all

SanfordWhiteman
New Participant
November 1, 2016

Because we do everything we used to do in SFDC in FlowBoost* :

  var totalTrue = FBMath.sum( {{lead.booleanFieldOne}}, {{lead.booleanFieldTwo}}, {{lead.booleanFieldThree}} );

(Booleans automatically coerce to 0 or 1 when added together.)

Or if you want to learn native JS (recommended!) instead of using shortcuts:

  var booleanFields = [

    {{lead.booleanFieldOne}},

    {{lead.booleanFieldTwo}},

    {{lead.booleanFieldThree}}

  ],

  totalTrueTake2 = booleanFields.filter(function(itm){ return itm; }).length,

or another native JS approach:

     totalTrueTake3 = booleanFields.reduce(function(prev,next){ return prev + next; })

or if you wanted to be really primitive (I wouldn't do this because it invites typos with a lot of fields):

     totalTrueTake4 = {{lead.booleanFieldOne}} + {{lead.booleanFieldTwo}} + {{lead.booleanFieldThree}};

*Depending on # of calls per month, would be fine w/FB Community (e.g. free) edition.

Justin_Norris1
New Participant
November 1, 2016

@Sanford Whiteman , tell me more about the FB Community (free) edition - how many calls are included?

SanfordWhiteman
New Participant
November 1, 2016

I can't speak to that directly, but you'll hear from someone who can.

Justin_Norris1
Justin_Norris1Accepted solution
New Participant
November 1, 2016

I like Courtney's suggestion best, although if you need a solution that doesn't involve a round trip to the CRM, you can also check out FlowBoost (do a search in these forums for more info) or the Hoosh Excel webhook.

Also, I know you mentioned you didn't want a score field, but...

I'm not sure why you couldn't have a central processing campaign that you could schedule on a recurring basis. At that point you could zero out the field and recalculate it, e.g.,

If Boolean A = True, booleanCounter +1

If Boolean B = True, booleanCounter +1

etc.

Then you can reference that booleanCounter field anywhere you want, but the calculation of it is centralized, so I don't believe it would lead to inflated numbers.

November 1, 2016

I'll look into FlowBoost as both Sanford and yourself had mentioned it.

After I said I didn't want a score field I began to think about a weekly process as you suggest where it +1s around the various booleans and then at the end of the week it zeros out before the next the weekly update.  I was too narrow in my original comment as I was thinking of adding the scoring section to each of the flows that attribute to the fields.  This is why I thought it would be inflated.

Thank you

Casey_Grimes2
New Participant
October 31, 2016

Hi Josh,

This is an instance where it may not make much sense to have Marketo itself do this—but counting the sum of True boolean values would be pretty easy to do with a Salesforce formula field or Dynamics calculated field. You'd then just echo that output into a standard field.

This also gets around the issue with scoring, as you mentioned—it will just recalculate every time one of those boolean values change.

November 1, 2016

Unfortunately the boolean fields are based around a custom object load that we had our IT feed into Marketo.

So while this would have been ideal we do not have the information stored in inside of SFDC that can easily replicate these fields.