Listing groups in PMAX retail campains

2023-12-04 Thread Tanish Gupta
Hi

Can anyone tell if subdivision is not permitted in pmax retail campiagns??



Thanks
Tanish

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/1d3fdbdc-39b5-4f6b-a84f-7f75d4e5d3ben%40googlegroups.com.


Re: listing groups creation in pmax campaigns

2023-12-04 Thread Tanish Gupta
Can you give me a example of making a subdivision tree in omax retail 
campaign as i am not able to create this and according to example provided 
in google ads docs is not working for me

On Saturday, 2 December 2023 at 06:06:45 UTC+5:30 Google Ads API Forum 
Advisor wrote:

> Hi,
>
> Thank you for getting back to us.
>
> Upon checking further, please note that a subdivision introduces a new 
> level in the tree, while units are leaves of the tree. Each subdivision 
> must always be completely partitioned, so it must contain a node 
> representing other. This tree structure with subdivisions and units lets 
> you set bids at the unit level and also ensures that every product falls 
> into one and only one unit node in the tree. I would recommend you refer to 
> the 'Creating Shopping Listing Groups 
> ',
>  
> 'Performance Max listing groups 
> '
>  
> and 'AssetGroupListingGroupFilterService 
> '
>  
> API documentations for more information.
>
> If still the issue persists, please provide us with the complete API logs (
> request 
> 
>  and response 
> 
>  with request-id 
> 
>  and request header 
> )
>  
> generated at your end. If you are using a client library and haven't 
> enabled the logging yet, I would request you to enable logging for the 
> specific client library that you are using. You can refer to the guides 
> Java 
> , 
> .Net 
> 
> , PHP 
> 
> , Python 
> 
> , Ruby 
> 
>  or Perl 
>  
> to enable logging at 
> your end. For REST interface requests, you can enable logging via the curl 
> command by using the -i flag.
>
>   
> This message is in relation to case "ref:!00D1U01174p.!5004Q02qUeqY:ref"
>
> Thanks, 
> [image: Google Logo] Google Ads API Team 
>
>  
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/2f9f0618-4b99-4bab-bb67-d6a592d2ee9bn%40googlegroups.com.


Re: listing groups creation in pmax campaigns

2023-11-30 Thread Tanish Gupta
My code : String assetGroupResourceName = 
"customers/2966251517/assetGroups/6483919124";
long assetGroupdId= Long.parseLong(assetGroupResourceName.substring(
assetGroupResourceName.lastIndexOf("/") + 1));
mutateOperations.clear();
System.out.println("assetGroupResourceName" + assetGroupResourceName);
//AssetGroupListingGroupFilter.Builder listingGroupFilter = 
AssetGroupListingGroupFilter.newBuilder().setAssetGroup(assetGroupResourceName).setType(ListingGroupFilterTypeEnum.ListingGroupFilterType.SUBDIVISION).setListingSource(ListingGroupFilterListingSourceEnum.ListingGroupFilterListingSource.SHOPPING);
AssetGroupListingGroupFilter listingGroupFilter = 
AssetGroupListingGroupFilter.newBuilder()
.setAssetGroup(ResourceNames.assetGroup(Long.parseLong(saInfo.getAccountId()), 
assetGroupdId))
//.setResourceName(ResourceNames.assetGroupListingGroupFilter(Long.parseLong(saInfo.getAccountId()),
 
assetGroupdId, 11339184668L))
// Since this is the root node, do not set the ParentListingGroupFilter. 
For all other
// nodes, this would refer to the parent listing group filter resource name.
// .setParentListingGroupFilter("PARENT_FILTER_NAME")
//
// Unlike AddPerformanceMaxRetailCampaign, the type for the root node here 
must be
// SUBDIVISION because it will have child partitions under it.
.setType(ListingGroupFilterTypeEnum.ListingGroupFilterType.SUBDIVISION)
// Specifies that this uses the shopping listing source because it is a 
Performance
// Max campaign for retail.
.setListingSource(ListingGroupFilterListingSourceEnum.
ListingGroupFilterListingSource.SHOPPING)

//.setParentListingGroupFilter(ResourceNames.assetGroupListingGroupFilter(Long.parseLong(saInfo.getAccountId()),
 
assetGroupdId, 11339184668L))
//.setCaseValue(ListingGroupFilterDimension.newBuilder().setProductCustomAttribute(ListingGroupFilterDimension.ProductCustomAttribute.newBuilder().setValue("10-10").setIndex(ListingGroupFilterCustomAttributeIndexEnum.ListingGroupFilterCustomAttributeIndex.INDEX0).build()).build())
// Note the case_value is not set because it should be undefined for the 
root node.
.build();

