Business need is to compare two fields and based on that update the lead score. Both fields are integer types and if both value are same that time need to update the lead score. Both field value are being updated from REST API call.
What would be simplest way in Marketo to compare those fields and update the score?
Solved! Go to Solution.
You need to use a webhook-based service to compare Integer/Score fields in Marketo (in general, fields are not comparable to each other within a Smart Campaign — as opposed to comparing a field with a known static value).
Is it possible to store the result using VTL in Marketo? If Yes, then I would like to set the value as boolean and based on that update the score.
Store, no. Velocity can certainly compare any fields you want, any way you want. But it can only output email content based on conditions, it can't update the fields in the database.
Hi Sanford,
Is it possible to store the result using VTL in Marketo? If Yes, then I would like to set the value as boolean and based on that update the score.
Else, I will go with the approach as suggested Webhook-based service.
Is it possible to store the result using VTL in Marketo? If Yes, then I would like to set the value as boolean and based on that update the score.
Store, no. Velocity can certainly compare any fields you want, any way you want. But it can only output email content based on conditions, it can't update the fields in the database.
You may be able to do this in the flow of a Smart Campaign using a choice.
Say you have something like
SL:
- Trigger Data Value changes (Field A)
- or Trigger Data Value changes (Field B)
Flow:
Changes Score:
- Choice 1 if (Field A) is {{lead.Field B}}, change the score
- Else, do nothing
I don't have Integer fields that I can readily edit to test but it works fine with Strings and given you're looking for "equal" value, I can't imagine it would be very different.
Otherwise you could consider storing the value into String fields but that's not a very "elegant" solution 😕
I think you need to test this again, Benjamin. 🙂
Unless something has drastically changed, it doesn't work the way you describe.
Jay,
I know @SanfordWhiteman hasn't mentioned a specific service, but FlowBoost is a fantastic service to use for the type of stuff you want to do (http://flowboost.tk/). I'm guessing the reason he didn't mention it is because FlowBoost is his baby and I think the ToS stops him from mentioning his own work :).
Cheers
Jo
Guys, forgive me for being snarky here, not every day i get to challenge @SanfordWhiteman 's solution. i deserve a marketo award for this.
There is a way to compare fields with two smart Campaigns if the result here is to make sure two fields are not equal.
Let be field named XXX
Let there be two fields we want to compare: YYY,ZZZ
Smart Campaign #1
- trigger by data value changed to YYY,ZZZ and lead is created.
- Filter by criteria of your choice.
- Workflow:
-- Change data value of XXX by the content of YYY
-- Wait 2 seconds.
-- Change data value of XXX by the content of ZZZ
Smart Campaign 2
- Trigger: Data value changed for XXX twice in the past minute.
- Filters: campaign #1 was requested
- Workflow - whatever you want to do if the fields are not equal
You can do the same thing with testing if fields are equal by adding a third campaign that is triggered by the first campaign after 10-15 seconds to make sure the lead is not a member of the second campaign but this is a bit convoluted and i didn't need it.