Re: Set value based upon comparison of two other values

Anonymous
Not applicable

Set value based upon comparison of two other values

I'm working with a website that is focussing upon two different user types, AB and YZ.

As userType AB browses the following urls, mysite.com/a/... and mysite.com/b/... I add 5 to the score of userTypeAbScore and remove -5 from userTypeYzScore (unelss YZ is 0).

As userType YZ browses the following urls, mysite.com/y/... and mysite.com/z/... I add 5 to the score of userTypeYzScore And remove -5 form userTypeAbScore (unless AB is 0).

Next I want to set a string value in Marketo on the field userType, If userTypeAbScore > userTypeYzScore then set userType = AB — and visa versa. This then drives realtime personalisation for that user type.

I can't seem to compare to values as part of the "Who" list though, is there a way to do this or a better way to achieve what I'm after?

It is possible to compare the values on the website and set it explicitly with javascript but that doesn't help if the interactions are at an event, email etc.
3 REPLIES 3
Josh_Hill13
Level 10 - Champion Alumni

Re: Set value based upon comparison of two other values

I think this would be complicated inside Marketo. 

It would be better to call a webhook to do the comparison and return a 1/0, or to try javascript/jquery with the API.
Anonymous
Not applicable

Re: Set value based upon comparison of two other values

Thanks for the reply Josh.

I'm using javascript with the API as a fallback to set the value but that won't take into consideration any interactions through email campaigns or events.

It's fine for the short term, but I'm looking for a way where this is handled within Marketo world.
Josh_Hill13
Level 10 - Champion Alumni

Re: Set value based upon comparison of two other values

Then you'll need to look at setting up an Apex trigger in SFDC or a Marketo Webhook to do this on a continual basis.