Error : com.google.ads.googleads.v15.errors.GoogleAdsException: errors {
  error_code {
asset_group_listing_group_filter_error: 
SUBDIVISION_MUST_HAVE_EVERYTHING_ELSE_CHILD
  }
  message: "Listing Group SUBDIVISION node must have everything else child."
  location {
field_path_elements {
  field_name: "mutate_operations"
  index: 0
}
field_path_elements {
  field_name: "asset_group_listing_group_filter_operation"
}
field_path_elements {
  field_name: "create"
}
field_path_elements {
  field_name: "type"
}
  }
}
request_id: "ijlCc3TXKxRNp6AuhS5NFQ"

Thanks
Tanish
On Thursday, 23 November 2023 at 17:42:36 UTC+5:30 Google Ads API Forum 
Advisor wrote:

> Hi Tanish,
>
> Thank you for reaching out to the Google Ads API support team.
>
> After reviewing your concern, I understand that you want to create listing 
> groups for PMAX campaigns. Yes, you can create listing groups using the 
> example provided in the Google Ads API documentation Creating Shopping 
> Listing Groups 
> .
>  
> The example performance Max listing groups 
> 
>  
> demonstrates how to create a new listing group for PMAX campaigns.
>
> If the issue persists, please provide us with the complete API logs (
> *request* 
> 
>  and  
> 
> *response* 
> 
>  with  
> 
> *request-id* 
> 
>  and  
> *request
>  
> header* 
> )
>  
> generated at your end so that we can better assist you.
>
> If you are using a client library and haven't enabled the logging yet, I 
> would request you to enable logging for the specific client library that 
> you are using. You can refer to the guides  
> 
> *Java* 
> 
> ,  
> 
> *.Net* 
> 
> ,  
> 
> *PHP* 
> 

Listing groups in PMAX retail campign

2023-11-30 Thread Tanish Gupta
Hi

What this mean ? Unlike AddPerformanceMaxRetailCampaign, the type for the 
root node here must be
  // SUBDIVISION because it will have child partitions under it.

in this 
doc 
https://developers.google.com/google-ads/api/samples/add-performance-max-product-listing-group-tree

as i am not able to root subdivision in retail campign 
error:
  message: "Listing Group SUBDIVISION node must have everything else child."

