type CustomField (v202411)
Stay organized with collections
Save and categorize content based on your preferences.
Service
CustomFieldService
An additional, user-created field on an entity.
- Namespace
-
https://www.google.com/apis/ads/publisher/v202411
Field
|
id
|
xsd:long
Unique ID of the CustomField . This value is readonly and is assigned by Google.
|
name
|
xsd:string
Name of the CustomField . This is value is required to create a custom field. The max
length is 127 characters.
|
description
|
xsd:string
A description of the custom field. This value is optional. The maximum length is 511 characters
|
isActive
|
xsd:boolean
Specifies whether or not the custom fields is active. This attribute is read-only.
|
entityType
|
CustomFieldEntityType
The type of entity that this custom field is associated with. This attribute is read-only if
there exists a CustomFieldValue for this field.
Enumerations
-
LINE_ITEM
- Represents the LineItem type.
-
ORDER
- Represents the Order type.
-
CREATIVE
- Represents the Creative type.
-
PROPOSAL
- Represents the Proposal type.
-
PROPOSAL_LINE_ITEM
- Represents the ProposalLineItem type.
-
UNKNOWN
- The value returned if the actual value is not exposed by the requested API version.
|
dataType
|
CustomFieldDataType
The type of data this custom field contains. This attribute is read-only if there exists a
CustomFieldValue for this field.
Enumerations
-
STRING
- A string field. The max length is 255 characters.
-
NUMBER
- A number field.
-
TOGGLE
- A boolean field. Values may be "true", "false",
or empty.
-
DROP_DOWN
- A drop-down field. Values may only be the ids
of CustomFieldOption objects.
-
UNKNOWN
- The value returned if the actual value is not exposed by the requested API version.
|
visibility
|
CustomFieldVisibility
How visible/accessible this field is in the UI.
Enumerations
-
UNKNOWN
- The value returned if the actual value is not exposed by the requested API version.
-
API_ONLY
- Only visible through the API.
-
READ_ONLY
- Visible in the UI, but only editable through the API
-
FULL
- Visible and editable both in the API and the UI.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-06 UTC.
[null,null,["Last updated 2025-08-06 UTC."],[[["\u003cp\u003eCustom fields are user-defined fields that can be added to entities like line items, orders, creatives, and proposals to store additional information.\u003c/p\u003e\n"],["\u003cp\u003eThey have properties like name, description, data type (string, number, toggle, drop-down), and visibility (API only, read-only, full).\u003c/p\u003e\n"],["\u003cp\u003eCustom fields are identified by a unique ID assigned by Google and can be activated or deactivated using the \u003ccode\u003eisActive\u003c/code\u003e property.\u003c/p\u003e\n"],["\u003cp\u003eThey can be associated with various entities using the \u003ccode\u003eentityType\u003c/code\u003e property and their values are stored separately in \u003ccode\u003eCustomFieldValue\u003c/code\u003e objects.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eCustomFieldService\u003c/code\u003e allows for creating, updating, and managing custom fields in Google Ad Manager.\u003c/p\u003e\n"]]],["The `CustomFieldService` allows for the creation and updating of custom fields. Key attributes include `id` (read-only), `name` (required, max 127 characters), `description` (optional, max 511 characters), `isActive` (read-only), `entityType` (read-only), and `dataType` (read-only). These custom fields are associated with entities like `LINE_ITEM`, `ORDER`, `CREATIVE`, `PROPOSAL`, or `PROPOSAL_LINE_ITEM`, and can contain data such as `STRING`, `NUMBER`, `TOGGLE`, or `DROP_DOWN`. The `visibility` determines UI accessibility: `API_ONLY`, `READ_ONLY`, or `FULL`.\n"],null,["# type CustomField (v202411)\n\n**Service** \n**CustomFieldService** **Dependencies** \n[CustomFieldPage](/ad-manager/api/reference/v202411/CustomFieldService.CustomFieldPage) [createCustomFields()](/ad-manager/api/reference/v202411/CustomFieldService#createCustomFields) [updateCustomFields()](/ad-manager/api/reference/v202411/CustomFieldService#updateCustomFields) \n▼\n**CustomField** **Inheritance** \n**CustomField** \n▼\n[DropDownCustomField](/ad-manager/api/reference/v202411/CustomFieldService.DropDownCustomField)\n\nAn additional, user-created field on an entity.\n\n*** ** * ** ***\n\nNamespace\n:\n `https://www.google.com/apis/ads/publisher/v202411`\n\n| Field ----- ||\n|-------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ### `id` | ` `xsd:`long` Unique ID of the `CustomField`. This value is readonly and is assigned by Google. |\n| ### `name` | ` `xsd:`string` Name of the `CustomField`. This is value is required to create a custom field. The max length is 127 characters. |\n| ### `description` | ` `xsd:`string` A description of the custom field. This value is optional. The maximum length is 511 characters |\n| ### `isActive` | ` `xsd:`boolean` Specifies whether or not the custom fields is active. This attribute is read-only. |\n| ### `entityType` | ` `[CustomFieldEntityType](/ad-manager/api/reference/v202411/CustomFieldService.CustomFieldEntityType)` ` The type of entity that this custom field is associated with. This attribute is read-only if there exists a [CustomFieldValue](/ad-manager/api/reference/v202411/CreativeService.CustomFieldValue) for this field. *** ** * ** *** **Enumerations** `LINE_ITEM` : Represents the [LineItem](/ad-manager/api/reference/v202411/ForecastService.LineItem) type. `ORDER` : Represents the [Order](/ad-manager/api/reference/v202411/OrderService.Order) type. `CREATIVE` : Represents the [Creative](/ad-manager/api/reference/v202411/CreativeService.Creative) type. `PROPOSAL` : Represents the [Proposal](/ad-manager/api/reference/v202411/ProposalService.Proposal) type. `PROPOSAL_LINE_ITEM` : Represents the [ProposalLineItem](/ad-manager/api/reference/v202411/ForecastService.ProposalLineItem) type. `UNKNOWN` : The value returned if the actual value is not exposed by the requested API version. \u003cbr /\u003e |\n| ### `dataType` | ` `[CustomFieldDataType](/ad-manager/api/reference/v202411/CustomFieldService.CustomFieldDataType)` ` The type of data this custom field contains. This attribute is read-only if there exists a [CustomFieldValue](/ad-manager/api/reference/v202411/CreativeService.CustomFieldValue) for this field. *** ** * ** *** **Enumerations** `STRING` : A string field. The max length is 255 characters. `NUMBER` : A number field. `TOGGLE` : A boolean field. Values may be \"true\", \"false\", or empty. `DROP_DOWN` : A drop-down field. Values may only be the ids of [CustomFieldOption](/ad-manager/api/reference/v202411/CustomFieldService.CustomFieldOption) objects. `UNKNOWN` : The value returned if the actual value is not exposed by the requested API version. \u003cbr /\u003e |\n| ### `visibility` | ` `[CustomFieldVisibility](/ad-manager/api/reference/v202411/CustomFieldService.CustomFieldVisibility)` ` How visible/accessible this field is in the UI. *** ** * ** *** **Enumerations** `UNKNOWN` : The value returned if the actual value is not exposed by the requested API version. `API_ONLY` : Only visible through the API. `READ_ONLY` : Visible in the UI, but only editable through the API `FULL` : Visible and editable both in the API and the UI. \u003cbr /\u003e |"]]