RE: Add an OfferID to an existing partition

2019-05-13 Thread googleadsapi-forumadvisor via AdWords API and Google Ads API Forum


Hello,

I am Ejay's colleague responding on this thread as he is not available.
Below is the response from Ejay.




*"With regard to your question on how to product partition, you may refer
to the AddProductPartitionTree

code example for PHP. The diagram shown here

is a sample which shows how to use product groups in your campaigns.With
regard to your question about filtering the ParentCriterionId with null
value, I am afraid that this is currently not possible to
AdGroupCriterionService
."*
Please let me know if you have any further questions.

Regards,
Sai Teja, Google Ads API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
https://ads-developers.googleblog.com/search/label/google_ads_api
https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

On 05/11/19 16:13:32 adcenterinar...@gmail.com wrote:

Hi,
 not sure it's the same question. What is the private thread?

thank you

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/ac5fed54-e748-49d4-b7ed-d90fd084ed63%40googlegroups.com

.
For more options, visit https://groups.google.com/d/optout.

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 "AdWords API and Google Ads API Forum" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/1a0j54g185hb1c000tm25cw6cmj4d1h60o30c1g68qjie9g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Add an OfferID to an existing partition

2019-05-11 Thread TommyTek
Hi,
 not sure it's the same question. What is the private thread?

thank you

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/ac5fed54-e748-49d4-b7ed-d90fd084ed63%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: Add an OfferID to an existing partition

2019-05-10 Thread googleadsapi-forumadvisor via AdWords API and Google Ads API Forum


Hi Tommy,

Thank you for your reply.

It seems that your latest question is the same with the one you've sent in
your private reply. Please check my answer to this question on the private
thread.

Regards,
Ejay
Google Ads API Team

=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
https://ads-developers.googleblog.com/search/label/google_ads_api
https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

On 05/09/19 21:07:38 adcenterinar...@gmail.com wrote:

Hi,
is there a way to filter criterions in order to pickup only the one
with ParentCriterionId = NULL?

// Create predicates.
$selector->setPredicates([
new Predicate('AdGroupId', 'EQUALS', array($adGroupId)),// <==
ok
new Predicate('CriterionUse', 'EQUALS', array('BIDDABLE')), //
<== ok
new Predicate('PartitionType', 'EQUALS', array('SUBDIVISION')),
// <== NOT ok
]);

The statement above doesn't work because I get:

[SelectorError.INVALID_PREDICATE_FIELD_NAME @ ; trigger:'PartitionType']

Where can I find the list of fields I can use in Predicate?
By reading
https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupCriterionService.Predicate
I should see somewhere that selector fields are filterable or not. Perhaps
only these fields
https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupCriterionService.AdGroupCriterion
can be filterable?

When fetching Criterions is it guaranteed that the first returned result is
the root? so I can stop at the first and request only 1 record.

Thank you,
Tom

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/c746d37b-758f-49b9-aada-1d2806d88f74%40googlegroups.com

.
For more options, visit https://groups.google.com/d/optout.

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 "AdWords API and Google Ads API Forum" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/ijlio1685o01895j5p4jl0y6cmj4d1h60o30c1g68qjie9g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Add an OfferID to an existing partition

2019-05-09 Thread TommyTek
Hi,
is there a way to filter criterions in order to pickup only the one 
with ParentCriterionId = NULL?

// Create predicates.
$selector->setPredicates([
new Predicate('AdGroupId', 'EQUALS', array($adGroupId)),// <== 
ok
new Predicate('CriterionUse', 'EQUALS', array('BIDDABLE')), // 
<== ok
new Predicate('PartitionType', 'EQUALS', array('SUBDIVISION')),  
// <== NOT ok
]);

The statement above doesn't work because I get:

[SelectorError.INVALID_PREDICATE_FIELD_NAME @ ; trigger:'PartitionType']

Where can I find the list of fields I can use in Predicate? 
By reading 
https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupCriterionService.Predicate
 
I should see somewhere that selector fields are filterable or not. Perhaps 
only these fields 
https://developers.google.com/adwords/api/docs/reference/v201809/AdGroupCriterionService.AdGroupCriterion
 
can be filterable? 

When fetching Criterions is it guaranteed that the first returned result is 
the root? so I can stop at the first and request only 1 record.

