Hello Chris, thank you for your response. The above could possibly be a solution; however, the website in question is a membership portal that will have a 2-part membership signup for multiple organizations. How many orgs I’m not sure at this point, but easily over 10 where each have a form A and a form B.
For your proposed solution, is there a way to pass the form ID as a variable rather than hardcode it? My concern with that would be an ID passed as a variable would run on form A’s submit as well?
Second, I’m confused how using GFAPI::submit_form() would prevent form B from submitting until the webhook response from form A was received. If that method is used with a forms hardcoded ID, as in the example, does that automatically override the submit button on form B from submitting and sending the webhook when the user clicks “submit”? If this were implemented, what happens when the user submits form B, does the form appear to be submitted in real time, but behind the scenes it’s being delayed while waiting for the response?
To walk through your proposed solution, we would use gform_webhooks_post_request to listen/wait for the correct response from the receiving server from form A’s webhook, when that response arrives we then use GFAPI::submit_form() to submit form B?
Just to give more background on the issue at hand, these are two stand-alone forms, form A redirects to B. The receiving database is throwing an error if the form B webhook is received before the form A webhook. I’m not sure how this is possible, because my logs show clearly that form A’s webhook is being sent before form B’s (at least by 7 seconds in a very fast test I ran). When these webhooks hit the receiving server, form A is updating a record and has more fields to check than the form B webhook. I do not have access to the receiving server, but it seems that form A’s webhook takes longer to write/update than form B’s, which is why form B sometimes finishes before form A’s webhook is complete. Everything I’ve read on the topic advises creating a queue on the receiving server side, but the devs on the receiving end don’t want to do that for whatever their reasons are.
Last, at what point would you be concerned about server load and possible data loss on my end if we are delaying a webhook, while other signups continue to come in from email campaigns, etc.?