Using Gravity Forms ‘gform_zohocrm_post_create_contact’ PHP action

The gform_zohocrm_post_create_contact action in Gravity Forms allows you to perform custom actions after a contact has been created.

Usage

add_action('gform_zohocrm_post_create_contact', 'your_custom_function', 10, 5);

function your_custom_function($contact_record, $contact, $feed, $entry, $form) {
    // your custom code here
    return $contact_id;
}

Parameters

  • $contact_record (array) – The contact record.
  • $contact (array) – The contact arguments.
  • $feed (array) – The feed object.
  • $entry (array) – The entry object.
  • $form (array) – The form object.

More information

See Gravity Forms Docs: gform_zohocrm_post_create_contact

Examples

Add a note to the contact

add_action('gform_zohocrm_post_create_contact', 'add_note_to_contact', 10, 5);

function add_note_to_contact($contact_record, $contact, $feed, $entry, $form) {
    // Add a note to the contact
    $note_content = 'This is a sample note for the contact.';
    $contact_id = $contact_record['id'];

    // your custom code to add the note to Zoho CRM using their API
}

Send a welcome email

add_action('gform_zohocrm_post_create_contact', 'send_welcome_email', 10, 5);

function send_welcome_email($contact_record, $contact, $feed, $entry, $form) {
    // Send a welcome email to the contact
    $to = $contact['Email'];
    $subject = 'Welcome to our platform!';
    $message = 'Thank you for joining our platform. We are excited to have you on board!';

    wp_mail($to, $subject, $message);
}

Add contact to a mailing list

add_action('gform_zohocrm_post_create_contact', 'add_to_mailing_list', 10, 5);

function add_to_mailing_list($contact_record, $contact, $feed, $entry, $form) {
    // Add the contact to a mailing list
    $email = $contact['Email'];
    $list_id = 'your_mailing_list_id';

    // your custom code to add the contact to the mailing list using the mailing list provider's API
}

Assign a task to a team member

add_action('gform_zohocrm_post_create_contact', 'assign_task', 10, 5);

function assign_task($contact_record, $contact, $feed, $entry, $form) {
    // Assign a task to a team member based on the contact
    $task_title = 'Follow up with new contact';
    $team_member_id = 'your_team_member_id';

    // your custom code to create the task and assign it to the team member using a task management tool's API
}

Update a custom field in Zoho CRM

add_action('gform_zohocrm_post_create_contact', 'update_custom_field', 10, 5);

function update_custom_field($contact_record, $contact, $feed, $entry, $form) {
    // Update a custom field in Zoho CRM for the contact
    $custom_field_name = 'Custom_Field_Name';
    $custom_field_value = 'New Value';
    $contact_id = $contact_record['id'];

    // your custom code to update the custom field in Zoho CRM using their API
}