Code: String campaignResourceName =
ResourceNames.campaign(Long.parseLong(saInfo.getAccountId()), 20816528066L);
AssetGroup assetGroup =
AssetGroup.newBuilder()
.setName("Performance Max asset group #" + "_test_13")
.setCampaign(campaignResourceName)
.addFinalUrls("http://www.test.ch;)
.addFinalMobileUrls("http://www.test.ch;)
.setStatus(AssetGroupStatusEnum.AssetGroupStatus.PAUSED)
.build();
AssetGroupOperation assetGroupOperation =
AssetGroupOperation.newBuilder().setCreate(assetGroup).build();
mutateOperations.add(
MutateOperation.newBuilder().setAssetGroupOperation(assetGroupOperation
).build());
List responses = 
(getCampaignSharedSetService().mutate((mutateOperations), saInfo
.getAccountId()));
System.out.println("responses" + responses);
String assetGroupResourceName = responses.get(0
).getAssetGroupResult().getResourceName();
long assetGroupdId= Long.parseLong(assetGroupResourceName.substring(
assetGroupResourceName.lastIndexOf("/") + 1));
mutateOperations.clear();
System.out.println("assetGroupResourceName" + assetGroupResourceName);
//AssetGroupListingGroupFilter.Builder listingGroupFilter = 
AssetGroupListingGroupFilter.newBuilder().setAssetGroup(assetGroupResourceName).setType(ListingGroupFilterTypeEnum.ListingGroupFilterType.SUBDIVISION).setListingSource(ListingGroupFilterListingSourceEnum.ListingGroupFilterListingSource.SHOPPING);
AssetGroupListingGroupFilter listingGroupFilter = 
AssetGroupListingGroupFilter.newBuilder()
.setAssetGroup(ResourceNames.assetGroup(Long.parseLong(saInfo.getAccountId()), 
assetGroupdId))
.setResourceName(ResourceNames.assetGroupListingGroupFilter(Long.parseLong(
saInfo.getAccountId()), assetGroupdId, -1))
// Since this is the root node, do not set the ParentListingGroupFilter. 
For all other
// nodes, this would refer to the parent listing group filter resource name.
// .setParentListingGroupFilter("PARENT_FILTER_NAME")
//
// Unlike AddPerformanceMaxRetailCampaign, the type for the root node here 
must be
// SUBDIVISION because it will have child partitions under it.
.setType(ListingGroupFilterTypeEnum.ListingGroupFilterType.SUBDIVISION)
// Specifies that this uses the shopping listing source because it is a 
Performance
// Max campaign for retail.
.setListingSource(ListingGroupFilterListingSourceEnum.
ListingGroupFilterListingSource.SHOPPING)

//.setParentListingGroupFilter(ResourceNames.assetGroupListingGroupFilter(Long.parseLong(saInfo.getAccountId()),
 
assetGroupdId, 11339208521L))
//.setCaseValue(ListingGroupFilterDimension.newBuilder().setProductCustomAttribute(ListingGroupFilterDimension.ProductCustomAttribute.newBuilder().setValue("10-10").setIndex(ListingGroupFilterCustomAttributeIndexEnum.ListingGroupFilterCustomAttributeIndex.INDEX0).build()).build())
// Note the case_value is not set because it should be undefined for the 
root node.
.build();
AssetGroupListingGroupFilterOperation.Builder listingGroupFilter1 = 
AssetGroupListingGroupFilterOperation.newBuilder().setCreate(
listingGroupFilter);
AssetGroupListingGroupFilterOperation operation =
AssetGroupListingGroupFilterOperation.newBuilder().setCreate(
listingGroupFilter).build();
System.out.println(operation);
MutateOperation.Builder mutateOperation1 = MutateOperation.newBuilder
().setAssetGroupListingGroupFilterOperation(operation);
mutateOperations.add(mutateOperation1.build());
listingGroupFilter =
AssetGroupListingGroupFilter.newBuilder()
.setAssetGroup(ResourceNames.assetGroup(Long.parseLong(saInfo.getAccountId()), 
assetGroupdId))
.setParentListingGroupFilter(
ResourceNames.assetGroupListingGroupFilter(Long.parseLong(saInfo.getAccountId()),
 
assetGroupdId, -1))
// Uses the UNIT_INCLUDED type to indicate that the 
AssetGroupListingGroupFilter
// won't have children.
.setType(ListingGroupFilterTypeEnum.ListingGroupFilterType.UNIT_INCLUDED)
// Specifies that this uses the shopping listing source because it is a 
Performance
// Max campaign for retail.
.setListingSource(ListingGroupFilterListingSourceEnum.
ListingGroupFilterListingSource.SHOPPING)
.setCaseValue(ListingGroupFilterDimension.newBuilder
().setProductCustomAttribute(ListingGroupFilterDimension.
ProductCustomAttribute.newBuilder().build()).build())
.build();
AssetGroupListingGroupFilterOperation filterOperation =
AssetGroupListingGroupFilterOperation.newBuilder().setCreate(
listingGroupFilter).build();
mutateOperation1 = MutateOperation.newBuilder
().setAssetGroupListingGroupFilterOperation(filterOperation);
mutateOperations.add(mutateOperation1.build());

Thanks
Tanish

-- 
-- 

Getting stcuk in making listing groups

2023-11-30 Thread Tanish Gupta
Hi

I have a PMAX retail campign and i am not able to make listing groups in it 
:
Error: 
com.google.ads.googleads.v15.errors.GoogleAdsException: errors {
  error_code {
asset_group_listing_group_filter_error: 
SUBDIVISION_MUST_HAVE_EVERYTHING_ELSE_CHILD
  }
  message: "Listing Group SUBDIVISION node must have everything else child."
  trigger {
int64_value: -1
  }
  location {
field_path_elements {
  field_name: "mutate_operations"
  index: 0
}
field_path_elements {
  field_name: "asset_group_listing_group_filter_operation"
}
field_path_elements {
  field_name: "create"
}
field_path_elements {
  field_name: "type"
}
  }
}
errors {
  error_code {
new_resource_creation_error: DUPLICATE_TEMP_IDS
  }
  message: "Creating more than one resource with the same temp ID is not 
allowed."
  trigger {
int64_value: -1
  }
  location {
field_path_elements {
  field_name: "mutate_operations"
  index: 1
}
field_path_elements {
  field_name: "asset_group_listing_group_filter_operation"
}
field_path_elements {
  field_name: "create"
}
field_path_elements {
  field_name: "resource_name"
}
  }
}
request_id: "7SEJ-cM_WkxXs4MMg6_Q3A"


