AdsApp.ProductCustomLabelBuilder
Stay organized with collections
Save and categorize content based on your preferences.
Builder for
ProductCustomLabel
objects.
Methods:
build()
Builds the product custom label. Returns a
ProductCustomLabelOperation that corresponds
to the creation of the
ProductCustomLabel.
Return values:
withBid(bid)
Specifies the bid of the product custom label. If this is unspecified, will
use the bid of the parent product group.
Arguments:
Name | Type | Description |
bid |
double |
The bid. |
Return values:
withType(type)
Specifies the type of custom label and returns the product custom label
builder. The preferred values for label types follow the pattern: INDEX0,
INDEX1, ..., but this method also accepts the legacy values formatted like:
CUSTOM_LABEL_0, CUSTOM_LABEL_1, ...
Arguments:
Name | Type | Description |
type |
String |
The type of custom label. Possible values: INDEX0 ,
INDEX1 , INDEX2 , INDEX3 ,
INDEX4 , CUSTOM_LABEL_0 ,
CUSTOM_LABEL_1 , CUSTOM_LABEL_2 ,
CUSTOM_LABEL_3 , CUSTOM_LABEL_4 . |
Return values:
withValue(value)
Specifies the value of the product custom label.
Arguments:
Name | Type | Description |
value |
String |
The value. |
Return values:
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-25 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-25 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eProductCustomLabelBuilder\u003c/code\u003e is used to create \u003ccode\u003eProductCustomLabel\u003c/code\u003e objects, which can be used to organize and manage product groups.\u003c/p\u003e\n"],["\u003cp\u003eYou can specify the bid, type, and value of the product custom label using the \u003ccode\u003ewithBid\u003c/code\u003e, \u003ccode\u003ewithType\u003c/code\u003e, and \u003ccode\u003ewithValue\u003c/code\u003e methods, respectively.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ebuild\u003c/code\u003e method finalizes the creation of the \u003ccode\u003eProductCustomLabel\u003c/code\u003e and returns a \u003ccode\u003eProductCustomLabelOperation\u003c/code\u003e to apply the changes.\u003c/p\u003e\n"],["\u003cp\u003eProduct custom label types are preferably set using \u003ccode\u003eINDEX0\u003c/code\u003e, \u003ccode\u003eINDEX1\u003c/code\u003e, etc., but legacy formats like \u003ccode\u003eCUSTOM_LABEL_0\u003c/code\u003e, \u003ccode\u003eCUSTOM_LABEL_1\u003c/code\u003e, etc., are also accepted.\u003c/p\u003e\n"],["\u003cp\u003eIf the bid is not explicitly specified using \u003ccode\u003ewithBid\u003c/code\u003e, the product custom label will inherit the bid from its parent product group.\u003c/p\u003e\n"]]],[],null,["# AdsApp.ProductCustomLabelBuilder\n\nBuilder for [ProductCustomLabel](/google-ads/scripts/docs/reference/adsapp/adsapp_productcustomlabel) objects.\n\n### Methods:\n\n| Member | Type | Description |\n|--------------------------------------|--------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------|\n| [build()](#build) | [AdsApp.ProductCustomLabelOperation](/google-ads/scripts/docs/reference/adsapp/adsapp_productcustomlabeloperation) | Builds the product custom label. |\n| [withBid(bid)](#withBid_bid) | [AdsApp.ProductCustomLabelBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_productcustomlabelbuilder) | Specifies the bid of the product custom label. |\n| [withType(type)](#withType_type) | [AdsApp.ProductCustomLabelBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_productcustomlabelbuilder) | Specifies the type of custom label and returns the product custom label builder. |\n| [withValue(value)](#withValue_value) | [AdsApp.ProductCustomLabelBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_productcustomlabelbuilder) | Specifies the value of the product custom label. |\n\n`build()`\n---------\n\nBuilds the product custom label. Returns a [ProductCustomLabelOperation](/google-ads/scripts/docs/reference/adsapp/adsapp_productcustomlabeloperation) that corresponds to the creation of the [ProductCustomLabel](/google-ads/scripts/docs/reference/adsapp/adsapp_productcustomlabel).\n\n### Return values:\n\n| Type | Description |\n|--------------------------------------------------------------------------------------------------------------------|----------------------------------|\n| [AdsApp.ProductCustomLabelOperation](/google-ads/scripts/docs/reference/adsapp/adsapp_productcustomlabeloperation) | The ProductCustomLabelOperation. |\n\n`withBid(bid)`\n--------------\n\nSpecifies the bid of the product custom label. If this is unspecified, will use the bid of the parent product group.\n\n### Arguments:\n\n| Name | Type | Description |\n|------|----------|-------------|\n| bid | `double` | The bid. |\n\n### Return values:\n\n| Type | Description |\n|----------------------------------------------------------------------------------------------------------------|-------------------------------------------------------|\n| [AdsApp.ProductCustomLabelBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_productcustomlabelbuilder) | The ProductCustomLabelBuilder with the specified bid. |\n\n`withType(type)`\n----------------\n\nSpecifies the type of custom label and returns the product custom label builder. The preferred values for label types follow the pattern: INDEX0, INDEX1, ..., but this method also accepts the legacy values formatted like: CUSTOM_LABEL_0, CUSTOM_LABEL_1, ...\n\n### Arguments:\n\n| Name | Type | Description |\n|------|----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| type | `String` | The type of custom label. Possible values: `INDEX0`, `INDEX1`, `INDEX2`, `INDEX3`, `INDEX4`, `CUSTOM_LABEL_0`, `CUSTOM_LABEL_1`, `CUSTOM_LABEL_2`, `CUSTOM_LABEL_3`, `CUSTOM_LABEL_4`. |\n\n### Return values:\n\n| Type | Description |\n|----------------------------------------------------------------------------------------------------------------|-----------------------------------|\n| [AdsApp.ProductCustomLabelBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_productcustomlabelbuilder) | The product custom label builder. |\n\n`withValue(value)`\n------------------\n\nSpecifies the value of the product custom label.\n\n### Arguments:\n\n| Name | Type | Description |\n|-------|----------|-------------|\n| value | `String` | The value. |\n\n### Return values:\n\n| Type | Description |\n|----------------------------------------------------------------------------------------------------------------|---------------------------------------------------------|\n| [AdsApp.ProductCustomLabelBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_productcustomlabelbuilder) | The ProductCustomLabelBuilder with the specified value. |"]]