I’m using the gform_after_submission hook to send form data to my suiteCRM. However, this hook is synchronous. In other words, the form submission is not complete until this hook actually runs. I’ve had issues with this when my suiteCRM provider has any form of issues.
Is there a hook that’s available for after when everything is all done and we moved to the confirmation?
Or, is there a hook that is asynchronous and can call a callback that way I can run my submission to third party code?
gform_after_submission is the last Gravity Forms hook available after a successful submission, there’s no such asynchronous hook.
The Webhooks add-on uses a different approach, asynchronous processing for the feeds, you may want to take a look to see if this add-on could allow you to replace your custom call. https://docs.gravityforms.com/triggering-webhooks-form-submissions/
If the feed settings are not enough to perform the request as the third-party requires, there are some filters and an action hook that you could use: https://docs.gravityforms.com/category/developers/hooks/filters/filters-addons/webhooks-filters/
Another approach could be creating your own Gravity Forms add-on to integrate the third-party CRM, using the add-on frame work. This would allow you to setup feeds and use asynchronous processing as the Webhooks does. But obviously this would require advanced coding knowledge and more developing time.
In addition to the webhook add-on which Samuel covers the highlights of very well, you may want to look at Gravity Flow’s outgoing webhook step. It has all the asynchronous benefits of the webhook with some additional:
- Response mapping values from the endpoint back to fields in the entry
- Ability to have other steps (such as an approval by specific user/role) occur before the webhook. Or define which steps should occur after depending on response code the API provides.
- Filters/Actions such as gravityflow_webhook_args and gravityflow_post_webhook to customize via code before or after the webhook attempt.
- A custom step framework that is equally extensible as it’s built out of the add-on framework. If you were creating many calls to your CRM across multiple forms with common settings (such as authentication) that could be a separate step type extending the outgoing webhook instead of a whole add-on.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.