SOLVED

Re: Boolean Count

Go to solution
Anonymous
Not applicable

Boolean Count

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

1 ACCEPTED SOLUTION

Accepted Solutions
Justin_Norris1
Level 10 - Champion Alumni

Re: Boolean Count

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.

View solution in original post

19 REPLIES 19
Casey_Grimes
Level 10

Re: Boolean Count

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.

Anonymous
Not applicable

Re: Boolean Count

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.

Justin_Norris1
Level 10 - Champion Alumni

Re: Boolean Count

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.

Anonymous
Not applicable

Re: Boolean Count

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

SanfordWhiteman
Level 10 - Community Moderator

Re: Boolean Count

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
Level 10 - Champion Alumni

Re: Boolean Count

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

SanfordWhiteman
Level 10 - Community Moderator

Re: Boolean Count

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

Anonymous
Not applicable

Re: Boolean Count

Anonymous
Not applicable

Re: Boolean Count

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.