Hi,

Please find my answers inline:

*How can I get the Campaign priority?*

   - Using CampaignService 
   
<https://developers.google.com/adwords/api/docs/reference/v201609/CampaignService>
 to 
   fetch the shopping campaign, add the CampaignField.Settings in the 
   selector. Then similar to GetCampaigns 
   
<https://github.com/googleads/googleads-java-lib/blob/master/examples/adwords_axis/src/main/java/adwords/axis/v201609/basicoperations/GetCampaigns.java>
 example, 
   iterate through the list of campaigns to retrieve the ShoppingSetting of 
   the desired campaign. From the ShoppingSetting object, you can retrieve the 
   campaign priority that was set during the time of campaign creation. The 
   code for the same is as follows:

do {
      // Get all campaigns.
      page = campaignService.get(selector);
      // Display campaigns.
      if (page.getEntries() != null) {
        for (Campaign campaign : page.getEntries()) {
          System.out.printf("Campaign with name '%s' and ID %d was found 
with type %s %s.%n", campaign.getName(),
              campaign.getId(), campaign.getAdvertisingChannelType(), 
campaign.getAdvertisingChannelSubType());
           
if(campaign.getAdvertisingChannelType().toString().equalsIgnoreCase("SHOPPING"))
 
{
           Setting[] setting= campaign.getSettings();
           for(int i=0;i<setting.length;i++){
           System.out.println("Setting Type: "+ 
setting[i].getSettingType());
           if 
(setting[i].getSettingType().toString().equalsIgnoreCase("ShoppingSetting")){
           ShoppingSetting shoppingsetting=(ShoppingSetting) setting[i];
           System.out.println("Campaign Priority: "+
shoppingsetting.getCampaignPriority());
           }
           }
           }
        }
      } else {
        System.out.println("No campaigns were found.");
      }
      offset += PAGE_SIZE;
      selector = builder.increaseOffsetBy(PAGE_SIZE).build();
    } while (offset < page.getTotalNumEntries());


   - You can also optionally use a predicate to filter on the required 
   campaign as follows:

            Predicate predicate = new Predicate();
            predicate.setField("CampaignId");
            predicate.setOperator(PredicateOperator.IN);
            predicate.setValues(new String[]{"123456789"});
            selector.setPredicates(new Predicate[] {predicate});

*How can I get the inventory filter used in the shopping campaign settings? 
I did see there is an option to use ProductScope  
<https://developers.google.com/adwords/api/docs/reference/v201609/CampaignCriterionService.ProductScope>to
 
create the campaign. Is there an option to get the ProductScope of a 
campaign already created? *

   - ProductScope 
   
<https://developers.google.com/adwords/api/docs/reference/v201609/CampaignCriterionService.ProductScope#dimensions>
 field 
   can be selected using the CampaignCriterionService 
   
<https://developers.google.com/adwords/api/docs/reference/v201609/CampaignCriterionService>
 by 
   adding the value "Dimensions" in the selector.


*How can I get the item id of all products that are under an AdGroup?*

   - Shopping Performance Report 
   
<https://developers.google.com/adwords/api/docs/appendix/reports/shopping-performance-report>
 aggregates 
   campaign statistics at the product level. To filter for a particular ad 
   group, please apply a predicate on the AdGroupId 
   
<https://developers.google.com/adwords/api/docs/appendix/reports/shopping-performance-report#adgroupid>
    field. 


Regards,
Vishal, AdWords API Team

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
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/38438066-1626-49de-8a82-389e3da4fa95%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • Campaign priorit... Avkeren Cohen
    • Re: Campaig... 'Vishal Vinayak (Adwords API Team)' via AdWords API Forum
      • Re: Cam... Avkeren Cohen
        • Re:... 'Vishal Vinayak (Adwords API Team)' via AdWords API Forum

Reply via email to