AdsApp.​ProductItemIdBuilder

  • This page documents the ProductItemId builder, which is used to create and manage product item IDs in Google Ads scripts.

  • The builder provides methods to specify the bid and value for the product item ID.

  • If the bid is not specified using withBid(), the system defaults to the parent product group's bid.

  • The build() method finalizes the product item ID creation and returns a ProductItemIdOperation.

Builder for ProductItemId objects.

Methods:

MemberTypeDescription
build() AdsApp.ProductItemIdOperation Builds the product item id.
withBid(bid) AdsApp.ProductItemIdBuilder Specifies the bid of the product item id.
withValue(value) AdsApp.ProductItemIdBuilder Specifies the value of the product item id.

build()

Builds the product item id. Returns a ProductItemIdOperation that corresponds to the creation of the ProductItemId.

Return values:

TypeDescription
AdsApp.ProductItemIdOperation The ProductItemIdOperation.

withBid(bid)

Specifies the bid of the product item id. If this is unspecified, will use the bid of the parent product group.

Arguments:

NameTypeDescription
bid double The bid.

Return values:

TypeDescription
AdsApp.ProductItemIdBuilder The ProductItemIdBuilder with the specified bid.

withValue(value)

Specifies the value of the product item id.

Arguments:

NameTypeDescription
value String The value.

Return values:

TypeDescription
AdsApp.ProductItemIdBuilder The ProductItemIdBuilder with the specified value.