SOLVED

Re: Sum two score fields into another score field with Webhook

Go to solution
Itay_Billet4
Level 8

Sum two score fields into another score field with Webhook

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

1 ACCEPTED SOLUTION

Accepted Solutions
SanfordWhiteman
Level 10 - Community Moderator

Re: Sum two score fields into another score field with Webhook

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}}

 

View solution in original post

3 REPLIES 3
SanfordWhiteman
Level 10 - Community Moderator

Re: Sum two score fields into another score field with Webhook

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}}

 

Itay_Billet4
Level 8

Re: Sum two score fields into another score field with Webhook

Thanks @SanfordWhiteman! What happens if we need more than 50,000 invocations per month? do we get an alert?

 

SanfordWhiteman
Level 10 - Community Moderator

Re: Sum two score fields into another score field with Webhook

Just use Send Alert! Set up a trigger campaign like this:

SanfordWhiteman_0-1736961935275.png

(And have all your FlowBoost ‘hook names start with a common string, like “FlowBoost » Add Scores”, “FlowBoost » Cap Registrants”, etc.)