# Fields

Fields offer Pipeliner users the opportunity to add detailed information to the Entities - for example, Account Name, Address, Website, Phone numbers for Accounts and Opportunity Name, Close Date, Value for Opportunities. [**Learn more about** ](https://help.pipelinersales.com/en/articles/2714255-fields-forms)how to manage fields in Pipeliner

![Manage fields in Administration -> Fields & Forms -> Select Entity -> FieldsS](https://3470708952-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFpjbhrh1xo0SPAbAc7Ny%2Fuploads%2Fu7la3rpG4SMSw92IBM0M%2Ffields.png?alt=media\&token=1f29dd2f-866c-44c8-9c52-3c45ef000d2d)

{% hint style="info" %}
To view fields inside Pipeliner Interface, you need to move the field to the **Entity form**.
{% endhint %}

**System & Custom Fields**

System fields are automatically included in Pipeliner. These fields can´t be deleted.

Custom fields are defined by business/user. The business can create the fields based on their needs in the Administration.

**Field Properties**

* **Api Field Name** - API name of the field. When working with API this is the name of the field, that you will use in the request/response
* **Type** - Pipeliner supports several field types (dropdowns, date fields, line inputs etc.)
* **Field name** - Name of the field in the Pipeliner Application

![](https://3470708952-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFpjbhrh1xo0SPAbAc7Ny%2Fuploads%2FB7KxBOmM6o6RMcn20CHF%2FAccounts%20_%20Pipeliner%20CRM%20-%20Google%20Chrome%202022-01-1.png?alt=media\&token=bb1e9b24-673b-465b-9749-fc7c5973e629)

### Creating & Updating Custom Fields

As a developer, you have an option to create custom fields through API. Not every field can be created through API though. In the table below you can find a list of supported fields.

#### List of Supported fields

| Name                 | Type\_id              |
| -------------------- | --------------------- |
| Single Line text     | input                 |
| Long Text            | text\_area            |
| Dropdown             | dropdown              |
| Checkbox             | checkbox              |
| Multi select checkox | multiselect\_checkbox |
| Radio Button         | radio                 |
| Base Currency        | currency              |
| Multiple Currencies  | currency\_foreign     |
| Date                 | date                  |
| DateTime             | datetime              |
| Float Number         | float                 |
| Integer Number       | integer               |
| Autonumber           | sequence              |
| Url                  | url                   |
| Email                | email                 |
| Phone                | phone                 |

{% openapi src="<https://3470708952-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFpjbhrh1xo0SPAbAc7Ny%2Fuploads%2FOlNVdYj1h5GSxQmLHAjz%2Fopenapi%20(1).json?alt=media&token=4be07353-5170-4a95-9100-4f16545d47b0>" path="/entities/Fields" method="post" %}
[openapi (1).json](https://3470708952-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFpjbhrh1xo0SPAbAc7Ny%2Fuploads%2FOlNVdYj1h5GSxQmLHAjz%2Fopenapi%20\(1\).json?alt=media\&token=4be07353-5170-4a95-9100-4f16545d47b0)
{% endopenapi %}

```
POST {{baseUrl}}/entities/Fields
{
    "name": "Dropdown field example",
    "type_id": "dropdown",
    "entity_name": "Account",
    "data_set": [
        {"option_name": "Option 1", "calc_value": 1},
        {"option_name": "Option 2", "calc_value": 2},
        {"option_name": "Option 3", "calc_value": 3},
    ]
}
```

`calc_value -` For **Dropdowns, Multi-select checkbox, Radio** is required. Every option has a value and when this option is used in calculated field, it is calculated with this value. If you don´t plan to use options with calculated fields, you can just use **"1"** for all `calc_values`

`entity_name` - Account, Contact, Lead, Opportunity, Product, LeadOpptyProductRelation (Product Line Items), Task, Appointment, Project

#### Update Existing custom field

For example, when you want to add a new option to the dropdown, you can update the existing custom field

{% openapi src="<https://3470708952-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFpjbhrh1xo0SPAbAc7Ny%2Fuploads%2FOlNVdYj1h5GSxQmLHAjz%2Fopenapi%20(1).json?alt=media&token=4be07353-5170-4a95-9100-4f16545d47b0>" path="/entities/Fields/{id}" method="patch" %}
[openapi (1).json](https://3470708952-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFpjbhrh1xo0SPAbAc7Ny%2Fuploads%2FOlNVdYj1h5GSxQmLHAjz%2Fopenapi%20\(1\).json?alt=media\&token=4be07353-5170-4a95-9100-4f16545d47b0)
{% endopenapi %}

```
Patch {{baseUrl}}/entities/<field_id>
{
    "name": "Updated Dropdown field example",
    "data_set": [
        {"id": "123456"}, // id of existing dropdown option 1
        {"id": "654321"}, // id of existing dropdown option 2
        {"id": "456789", "optiona_name": "Updated Option 3"}, // id of existing dropdown option 3
        {"option_name": "New Option 4", "calc_value": 3},  // new dropdown option 4
    ]
}
```

### Get All fields

To retrieve **all** fields use the following endpoint. Every field has a unique identification `api_name`. This is how you can filter fields, that you need to work with

{% openapi src="<https://3470708952-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFpjbhrh1xo0SPAbAc7Ny%2Fuploads%2FOlNVdYj1h5GSxQmLHAjz%2Fopenapi%20(1).json?alt=media&token=4be07353-5170-4a95-9100-4f16545d47b0>" path="/entities/Fields" method="get" %}
[openapi (1).json](https://3470708952-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FFpjbhrh1xo0SPAbAc7Ny%2Fuploads%2FOlNVdYj1h5GSxQmLHAjz%2Fopenapi%20\(1\).json?alt=media\&token=4be07353-5170-4a95-9100-4f16545d47b0)
{% endopenapi %}

```json
"data": [
        {
            "is_delete_protected": false,
            "has_draft": false,
            "id": "00000001-0001-a001-0040-000000000001",
            "is_deleted": false,
            "modified": "2020-09-21 10:16:11.968255+00:00",
            "created": "2020-09-21 10:16:12.334879+00:00",
            "entity_name": "Task",
            "api_name": "sf_jira_issue_link2",
            "name": "Jira Issue Link",
            "use_lang": 0,
            "column_name": "sf_jira_issue_link2_2",
            "column_source": 3,
       }
]
```

### Get Field Values

To get specific field valuies use a combination of [**API paremeters**](https://developers.pipelinersales.com/api-docs/core-api-concepts/api-parameters) and `{{baseURL}}/entities/Fields` endpoint

**Example**

In this example we want to retrieve the values of the dropdown field with api field name `industry_id.` We use `filter`, one of the [**API parameters**](https://developers.pipelinersales.com/api-docs/core-api-concepts/api-parameters) to find specific field by `api_name.`

```
GET 
{{baseUrl}}/entities/Fields?expand=data_set&load-only=api_name,data_set.option_name&filter[api_name]=industry_id
```

```
"data": [
        {
            "api_name": "industry_id",
            "data_set": [
                {
                    "option_name": "Accounting"
                },
                {
                    "option_name": "Agriculture"
                },
                {
                    "option_name": "Broadcasting"
                }
                ...
    }
 ]       
                
                
```
