Comparing 2 scoring fields | Community
Skip to main content
Yifat_Danieli
Level 3
October 24, 2016
Question

Comparing 2 scoring fields

  • October 24, 2016
  • 3 replies
  • 4918 views

I need to compare 2 scoring fields and if one of them is larger - use a specific rule. Support said it can not be done using Marketo - has anybody found a workaround for this?

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

3 replies

Grégoire_Miche2
Level 10
October 25, 2016

Hi Yifat,

We usually do it using Salesforce to do the comparison and returning to Marketo the name of the highest score field.

-Greg

SanfordWhiteman
Level 10
October 26, 2016

Score arithmetic and aggregation was one of the initial inspirations for FlowBoost.

A short recipe:

var scores = [

  { type: 'behavioral', score: {{Lead.Behavioral Score}} },

  { type: 'demographic', score: {{Lead.Demographic Score}} },

  { type: 'firmographic', score: {{Lead.Firmographic Score}} },

  { type: 'psychographic', score: {{Lead.Psychographic Score}} }

],

highScore = getMax(scores,'score');

function getMax(coll, sortBy){

  return coll.concat().sort(function sortAsc(l,r){

    return sortBy ? l[sortBy] - r[sortBy] : l - r;

  }).pop();

}

(Note in this implementation a tie goes to the later entry in the set of scores, i.e. if Firmographic and Psychographic are both 90, then Psychographic is returned. So you can use the order to determine which one has "seniority.")

Grégoire_Miche2
Level 10
October 26, 2016

HI @Sanford Whiteman​,

What is FlowBoost?

-Greg

October 27, 2016

Easy, you can use the Excel Formulas  for Marketo. free tool on launchpoint Excel Formulas for Marketo – Marketo LaunchPoint

You don't need to know code, and pretty much every Excel formula you will ever need is easily found on Google

Yifat_Danieli
Level 3
November 3, 2016

Hi Fab Capodicasa​, your app looks great! can I do this with it?

=INDEX(A1:D1,MATCH(MAX(A2:D2),A2:D2,0))

The Excel table looks like that:

Col1Col2Col3Col4
3767

Also, if there are equal fields it will return the first one it finds.

Thanks!

November 9, 2016

Yes you can. We updated our doco to show this particular example

Diederik_Marte4
Level 4
January 10, 2017

IMPORTANT: webhooks are NOT designed for high usuage, according to Marketo suppor. Use ReST API if you can. The only native ReST API formula suite for Marketo is CALCITNOW - Field formula calculations – Marketo LaunchPoint 

6x Marketo Champion | Marketo Certified Solutions Architect (MCSA) | Marketo User Group Leader | International Speaker on Marketing Technology
March 13, 2017

That's not actually true. We use very high volume Webhooks, 140/minute for real-time scoring