AdsApp.ProductConditionBuilder
Stay organized with collections
Save and categorize content based on your preferences.
Builder for
ProductCondition
objects.
Methods:
build()
Builds the product condition. Returns a
ProductConditionOperation that corresponds
to the creation of the
ProductCondition.
Return values:
withBid(bid)
Specifies the bid of the product condition. If this is unspecified, will
use the bid of the parent product group.
Arguments:
Name | Type | Description |
bid |
double |
The bid. |
Return values:
withCondition(condition)
Specifies the condition of the new product condition. If the condition is
unspecified before calling 'build', the condition will fail to build.
Arguments:
Name | Type | Description |
condition |
String |
The condition to specify for the new product condition. |
Return values:
withValue(value)
Specifies the value of the product condition.
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.
[null,null,["Last updated 2025-08-25 UTC."],[[["\u003cp\u003eThis page documents the \u003ccode\u003eProductConditionBuilder\u003c/code\u003e, used for creating new product conditions in Google Ads scripts.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods to specify the bid, condition, and value of the product condition being built.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ebuild()\u003c/code\u003e method finalizes the product condition and returns a \u003ccode\u003eProductConditionOperation\u003c/code\u003e for execution.\u003c/p\u003e\n"],["\u003cp\u003eIf the \u003ccode\u003ewithBid()\u003c/code\u003e method is not used, the product condition will inherit the bid of its parent product group.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ewithCondition()\u003c/code\u003e method is mandatory, and the product condition will fail to build if a condition is not specified.\u003c/p\u003e\n"]]],[],null,["# AdsApp.ProductConditionBuilder\n\nBuilder for [ProductCondition](/google-ads/scripts/docs/reference/adsapp/adsapp_productcondition) objects.\n\n### Methods:\n\n| Member | Type | Description |\n|------------------------------------------------------|----------------------------------------------------------------------------------------------------------------|-------------------------------------------------------|\n| [build()](#build) | [AdsApp.ProductConditionOperation](/google-ads/scripts/docs/reference/adsapp/adsapp_productconditionoperation) | Builds the product condition. |\n| [withBid(bid)](#withBid_bid) | [AdsApp.ProductConditionBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_productconditionbuilder) | Specifies the bid of the product condition. |\n| [withCondition(condition)](#withCondition_condition) | [AdsApp.ProductConditionBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_productconditionbuilder) | Specifies the condition of the new product condition. |\n| [withValue(value)](#withValue_value) | [AdsApp.ProductConditionBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_productconditionbuilder) | Specifies the value of the product condition. |\n\n`build()`\n---------\n\nBuilds the product condition. Returns a [ProductConditionOperation](/google-ads/scripts/docs/reference/adsapp/adsapp_productconditionoperation) that corresponds to the creation of the [ProductCondition](/google-ads/scripts/docs/reference/adsapp/adsapp_productcondition).\n\n### Return values:\n\n| Type | Description |\n|----------------------------------------------------------------------------------------------------------------|--------------------------------|\n| [AdsApp.ProductConditionOperation](/google-ads/scripts/docs/reference/adsapp/adsapp_productconditionoperation) | The ProductConditionOperation. |\n\n`withBid(bid)`\n--------------\n\nSpecifies the bid of the product condition. 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.ProductConditionBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_productconditionbuilder) | The ProductConditionBuilder with the specified bid. |\n\n`withCondition(condition)`\n--------------------------\n\nSpecifies the condition of the new product condition. If the condition is unspecified before calling 'build', the condition will fail to build.\n\n### Arguments:\n\n| Name | Type | Description |\n|-----------|----------|---------------------------------------------------------|\n| condition | `String` | The condition to specify for the new product condition. |\n\n### Return values:\n\n| Type | Description |\n|------------------------------------------------------------------------------------------------------------|----------------------------|\n| [AdsApp.ProductConditionBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_productconditionbuilder) | Product condition builder. |\n\n`withValue(value)`\n------------------\n\nSpecifies the value of the product condition.\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.ProductConditionBuilder](/google-ads/scripts/docs/reference/adsapp/adsapp_productconditionbuilder) | The ProductConditionBuilder with the specified value. |"]]