Code:

String assetGroupResourceName = 
"customers/2966251517/assetGroups/6483934165";
long assetGroupdId= Long.parseLong(assetGroupResourceName.substring(
assetGroupResourceName.lastIndexOf("/") + 1));
mutateOperations.clear();
System.out.println("assetGroupResourceName" + assetGroupResourceName);
//AssetGroupListingGroupFilter.Builder listingGroupFilter = 
AssetGroupListingGroupFilter.newBuilder().setAssetGroup(assetGroupResourceName).setType(ListingGroupFilterTypeEnum.ListingGroupFilterType.SUBDIVISION).setListingSource(ListingGroupFilterListingSourceEnum.ListingGroupFilterListingSource.SHOPPING);
AssetGroupListingGroupFilter listingGroupFilter = 
AssetGroupListingGroupFilter.newBuilder()
.setResourceName(
ResourceNames.assetGroupListingGroupFilter(
Long.parseLong(saInfo.getAccountId()), assetGroupdId, -1))
.setAssetGroup(ResourceNames.assetGroup(Long.parseLong(saInfo.getAccountId()), 
assetGroupdId))
// Since this is the root node, do not set the ParentListingGroupFilter. 
For all other
// nodes, this would refer to the parent listing group filter resource name.
// .setParentListingGroupFilter("PARENT_FILTER_NAME")
//
// Unlike AddPerformanceMaxRetailCampaign, the type for the root node here 
must be
// SUBDIVISION because it will have child partitions under it.
.setType(ListingGroupFilterTypeEnum.ListingGroupFilterType.SUBDIVISION)
// Specifies that this uses the shopping listing source because it is a 
Performance
// Max campaign for retail.
.setListingSource(ListingGroupFilterListingSourceEnum.
ListingGroupFilterListingSource.SHOPPING)
// Note the case_value is not set because it should be undefined for the 
root node.
.build();
//AssetGroupListingGroupFilterOperation.Builder listingGroupFilter1 = 
AssetGroupListingGroupFilterOperation.newBuilder().setCreate(listingGroupFilter);
AssetGroupListingGroupFilterOperation operation =
AssetGroupListingGroupFilterOperation.newBuilder().setCreate(
listingGroupFilter).build();
System.out.println(operation);
MutateOperation.Builder mutateOperation1 = MutateOperation.newBuilder
().setAssetGroupListingGroupFilterOperation(operation);
mutateOperations.add(mutateOperation1.build());
listingGroupFilter =
AssetGroupListingGroupFilter.newBuilder()
.setResourceName(
ResourceNames.assetGroupListingGroupFilter(Long.parseLong(saInfo.getAccountId()),
 
assetGroupdId, 132))
.setAssetGroup(ResourceNames.assetGroup(Long.parseLong(saInfo.getAccountId()), 
assetGroupdId))
.setParentListingGroupFilter(
ResourceNames.assetGroupListingGroupFilter(Long.parseLong(saInfo.getAccountId()),
 
assetGroupdId, -1))
// Uses the UNIT_INCLUDED type to indicate that the 
AssetGroupListingGroupFilter
// won't have children.
.setType(ListingGroupFilterTypeEnum.ListingGroupFilterType.UNIT_INCLUDED)
// Specifies that this uses the shopping listing source because it is a 
Performance
// Max campaign for retail.
.setListingSource(ListingGroupFilterListingSourceEnum.
ListingGroupFilterListingSource.SHOPPING)
.setCaseValue(ListingGroupFilterDimension.newBuilder
().setProductCustomAttribute(ListingGroupFilterDimension.
ProductCustomAttribute.newBuilder().setValue("Everything else").setIndex(
ListingGroupFilterCustomAttributeIndexEnum.
ListingGroupFilterCustomAttributeIndex.INDEX0).build()).build())
.build();
AssetGroupListingGroupFilterOperation filterOperation =
AssetGroupListingGroupFilterOperation.newBuilder().setCreate(
listingGroupFilter).build();
mutateOperation1 = MutateOperation.newBuilder
().setAssetGroupListingGroupFilterOperation(operation);
mutateOperations.add(mutateOperation1.build());
System.out.println(getCampaignSharedSetService().mutate((mutateOperations), 
saInfo.getAccountId()));


Thanks
Tanish

-- 
-- 

Re: getting stuck while making a asset group

