Create Custom Entity Record
Last updated
Last updated
This tutorial should help you create the first Custom Entity record. Before moving forward, make sure your Authentication works and you understand the Key Concepts of the Pipeliner API and make sure you know how to use API parameters
The Custom Entity allows user to work with a completely new type of entity in Pipeliner. You can create Custom Entity records and link them with other entities using Lookup fields.
Create Custom Entity record with the particular Entity Type
Link Custom Entity record to Opportunity using Lookup field
Filter existing Custom entity record by custom field
name
Name of the custom entity record
owner_id
Id of the User in Pipeliner Application
type_id
Id of the related Custom Entity Expected Closing date.
Load an id of the user with the default sales unit. This user will become the owner of the newly created Custom Entity Record.
{{baseUrl}}/entities/Clients?load-only=id,default_unit_id&filter[email]=john.doe@example.com
{
"id": "00000000-0000-0000-0000-000000011a7d",
"default_unit_id": "aba4a358-f3f8-4f55-b3ed-dd5cf589103b"
}
Pull Custom Entity Types. Store the ID of the Custom Entity Type
{{baseUrl}}/entities/MyCustomEntityType
{
"is_delete_protected": true,
"has_draft": false,
"id": "00000000-0000-0000-0000-000000000002",
"is_deleted": false,
"modified": "2023-09-20 07:08:32.528011+00:00",
"created": "2023-09-11 08:38:36.498033+00:00",
"form_edit": {
},
"form_edit_api": {
},
"is_readonly": false,
"name": "Custom entity 1",
"is_published": true,
"revision": 4288,
"entity_api_name": "MyCustomEntity"
},
{
"is_delete_protected": false,
"has_draft": false,
"id": "018ad56d-879c-b0dd-3c3a-75c59ab97a23",
"is_deleted": false,
"modified": "2023-09-27 06:57:23.126262+00:00",
"created": "2023-09-27 06:57:19.772625+00:00",
"form_edit": "",
"form_edit_api": {
},
"is_readonly": false,
"name": "Custom entity 2",
"is_published": true,
"revision": 4461,
"entity_api_name": "MyCustomEntity"
}
Let´s Take data from Step 1. and use them in the following request to create a Custom Entity record.
{
"name": "Custom Entity Record 3",
"owner_id": "00000000-0000-0000-0000-000000011a7d",
"type_id": "018ad56d-879c-b0dd-3c3a-75c59ab97a23"
}
Success response
{
"success": true,
"data": {
"is_delete_protected": false,
"id": "018ad5a4-2ea8-75f0-e8cc-c6e54688b165",
"modified": "2023-09-27 07:57:01.480723+00:00",
"created": "2023-09-27 07:57:01.480781+00:00",
"owner": "http://example.com",
"type": "http://example.com",
"unit": "http://example.com",
"name": "Custom Entity Record 3",
"owner_id": "00000000-0000-0000-0000-000000011a7d",
"share_mode": 0,
"table_name": "ce_custom_entity1n",
"type_id": "018ad56d-879c-b0dd-3c3a-75c59ab97a23",
"unit_id": "7d9467e0-d885-4729-877e-5c9e1e057b4a",
"is_deleted": false,
"sharing_units": [],
"sharing_clients": [],
"documents": [],
"is_favorite": false,
"revision": 4464,
"cf_high_priority": true,
"cf_lookup_ce_mycustomentity_leadoppty": []
}
}
Take data from Step 2. and use them in the following request, to link existing record to Opportunity using a Lookup field.
We are going to search for Opportunity by name. But you can use whatever parameter.
{{baseUrl}}/entities/Opportunities?filter-op[name]=contains&filter[name]=Accounting
{
"is_delete_protected": false,
"id": "0188d953-0aa6-1094-f764-1ce141993b26",
"is_deleted": false,
"modified": "2023-06-20 15:01:18.162394+00:00",
"created": "2023-06-20 15:01:18.118462+00:00",
"active_quote": null,
"oppty_type": "http://example.com",
"owner": "http://example.com",
"product_currency": "http://example.com",
"product_price_list": null,
"reason_of_close": null,
"step": "http://example.com",
"unit": "http://example.com",
"active_quote_id": null,
"closing_date": "2023-06-21",
"description": "",
"is_archived": false,
"is_value_auto_calculate": false,
"label_flag": 0,
"name": "Double Entry Accounting Services",
"oppty_type_id": "0c03f112-4544-06a8-b162-1f14524c149c",
"owner_id": "00000000-0000-0000-0000-000000011a7d",
"product_currency_id": "c4ca4238-a0b9-0382-0dcc-509a6f75849b",
"ranking": 50,
"reason_of_close_description": "",
"reason_of_close_id": null,
"share_mode": 0,
"step_id": "5854307d-d86e-4b97-be3f-a2c19f85ff07",
"table_name": "oppty",
"unit_id": "7d9467e0-d885-4729-877e-5c9e1e057b4a",
"was_qualified": false,
"revision": 3584,
"value": {
"base_value": 10000,
"currency_id": "36665823-00d8-401f-b7d2-8e0736c3beb2",
"value_foreign": 12500
},
"oppty_recurrence": null,
"revenue_schedule": null,
"product_relations": [],
"primary_contact": null,
"primary_account": "http://example.com",
"contact_relations": [],
"account_relations": [
"http://example.com"
],
"documents": [],
"quote_relations": [],
"status": 1,
"qualify_date": null,
"won_date": null,
"lost_date": null,
"days_in_step": 68,
"is_favorite": false,
"sharing_units": [],
"sharing_clients": [],
"tags": [],
"formatted_name": "Double Entry Accounting Services",
"modified_by_user": null
}
Create a linking between Custom Entity record and Opportunity
{
"cf_lookup_ce_mycustomentity_leadoppty": "0188d953-0aa6-1094-f764-1ce141993b26"
}
Success response
{
"is_delete_protected": false,
"id": "018ad5a4-2ea8-75f0-e8cc-c6e54688b165",
"modified": "2023-09-27 07:57:01.480723+00:00",
"created": "2023-09-27 07:57:01.480781+00:00",
"owner": "http://example.com",
"type": "http://example.com",
"unit": "http://example.com",
"name": "Custom Entity Record 3",
"owner_id": "00000000-0000-0000-0000-000000011a7d",
"share_mode": 0,
"table_name": "ce_custom_entity1n",
"type_id": "018ad56d-879c-b0dd-3c3a-75c59ab97a23",
"unit_id": "7d9467e0-d885-4729-877e-5c9e1e057b4a",
"is_deleted": false,
"sharing_units": [],
"sharing_clients": [],
"documents": [],
"is_favorite": false,
"revision": 4464,
"cf_priority": 2,
"cf_lookup_ce_mycustomentity_leadoppty": [
"id": "0188d953-0aa6-1094-f764-1ce141993b26",
"name": "Double Entry Accounting Services",
"picture_url": null,
"entity_name": "Opportunity",
"entity_api_name": null,
"entity_type_id": null,
"is_deleted": false,
"is_available": true
]
}
Filter Custom Entity records using the specific conditions.
{{baseUrl}}/entities/MyCustomEntity?filter-op[cf_priority]=gt&filter[cf_priority]=3
Success response
{
"is_delete_protected": false,
"id": "012bc5a7-23e8-15a0-a51b-e6c5462eb415",
"modified": "2023-09-27 07:32:01.480723+00:00",
"created": "2023-09-27 07:32:01.480781+00:00",
"owner": "http://example.com",
"type": "http://example.com",
"unit": "http://example.com",
"name": "Custom Entity Record 1",
"owner_id": "00000000-0000-0000-0000-000000011a7d",
"share_mode": 0,
"table_name": "ce_custom_entity1n",
"type_id": "018ad56d-879c-b0dd-3c3a-75c59ab97a23",
"unit_id": "7d9467e0-d885-4729-877e-5c9e1e057b4a",
"is_deleted": false,
"sharing_units": [],
"sharing_clients": [],
"documents": [],
"is_favorite": false,
"revision": 4364,
"cf_priority": 4,
"cf_lookup_ce_mycustomentity_leadoppty": []
}
Returns all defined Clients
if enabled, deleted Clients are returned as well
Number of entities to return from beginning of the result set. Max: 100. Default: 30
Return only the "last" number of entities from result set. When used with first parameter, then it returns last M records from the first N records.
Cursor until which to take entities to result set.
Cursor after which to start taking entities to result set.
Expand related entity. Use api_names of relation fields. You can use multiple values separated via ',' colon. If not used, URI link will be returned instead. You can use dots '.' to expand nested entities as well.
expand=owner,sales_unit,account_relations.account
Order by values. Use api_name of field to sort by ascending. Prefix api_name with '-' to descending sort. You can use multiple values separated via ',' colon.
order-by=created,-modified
Use name of field in braces to filter by this field. To advanced filter, use with combination with filter-op parameter.
filter[name]=Example
Filter operator. Specify a way how to filter fields. Supported operators: [eq, ieq, not-eq, not-ieq, contains, starts, ends, icontains, istarts, iends, null, not-null, empty, not-empty, gt, gte, lt, lte, between].
filter-op[name]=eq
Loads only fields defined within this parameter. You can use multiple values separated via ',' colon. If not used, then all fields are returned. You can use dots '.' to specify load only fields in nested as well.
load-only=id,name,owner.id
GET /api/v100/rest/spaces/<space_id>/entities/Clients HTTP/1.1
Host: us-east.pipelinersales.com
Accept: */*
{
"success": true,
"data": [],
"page_info": {
"start_cursor": "WyIwMSIsICJiMmYwODI0Ni1iYWE5LTQyY2QtYmM3Yi04YmM4MjY3M2E2NTgiXQ==",
"end_cursor": "WyIwNSIsICJmMjZhZjZiMC00ZWE4LTQ3MDgtODU2NC0wN2JmYzI4ZGQ5ZTgiXQ==",
"has_previous_page": true,
"has_next_page": true
}
}
Returns CustomEntity Types
Custom entity api name
GET /api/v100/rest/spaces/{space_id}/entities/{custom_entity_api_name}Type HTTP/1.1
Host: us-east.api.pipelinersales.com
Accept: */*
{
"success": true,
"data": {
"is_delete_protected": false,
"id": "01234567-abcd-dcba-ffff-000000000000",
"modified": "2019-01-01T00:00:00",
"created": "2019-01-01T00:00:00",
"owner": "https://example.com",
"type": "https://example.com",
"unit": "https://example.com",
"name": "string",
"owner_id": "01234567-abcd-dcba-ffff-000000000000",
"share_mode": 0,
"table_name": "string",
"type_id": "01234567-abcd-dcba-ffff-000000000000",
"unit_id": "01234567-abcd-dcba-ffff-000000000000",
"is_deleted": false,
"sharing_units": [
"https://example.com"
],
"sharing_clients": [
"https://example.com"
],
"documents": [
"https://example.com"
],
"is_favorite": false,
"revision": 1
}
}
Returns all defined Opportunities
if enabled, deleted Opportunities are returned as well
Number of entities to return from beginning of the result set. Max: 100. Default: 30
Return only the "last" number of entities from result set. When used with first parameter, then it returns last M records from the first N records.
Cursor until which to take entities to result set.
Cursor after which to start taking entities to result set.
Expand related entity. Use api_names of relation fields. You can use multiple values separated via ',' colon. If not used, URI link will be returned instead. You can use dots '.' to expand nested entities as well.
expand=owner,sales_unit,account_relations.account
Order by values. Use api_name of field to sort by ascending. Prefix api_name with '-' to descending sort. You can use multiple values separated via ',' colon.
order-by=created,-modified
Use name of field in braces to filter by this field. To advanced filter, use with combination with filter-op parameter.
filter[name]=Example
Filter operator. Specify a way how to filter fields. Supported operators: [eq, ieq, not-eq, not-ieq, contains, starts, ends, icontains, istarts, iends, null, not-null, empty, not-empty, gt, gte, lt, lte, between].
filter-op[name]=eq
Loads only fields defined within this parameter. You can use multiple values separated via ',' colon. If not used, then all fields are returned. You can use dots '.' to specify load only fields in nested as well.
load-only=id,name,owner.id
GET /api/v100/rest/spaces/{space_id}/entities/Opportunities HTTP/1.1
Host: us-east.api.pipelinersales.com
Accept: */*
{
"success": true,
"data": [],
"page_info": {
"start_cursor": "WyIwMSIsICJiMmYwODI0Ni1iYWE5LTQyY2QtYmM3Yi04YmM4MjY3M2E2NTgiXQ==",
"end_cursor": "WyIwNSIsICJmMjZhZjZiMC00ZWE4LTQ3MDgtODU2NC0wN2JmYzI4ZGQ5ZTgiXQ==",
"has_previous_page": true,
"has_next_page": true
}
}
Returns all defined {custom_entity_api_name}
Custom entity api name
if enabled, deleted {custom_entity_api_name} are returned as well
Number of entities to return from beginning of the result set. Max: 100. Default: 30
Return only the "last" number of entities from result set. When used with first parameter, then it returns last M records from the first N records.
Cursor until which to take entities to result set.
Cursor after which to start taking entities to result set.
Expand related entity. Use api_names of relation fields. You can use multiple values separated via ',' colon. If not used, URI link will be returned instead. You can use dots '.' to expand nested entities as well.
expand=owner,sales_unit,account_relations.account
Order by values. Use api_name of field to sort by ascending. Prefix api_name with '-' to descending sort. You can use multiple values separated via ',' colon.
order-by=created,-modified
Use name of field in braces to filter by this field. To advanced filter, use with combination with filter-op parameter.
filter[name]=Example
Filter operator. Specify a way how to filter fields. Supported operators: [eq, ieq, not-eq, not-ieq, contains, starts, ends, icontains, istarts, iends, null, not-null, empty, not-empty, gt, gte, lt, lte, between].
filter-op[name]=eq
Loads only fields defined within this parameter. You can use multiple values separated via ',' colon. If not used, then all fields are returned. You can use dots '.' to specify load only fields in nested as well.
load-only=id,name,owner.id
GET /api/v100/rest/spaces/{space_id}/entities/{custom_entity_api_name} HTTP/1.1
Host: us-east.api.pipelinersales.com
Accept: */*
{
"success": true,
"data": [],
"page_info": {
"start_cursor": "WyIwMSIsICJiMmYwODI0Ni1iYWE5LTQyY2QtYmM3Yi04YmM4MjY3M2E2NTgiXQ==",
"end_cursor": "WyIwNSIsICJmMjZhZjZiMC00ZWE4LTQ3MDgtODU2NC0wN2JmYzI4ZGQ5ZTgiXQ==",
"has_previous_page": true,
"has_next_page": true
}
}
Creates new CustomEntity
Custom entity api name
Specify validation level of CustomEntity on create. Use them as bit mask: 0 - validate each field on entity, 2 - validate only changed fields, 4 - validate only system fields, 8 - allows to override readonly fields, 16 - allows to set entity on deleted relationship.
Last modification time.
2019-01-01T00:00:00
Creation time.
2019-01-01T00:00:00
Name of the entity and its default text representation.
string
Relation to single entity instance.
01234567-abcd-dcba-ffff-000000000000
Integer enum value: 0 - Standard, 1 - Private, 2 - AllView, 3 - AllEdit
0
Possible values: Relation to single entity instance.
01234567-abcd-dcba-ffff-000000000000
Relation to single entity instance.
01234567-abcd-dcba-ffff-000000000000
Revision when entity was lastly changed.
1
POST /api/v100/rest/spaces/{space_id}/entities/{custom_entity_api_name} HTTP/1.1
Host: us-east.api.pipelinersales.com
Content-Type: application / json
Accept: */*
Content-Length: 332
{
"name": "string",
"owner_id": "01234567-abcd-dcba-ffff-000000000000",
"share_mode": 0,
"type_id": "01234567-abcd-dcba-ffff-000000000000",
"unit_id": "01234567-abcd-dcba-ffff-000000000000",
"sharing_units": [
{
"id": "https://example.com"
}
],
"sharing_clients": [
{
"id": "https://example.com"
}
],
"documents": [
{
"id": "https://example.com"
}
],
"revision": 1
}
{
"success": true,
"data": {
"is_delete_protected": false,
"id": "01234567-abcd-dcba-ffff-000000000000",
"modified": "2019-01-01T00:00:00",
"created": "2019-01-01T00:00:00",
"owner": "https://example.com",
"type": "https://example.com",
"unit": "https://example.com",
"name": "string",
"owner_id": "01234567-abcd-dcba-ffff-000000000000",
"share_mode": 0,
"table_name": "string",
"type_id": "01234567-abcd-dcba-ffff-000000000000",
"unit_id": "01234567-abcd-dcba-ffff-000000000000",
"is_deleted": false,
"sharing_units": [
"https://example.com"
],
"sharing_clients": [
"https://example.com"
],
"documents": [
"https://example.com"
],
"is_favorite": false,
"revision": 1
}
}
Modifies CustomEntity or {custom_entity_api_name} with given id(s)
Custom entity api name
ID of CustomEntity to update
Specify validation level of CustomEntity on update. Use them as bit mask: 0 - validate each field on entity, 2 - validate only changed fields, 4 - validate only system fields, 8 - allows to override readonly fields, 16 - allows to set entity on deleted relationship.
Name of the entity and its default text representation.
string
Relation to single entity instance.
01234567-abcd-dcba-ffff-000000000000
Integer enum value: 0 - Standard, 1 - Private, 2 - AllView, 3 - AllEdit
0
Possible values: Relation to single entity instance.
01234567-abcd-dcba-ffff-000000000000
Relation to single entity instance.
01234567-abcd-dcba-ffff-000000000000
Revision when entity was lastly changed.
1
PATCH /api/v100/rest/spaces/{space_id}/entities/{custom_entity_api_name}/{id} HTTP/1.1
Host: us-east.api.pipelinersales.com
Content-Type: application/json
Accept: */*
Content-Length: 332
{
"name": "string",
"owner_id": "01234567-abcd-dcba-ffff-000000000000",
"share_mode": 0,
"type_id": "01234567-abcd-dcba-ffff-000000000000",
"unit_id": "01234567-abcd-dcba-ffff-000000000000",
"sharing_units": [
{
"id": "https://example.com"
}
],
"sharing_clients": [
{
"id": "https://example.com"
}
],
"documents": [
{
"id": "https://example.com"
}
],
"revision": 1
}
{
"success": true,
"data": {
"is_delete_protected": false,
"id": "01234567-abcd-dcba-ffff-000000000000",
"modified": "2019-01-01T00:00:00",
"created": "2019-01-01T00:00:00",
"owner": "https://example.com",
"type": "https://example.com",
"unit": "https://example.com",
"name": "string",
"owner_id": "01234567-abcd-dcba-ffff-000000000000",
"share_mode": 0,
"table_name": "string",
"type_id": "01234567-abcd-dcba-ffff-000000000000",
"unit_id": "01234567-abcd-dcba-ffff-000000000000",
"is_deleted": false,
"sharing_units": [
"https://example.com"
],
"sharing_clients": [
"https://example.com"
],
"documents": [
"https://example.com"
],
"is_favorite": false,
"revision": 1
}
}