The gform_zohocrm_record filter allows you to modify the record arguments before they are sent to Zoho CRM.
Usage
To apply the filter to all feeds:
add_filter('gform_zohocrm_record', 'your_function_name', 10, 4);
To target feeds for a specific form, append the form ID to the filter name:
add_filter('gform_zohocrm_record_4', 'your_function_name', 10, 4);
Parameters
- $record (array): The record argument.
- $module (string): The module.
- $feed (Feed Object): The feed currently being processed.
- $entry (Entry Object): The entry currently being processed.
- $form (Form Object): The form currently being processed.
More information
See Gravity Forms Docs: gform_zohocrm_record
Examples
Set Lead Assignment Rules ID (lar_id)
Modify the record to set the Lead Assignment Rules ID (lar_id) for an entry before it is sent to Zoho CRM. Update the snippet with your form ID number, feed name, and value for lar_id.
// Replace 33 with your form ID. add_filter('gform_zohocrm_record_33', 'my_gform_zohocrm_record', 10, 5); function my_gform_zohocrm_record($record, $module, $feed, $entry, $form) { $feed_name = rgars($feed, 'meta/feedName'); // Replace 'Your Feed Name Here' with the name of the Zoho CRM feed. if ($module === 'Leads' && $feed_name === 'Your Feed Name Here') { // Replace with your own lar_id. $record = array_merge(array('lar_id' => '123213'), $record); } return $record; }