2023-11-27 Thread Tanish Gupta
But I am making asset group how can i find asset group id?
On Tuesday, 28 November 2023 at 03:17:59 UTC+5:30 Google Ads API Forum 
Advisor wrote:

> Hi,
>
> Thank you for getting back to us.
>
> Kindly note that asset group resource names have the form 
> 'customers/{customer_id}/assetGroups/{asset_group_id}'. Please refer to 
> this link 
>  
> for more information.
>
> Hope this helps. If you have any more queries, please feel free to get 
> back to us.
>
>   
> This message is in relation to case "ref:!00D1U01174p.!5004Q02qV4cQ:ref"
>
> Thanks,
>   
> [image: Google Logo] Google Ads API Team 
>
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/130cd797-47ea-47e8-99b4-301bd46f84b2n%40googlegroups.com.


Re: getting stuck while making a asset group

2023-11-27 Thread Tanish Gupta
My query is how can i generate theassetGroupResourceName while making the 
asset group
On Monday, 27 November 2023 at 20:54:43 UTC+5:30 Google Ads API Forum 
Advisor wrote:

> Hi Tanish,
>
> Thank you for reaching out to the Google Ads API support team.
>
> By reviewing your query, I understand that you are trying to implement an 
> asset group. You may refer to the Asset groups 
> 
>  
> for more details. You may follow the sample on how to Link asset groups 
> to asset 
> 
> .
>
> In order to investigate your issue, provide us with the complete API logs (
> *request* 
> 
>  and *response* 
> 
>  with *request-id* 
> 
>  and *request header* 
> )
>  
> generated at your end.
>
> If you are using a client library and haven't enabled the logging yet, I 
> would request you to enable logging for the specific client library that 
> you are using. You can refer to the guides *Java* 
> 
> , *.Net* 
> 
> , *PHP* 
> 
> , *Python* 
> 
> , *Ruby* 
> 
>  or *Perl* 
>  
> to 
> enable logging at your end. For REST interface requests, you can enable 
> logging via the curl command by using the -i flag.
>   
> This message is in relation to case "ref:!00D1U01174p.!5004Q02qV4cQ:ref"
>
> Thanks,
>   
> [image: Google Logo] Google Ads API Team 
>
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/9a448157-9896-450b-b038-fd5ff1eeded7n%40googlegroups.com.


Getting stuck while making a asset group

2023-11-27 Thread Tanish Gupta
Hi 

I am stuck while making asset group other than this i am able to make 
assets.

