Manage CRM Records

This Grid Squid feature will enable your application to interact with your CRM data on the go!

The GridSquid API provides powerful capabilities for managing CRM records programmatically, giving you the flexibility to add, retrieve, update, or delete both raw and transformed records. Whether you're working with raw records that require no mapping or transformed records aligned with specific mappings, the API supports seamless interaction with your CRM. This guide outlines the endpoints, request methods, and required parameters for each operation, ensuring you can efficiently handle records within your system.

Set Up Your Environment

Before you can manage records in your CRM, you'll need to set up your Grid Squid environment. Please follow steps in either of the below Quick Start guides to setup your environment.

Add Record

You can add either a raw record or a transformed record to the CRM: 

Add Raw Record (Mapping is not required)

Make a POST request to:

<YOUR_API_URL>/users/{user_id}/records/raw/{crm_object_name}

Request Body is required for adding a record into CRM and should be constructed as shown in the section at the end of this guide.

Add Transformed Record (Mapping is required)

Make a POST request to:

<YOUR_API_URL>/users/{user_id}/records/unified/{badger_object_name}

Request Body is required for adding a record into CRM and should be constructed as shown in the section at the end of this guide.

Retrieve Record

You can retrieve either a raw record or a transformed record from the CRM:

Retrieve Raw Record (Mapping is not required)

Make a GET request to:

<YOUR_API_URL>/users/{user_id}/records/raw/{crm_object_name}

Retrieve Transformed Record (Mapping is required)

Make a GET request to:

<YOUR_API_URL>/users/{user_id}/records/unified/{badger_object_name}

Update Record

You can update either a raw record or a transformed record from the CRM:

Update Raw Record (Mapping is not required)

Make a PATCH request to:

<YOUR_API_URL>/users/{user_id}/records/raw/{crm_object_name}/{record_id}

Request Body is required for updating a record in CRM and should be constructed as shown in the section at the end of this guide.

Update Transformed Record (Mapping is required)

Make a PATCH request to:

<YOUR_API_URL>/users/{user_id}/records/unified/{badger_object_name}/{record_id}

Request Body is required for updating a record in CRM and should be constructed as shown in the section at the end of this guide.

Delete Record

You can delete either a raw record or a transformed record from the CRM:

Delete Raw Record (Mapping is not required)

Make a DELETE request to:

<YOUR_API_URL>/users/{user_id}/records/raw/{crm_object_name}/{record_id}

Delete Transformed Record (Mapping is required)

Make a DELETE request to:

<YOUR_API_URL>/users/{user_id}/records/unified/{badger_object_name}/{record_id}

Request Body

To create a request body, you'll need to provide key-value pairs for all mandatory fields of the object you are working with.

Step 1: Get the List of Object Fields

Start by retrieving a list of all the fields for the object.

Make a GET request to:

<YOUR_API_URL>/users/{user_id}/metadata/objects/{crm_object_name}/fields

This request will return the full list of fields associated with the object, along with information on which fields are mandatory.

Step 2: Build the Request Body

Using the information from Step 1, construct the request body by including all mandatory fields and their corresponding values. Fields that are not mandatory can be included but are optional.

Here’s an example of what your request body should look like:

{
field_1_name: 'value for field_1',
field_2_name: 'value for field_2',
field_3_name: 'value for field_3',
field_4_name: 'value for field_4'
}
Notes:
  • Mandatory Fields: These are required and must be included in your request body.
  • Optional Fields: These can be left out unless you need to provide specific values for them.

By following these steps, you’ll ensure your request is properly formatted and meets the API requirements.

To learn more about the difference between RAW and TRANSFORMED Records, please check out our guide on MAPPING.