Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Documentation for Base CRM custom fields

Custom fields


Custom fields can be created by posting to one of the 3 endpoints:

To update PUT and to delete DELETE to:

Filterable:

some custom fields can be used as additional filtering options in the web app, to enable this pass "filterable":"true" as a parameter to the "custom_field"

Contacts custom fields have an additional required parameter:

  • Visible on both Person and Company pages: "custom_scope":{"people":"1","company":"2"}
  • Person pages only: "custom_scope":{"people":"1"}
  • Company pages only: "custom_scope":{"company":"2"}

Custom field types:

Single Line Text

{"custom_field":{"name":"word","field_type":"string","settings":null}}

Filterable

Paragraph Text

{"custom_field":{"name":"paragraph","field_type":"text","settings":null}}

Not filterable

Number

{"custom_field":{"name":"number","field_type":"number","settings":null,}}

Filterable

Non-numeric values are cut out.

Checkbox

{"custom_field":{"name":"bool","field_type":"bool","settings":null}}

Not filterable

Dropdown

{"custom_field":{"name":"Choice","field_type":"list","settings":"0;first choice,1;second choice"}}

Filterable

Date

Date only:

{"custom_field":{"name":"date only","field_type":"date","settings":"%Y/%m/%d"}}

Date and Time:

{"custom_field":{"name":"date and time","field_type":"date","settings":"%Y/%m/%d %H:%M"}}

Filterable

Email

{"custom_field":{"name":"email address","field_type":"email","settings":null}}

Not filterable

Phone

{"custom_field":{"name":"phone number","field_type":"phone","settings":null}}

Not filterable

Address

{"custom_field":{"name":"address","field_type":"address","settings":null}}

Not filterable

URL

{"custom_field":{"name":"website","field_type":"url","settings":null}}

Not filterable

Custom field values:

Since custom field names are unique within their scope (Leads, Contacts, Deals) you can pass them as parameters when creating or updating an object. The representation has the name of the custom field as the key and values as the value:

Leads

"custom_field_values":{"Revenue type":"text entered here"}

Contacts and Deals

"custom_fields":{"Revenue type":"text entered here"}


Single line text:

"name": value

Paragraph Text

"name": "value

Number

"name": value

Checkbox

"name": value (0 or 1)

Dropdown

"name": choice id

Date

"name": value (eg. "1/31/2014" or "1/31/2014 3:02")

Email

"name": value

Address

"name": {"street": value, "city": value, "region": value, "zip": value, "country": value}

Phone

"name": value

URL

"name": value

@mikeknoop

This comment has been minimized.

Copy link

mikeknoop commented Mar 20, 2014

You've got a doc bug. When POSTing to an endpoint, address fields are expected to be supplied:

"name": [street, city, region, zip, county]

instead of the object notation specified above.

@mikeknoop

This comment has been minimized.

Copy link

mikeknoop commented Mar 20, 2014

I'd really rather the documentation be followed in the API though, the object serialization is way better than some arbitrary array ordering.

@mikeknoop

This comment has been minimized.

Copy link

mikeknoop commented Mar 20, 2014

Another bug or unimplmented but documented feature:

While I can call https://app.futuresimple.com/apis/sales/api/v1/deal_custom_fields.json to fetch deal custom fields definitions, the custom field values are not:

  1. Given to me when doing GET deals (they are supplied for leads and contacts though, deals should match)
  2. Able to be inserted as documented above when POSTing to create a new deal
@mikeknoop

This comment has been minimized.

Copy link

mikeknoop commented Mar 20, 2014

Here is a request log of me trying to insert custom fields when POSTing a deal: https://gist.github.com/mikeknoop/29f2c177bce35f683de1

here is a request log of me expecting to see custom field values inside a GET: https://gist.github.com/mikeknoop/9d44f7299163ee59d06f

@rkshakya

This comment has been minimized.

Copy link

rkshakya commented Jun 16, 2014

Hi,
Could you please provide concrete examples of populating custom fields via API for base CRM?
The description in the documentation above is confusing.
Thanks

@texelate

This comment has been minimized.

Copy link

texelate commented Jan 23, 2015

@rkshakya

{"lead": {"first_name":"John","last_name":"Smith","email":"test@test.com","country":"GB","phone":"+44 12345 67890","description":"Description goes here","custom_field_values":{"Custom text field ":"Value goes here","Custom drop down":"1"}}}

I hope that helps, it took me a while to get it working.

Note that the name of the custom field must match how it is the admin. Also, for the drop down example above to get the ID I had to go to the drop down option in the admin, inspect the element and get the ID from the data attribute. I don't know if there is an easier way.

@jhenrypp

This comment has been minimized.

Copy link

jhenrypp commented Feb 2, 2015

How can I do batch insert?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.