AssetGroup assetGroup =
AssetGroup.newBuilder()
.setName("Performance Max asset group #" + "_test")
.setCampaign(campaignResourceName)
.addFinalUrls("http://www.example.com;)
.addFinalMobileUrls("http://www.example.com;)
.setStatus(AssetGroupStatusEnum.AssetGroupStatus.PAUSED)
.setResourceName("customers/2966251517/assetGroupAssets/-1")
.build();
AssetGroupOperation assetGroupOperation =
AssetGroupOperation.newBuilder().setCreate(assetGroup).build();
mutateOperations.add(
MutateOperation.newBuilder().setAssetGroupOperation(assetGroupOperation).build());
for (String resourceName : headLinesResponse) {
AssetGroupAsset assetGroupAsset =
AssetGroupAsset.newBuilder()
.setFieldType(AssetFieldTypeEnum.AssetFieldType.HEADLINE)
.setAsset(resourceName)
.setResourceName("customers/2966251517/assetGroupAssets/-1")
.build();
AssetGroupAssetOperation assetGroupAssetOperation =
AssetGroupAssetOperation.newBuilder().setCreate(assetGroupAsset).build();
mutateOperations.add(
MutateOperation.newBuilder()
.setAssetGroupAssetOperation(assetGroupAssetOperation)
.build());
}
for (String resourceName : descriptionheadLinesResponse) {
AssetGroupAsset assetGroupAsset =
AssetGroupAsset.newBuilder()
.setFieldType(AssetFieldTypeEnum.AssetFieldType.DESCRIPTION)
.setAsset(resourceName)
.setResourceName("customers/2966251517/assetGroupAssets/-1")
.build();
AssetGroupAssetOperation assetGroupAssetOperation =
AssetGroupAssetOperation.newBuilder().setCreate(assetGroupAsset).build();
mutateOperations.add(
MutateOperation.newBuilder()
.setAssetGroupAssetOperation(assetGroupAssetOperation)
.build());
}
for (String resourceName : LongheadLinesResponse) {
AssetGroupAsset assetGroupAsset =
AssetGroupAsset.newBuilder()
.setFieldType(AssetFieldTypeEnum.AssetFieldType.LONG_HEADLINE)
.setAsset(resourceName)
.setResourceName("customers/2966251517/assetGroupAssets/-1")
.build();
AssetGroupAssetOperation assetGroupAssetOperation =
AssetGroupAssetOperation.newBuilder().setCreate(assetGroupAsset).build();
mutateOperations.add(
MutateOperation.newBuilder()
.setAssetGroupAssetOperation(assetGroupAssetOperation)
.build());
}
for (String resourceName : businessReponse) {
AssetGroupAsset assetGroupAsset =
AssetGroupAsset.newBuilder()
.setFieldType(AssetFieldTypeEnum.AssetFieldType.BUSINESS_NAME)
.setAsset(resourceName)
.setResourceName("customers/2966251517/assetGroupAssets/-1")
.build();
AssetGroupAssetOperation assetGroupAssetOperation =
AssetGroupAssetOperation.newBuilder().setCreate(assetGroupAsset).build();
mutateOperations.add(
MutateOperation.newBuilder()
.setAssetGroupAssetOperation(assetGroupAssetOperation)
.build());
}
for (String resourceName : marketingimage) {
AssetGroupAsset assetGroupAsset =
AssetGroupAsset.newBuilder()
.setFieldType(AssetFieldTypeEnum.AssetFieldType.MARKETING_IMAGE)
.setAsset(resourceName)
.setResourceName("customers/2966251517/assetGroupAssets/-1")
.build();
AssetGroupAssetOperation assetGroupAssetOperation =
AssetGroupAssetOperation.newBuilder().setCreate(assetGroupAsset).build();
mutateOperations.add(
MutateOperation.newBuilder()
.setAssetGroupAssetOperation(assetGroupAssetOperation)
.build());
}
for (String resourceName : squareMarketing) {
AssetGroupAsset assetGroupAsset =
AssetGroupAsset.newBuilder()
.setFieldType(AssetFieldTypeEnum.AssetFieldType.SQUARE_MARKETING_IMAGE)
.setAsset(resourceName)
.setResourceName("customers/2966251517/assetGroupAssets/-1")
.build();
AssetGroupAssetOperation assetGroupAssetOperation =
AssetGroupAssetOperation.newBuilder().setCreate(assetGroupAsset).build();
mutateOperations.add(
MutateOperation.newBuilder()
.setAssetGroupAssetOperation(assetGroupAssetOperation)
.build());
}
for (String resourceName : logo) {
String resourceName = 
ResourceNames.campaign(Long.parseLong(saInfo.getAccountId()), 
20803713825L);
assetGroup = AssetGroup.newBuilder()
.setName("test_group")
.setCampaign(resourceName)
.setFinalUrls(0,("http://www.example.com;))
.setFinalMobileUrls(0,("http://www.example.com;))
.build();
AssetGroupOperation assetGroupAssetOperation =
AssetGroupOperation.newBuilder().setCreate(assetGroup).build();
getCampaignSharedSetService().mutate((assetGroupAssetOperation), saInfo
.getAccountId());

Thanks
Tanish

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving 

Listing groups creation in PMAX campaigns

2023-11-23 Thread Tanish Gupta
Hi

I need to know wheter i can create listing groups through this example or I 
need another method of implementation
https://developers.google.com/google-ads/api/docs/shopping-ads/create-listing-groups

Thanks
Tanish

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/6cf376b3-3e6b-4bb7-ad4d-988d8470433en%40googlegroups.com.


Product Link Error

2023-11-02 Thread Tanish Gupta
Hi 

Can you please look when i am linking the merchant center account to 
adwords account then i am getting the following error:
com.google.ads.googleads.v15.errors.GoogleAdsException: errors {
  error_code {
field_error: REQUIRED
  }
  message: "The required field was not present."
  location {
  }
}
request_id: "SepTt0b-e-akbtnMX6g4uA"

My code for reference 
try (ProductLinkServiceClient service = 
remote.getLatestVersion().createProductLinkServiceClient()) 
{
ProductLink productLink = ProductLink.newBuilder().setResourceName(
ResourceNames.productLink(Long.parseLong(customerId), merchantAccountId
)).build();
CreateProductLinkResponse response = service.createProductLink(customerId, 
productLink);
return null;
}

Thanks
Tanish

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Google Ads API and AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/c48fe3c9-246d-4e98-8146-f5a317bdcee3n%40googlegroups.com.