Docly

Salesforce

Estimated reading: 2 minutes

getObjects

This function can be used to get a list of objects from SalesForce or a single one when an ID is passed.

				
					/**
    * @param string $objectType Name of the Salesforce object
    * @param string $id Optional Salesforce ID of the object
    * @param array $fields Optional array with fields to return from the object
    * @param array $where Optional array with filters
*/
function getObjects($objectType = '', $id = '', $fields = [], $where = []){}				
			

getObjectStructure

This function can be used to get the structure of a Salesforce object.
				
					/**
   * @param string $objectType The name of the Salesforce object
   * @return object $response The API response
   *
   */
  function getObjectStructure($objectType = ''){}				
			

createCampaignMember

This function makes a Post request to the API for a new CampaignMember object in Salesforce.

				
					/**
   * @param string $campaign_id Id of the Campaign
   * @param string $contact_id Id of the Contact
   * @return mixed
   */
  function createCampaignMember($campaign_id, $contact_id){}				
			

create

Function to create a new record of an object in Salesforce.
				
					/**
 * @param string $object Name of the Salesforce object
 * @param array $data Data to save
 */
function create($object, $data){}				
			

update

Function to update a record of an object in Salesforce.
				
					/**
   * @param string $object Name of the Salesforce object
   * @param string $id Id of the Salesforce object
   * @param array $data Data to save
   */
  function update($object, $id, $data){}				
			

delete

Function to delete a record from an object in Salesforce.
				
					/**
   * @param string $object Name of the Salesforce object
   * @param string $id Id of the object to delete
   */
  function delete($object, $id){}