Re: Webhook is Called and Field Update timing

Pavel_Plachky
Level 5

Webhook is Called and Field Update timing

I have a webhook that updates a field, let's call it FIELD1 through XML response mapping. I understand that webhooks, are asynchronous, hence my question: If I use a trigger "Webhook is Called" in a smart campaign, can I be sure that the FIELD1 is updated before the first flow step is executed?

I looked at the product documentation and at developers.marketo.com, but could not find this detail. I read on the community about people using "Data Value Change" to trigger when there is an update caused by webhook, but I may also have other campaigns change this field and I do not want to create a separate field just for the purpose of Webhook response monitoring.

10 REPLIES 10
Grégoire_Miche2
Level 10

Re: Webhook is Called and Field Update timing

Hi Pavel,

No, you should use a "data value changes" trigger.

-Greg

Grégoire_Miche2
Level 10

Re: Webhook is Called and Field Update timing

And, to complete:

in the Data value changes trigger, you can use reason and source constraints.

Reason: Webhook Updated Lead : [webhookname]

Source: Webhook

-Greg

Pavel_Plachky
Level 5

Re: Webhook is Called and Field Update timing

Hi Greg,

thanks, this is helpful. But what if I want to take action after the webhook is finished, even if the data did not change? This is a real request that I am solving, when a non-change of data through a webhook must also trigger an action. Do you have an experience dealing with such request?

SanfordWhiteman
Level 10 - Community Moderator

Re: Webhook is Called and Field Update timing

Like I said over on the idea, you can use the WWC trigger to inspect the payload. Or send back a 204 No Data and check for that.

Pavel_Plachky
Level 5

Re: Webhook is Called and Field Update timing

Hi Sanford, thanks for the suggestions. In my case, the response is SOAP XML that is not so easy to parse in a smart list and I am not in control of the called web service so I cannot change the return code. I think I can make it work with one or two extra data fields, but it is a kludge.

SanfordWhiteman
Level 10 - Community Moderator

Re: Webhook is Called and Field Update timing

Can see how it would be frustrating if you don't control the endpoint.

Maybe we need to abstract this a bit. You want to be able to trigger if a value change is *requested* (call it a logical update) even if a change (physical update) is never made because it's a no-op. What about a checkbox for a new DVC constraint "Include updates to the same value"? This is something we can do in SQL triggers, for example.

SanfordWhiteman
Level 10 - Community Moderator

Re: Webhook is Called and Field Update timing

Some reading if this was before you subbed to the blog: http://blog.teknkl.com/fun-with-the-webhook-is-called-trigger/

Pavel_Plachky
Level 5

Re: Webhook is Called and Field Update timing

Thanks Greg,

I submitted a product idea , please upvote it if you think it would be useful.

Pavel

Grégoire_Miche2
Level 10

Re: Webhook is Called and Field Update timing

Hi Pavel,

The issue is that webhooks are completely asynchronous. I already posted an Idea a while ago, complementary to yours, which is here:

But because of the asynchronous factor, it seems to me that the "Data Value changes" trigger with the proper reason does the job, in fact.

-Greg