Display Webhook Response to User?

Anonymous
Not applicable

Display Webhook Response to User?

I'm working on a webhook integration where a user fills out registration information for a product on a Marketo form, and then a webhook posts that data to a 3rd party web service.  I've got the connection between Marketo and the web service hooked up and functioning.

In certain instances, the web service will actually return an error to the Webhook.  Is there a way for me to present this error to the user, before the form submission goes through?  The way I have things setup now, I don't think the webhook is even called until after the form submission has gone through and the user is on the thank you page.  Could I somehow use the onSuccess method to post to the webhook and stop a form submission if an error does come back?

Thanks much for any help.
Tags (1)
1 REPLY 1
Kenny_Elkington
Marketo Employee

Re: Display Webhook Response to User?

Hey Ben,

In order to stop form submission with the forms API, you would want to use AJAX in the onValidate method to check for failures, and then add the fields which you need in the form submission rather than using the Call Webhook flow step.