SOLVED

Webhook response mapping not updating lead

Go to solution
Highlighted

Webhook response mapping not updating lead

I have a webhook that is working and I see the response come back as a JSON as:

	{
"results": {
"id": 2,
"number": "0001",
"name": "city, state",
"ouId": 2,
"config": {
"show1": true,
"show2": true
}
},
"success": true,
"message": "OK"
}‍‍‍‍‍‍‍‍‍‍‍‍‍‍

However my response mapping of result.config.show1 results.config.show1 to a lead field is not updating the lead field. I have tried having the lead field be of type boolean, string, and text area with no change.

Is there an issue with Marketo reading this JSON correctly? Is there another way to get to having those values update a field on the lead? I'm even ok if that means using email scripting to evaluate the JSON.

Thanks,

Caleb


#json #marketo webhooks

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Level 10 - Community Moderator

Re: Webhook response mapping not updating lead

Recreate the entire webhook and retest (no, this isn't a wild guess).

View solution in original post

12 REPLIES 12
Highlighted
Level 10 - Community Moderator

Re: Webhook response mapping not updating lead

results has an "s".

Highlighted

Re: Webhook response mapping not updating lead

Sanford,

Thanks for the reply and the close eye. I've confirmed this was just at typo in my question. Properly written as `results.config.show` in my field mapping.

I'd prefer that I was just that blind, and it wouldn't be the first time.

Regards,
Caleb

Highlighted
Level 10 - Community Moderator

Re: Webhook response mapping not updating lead

Actually there's a typo in your last reply, too.

But as long as you have the right dotted JSON path, that's very simple JSON and will be no problem. Ensure the Response Type is set to JSON, and look in Field Management and make sure the field is updateable via webhook.

Highlighted

Re: Webhook response mapping not updating lead

I guess that's what i get for trying to protect some of the values / keys by retyping them.

To test your comment about "updatable via web hook", because I am unsure where or how to control that, I have another lead field 'franchiseNumber' which is currently updated via another web hook and has been working for some time. Here is an example of that other web hook's result. This location web hook also returns a JSON object, though it is nested in and array eg [{ data }].
pastedImage_3.png

That same field is present in this web hook as the 'number' parameter. On the same web hook, mapping `results.number` to the lead field 'franchiseNumber' also does not update the field.

pastedImage_2.pngpastedImage_4.png

And yet that field is not updated here. I have also made sure that these values are `null` on my test lead so that its not a case of the value not changing with the web hook result.

Highlighted
Level 10 - Community Moderator

Re: Webhook response mapping not updating lead

To test your comment about "updatable via web hook", because I am unsure where or how to control that...

I'm talking about Block Updates in Field Management.  It's a per-field setting.

Please show the details of the Call Webhook activity.

Highlighted

Re: Webhook response mapping not updating lead

Ah I see. Nothing blocked:

pastedImage_3.png

pastedImage_1.png

Highlighted
Level 10 - Community Moderator

Re: Webhook response mapping not updating lead

Recreate the entire webhook and retest (no, this isn't a wild guess).

View solution in original post

Highlighted
Level 10 - Community Moderator

Re: Webhook response mapping not updating lead

And don't run anybody through until you've built the whole thing incl. Response Mappings.

Highlighted

Re: Webhook response mapping not updating lead

Sanford, thanks for your time in working through this. This worked. I guess i need to remember to "turn it off and on again" when things don't work in Marketo.