add_object()

Overview

This helper function is available with Ontraport, Zoho, Salesforce, and other CRMs which use custom objects.

It’s a shortcut / alternative to using the wpf_crm_object_type filter, for cases where you just need to add a custom object one time, without changing the object type used for WP Fusion globally.

Parameters

  • $data: (array) An associative array of data to sync to the CRM, using CRM field IDs for the keys
  • $object_type: (string) The object type you wish to update

Examples

Create a new Lead in Salesforce

$data = array(
	'Email'     => '[email protected]',
	'FirstName' => 'Jane',
	'LastName'  => 'Doe',
);

$lead_id = wp_fusion()->crm->add_object( $data, 'Lead' );

Was this helpful?