Hi all, we wanted to setup a webhook to calculate the sum of 2 fields (Behavior Score and Demographic Score) and update to another field called "Person Score".
We created the webhook and the php code (attached both), and we're getting Response Code: 200, but the actual "Person score" is not updated.
Can you check what might be the issue?
Many thanks
Itay
Solved! Go to Solution.
This isn't really the place to troubleshoot code running on a totally different server. The design of that PHP code is totally wrong, though: you don't need to (and certainly shouldn't) use the REST API to update. You send the summed field in the response and Marketo writes it to the person record.
Anyway, I think you still have a FlowBoost subscription. Why not use that? It's one and done:
sum = {{lead.field1:default=0}} + {{lead.field2:default=0}}
This isn't really the place to troubleshoot code running on a totally different server. The design of that PHP code is totally wrong, though: you don't need to (and certainly shouldn't) use the REST API to update. You send the summed field in the response and Marketo writes it to the person record.
Anyway, I think you still have a FlowBoost subscription. Why not use that? It's one and done:
sum = {{lead.field1:default=0}} + {{lead.field2:default=0}}
Thanks @SanfordWhiteman! What happens if we need more than 50,000 invocations per month? do we get an alert?
Just use Send Alert! Set up a trigger campaign like this:
(And have all your FlowBoost ‘hook names start with a common string, like “FlowBoost » Add Scores”, “FlowBoost » Cap Registrants”, etc.)