Thank you,
Tom

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/c746d37b-758f-49b9-aada-1d2806d88f74%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: Add an OfferID to an existing partition

2019-05-09 Thread googleadsapi-forumadvisor via AdWords API and Google Ads API Forum


Hi,

I'm afraid that there is no readily available code for this field. You may
try to implement the field that I previously provided and you may return
back if you encountered any issues/errors.

Regards,
Ejay
Google Ads API Team

=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
https://ads-developers.googleblog.com/search/label/google_ads_api
https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

On 05/09/19 15:43:12 adcenterinar...@gmail.com wrote:

Hi Ejay,
  thank you for your help.

Something is still cloudy in my mind with product partitions :/
Would it be possible for you to provide the PHP code to get such info
starting from the adgroup ID?

Later I'll have to discover how to delete a ProductOfferId too from the
partition, I hope to have less troubles

Thank you very much :)

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/2da7580a-56d8-4f5d-a9e2-25841f488a0e%40googlegroups.com

.
For more options, visit https://groups.google.com/d/optout.

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 "AdWords API and Google Ads API Forum" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/ijlio4vjl0010pp2ng0004h7p6y6cmj4d1h60o30c1g68qjie9g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Add an OfferID to an existing partition

2019-05-09 Thread TommyTek
Hi Ejay,
  thank you for your help.

Something is still cloudy in my mind with product partitions :/ 
Would it be possible for you to provide the PHP code to get such info 
starting from the adgroup ID?

Later I'll have to discover how to delete a ProductOfferId too from the 
partition, I hope to have less troubles

Thank you very much :)

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/2da7580a-56d8-4f5d-a9e2-25841f488a0e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


RE: Add an OfferID to an existing partition

2019-05-09 Thread googleadsapi-forumadvisor via AdWords API and Google Ads API Forum


Hi Tommy,

Thanks for reaching out.

With regard to your question, you may use the get()

method of AdGroupCriterionService
  
to

retrieve the parentCriterionId
  
(which

is the ID of the parent product partition subdivision). You can now use the
returned ID of the parent product partition to add ProductOfferId

.

Please let me know if you have further questions/clarifications.

Regards,
Ejay
Google Ads API Team

=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
https://ads-developers.googleblog.com/search/label/google_ads_api
https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

On 05/09/19 04:59:38 adcenterinar...@gmail.com wrote:

Hello,
  I've created a product partition with 2 offers this way (it works):

// create subdivision
$operations = [];
$root = ProductPartitions::createSubdivision();
$criterion =
ProductPartitions::asBiddableAdGroupCriterion($adGroup->getId(), $root);
$operation = ProductPartitions::createAddOperation($criterion);
$operations[] = $operation;

$ean = new ProductOfferId();
$ean->setValue('01');
$eanUnit = ProductPartitions::createUnit($root, $ean);
$criterion = ProductPartitions::asBiddableAdGroupCriterion(
$adGroup->getId(),
$eanUnit,
10*1
);
$operation = ProductPartitions::createAddOperation($criterion);
$operations[] = $operation;

$ean = new ProductOfferId();
$ean->setValue('02');
$eanUnit = ProductPartitions::createUnit($root, $ean);
$criterion = ProductPartitions::asBiddableAdGroupCriterion(
$adGroup->getId(),
$eanUnit,
11*1
);
$operation = ProductPartitions::createAddOperation($criterion);
$operations[] = $operation;


// Other
$ean = new ProductOfferId();
$eanUnit = ProductPartitions::createUnit($root, $ean);
$criterion = ProductPartitions::asNegativeAdGroupCriterion(
$adGroup->getId(),
$eanUnit
);
$operation = ProductPartitions::createAddOperation($criterion);
$operations[] = $operation;


$adGroupCriterionService->mutate($operations);



Now I want to create a function that adds new  ProductOfferId to current
partition, but I don't know how to retrieve the $root element without
creating it again (and without doing a query to read the whole partition).
What is the easiest way to get the root element of a product partition?

Thank you

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/e4dead6c-3125-4169-bc9e-e1be72f62a4e%40googlegroups.com

.
For more options, visit https://groups.google.com/d/optout.

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 "AdWords API and Google Ads API Forum" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web