Thanks for the link to the "Automatic steps" document. The steps described 
there did not solve the problem, which seems to specifically stem from the 
setting for "Low" being the integer 0. However, I just figured out a way to 
make it work -- namely, instead of using the *client.copy_from() *function 
that I used in the code I shared previously, I manually set the "paths" for 
the mutate request with a Python dictionary object specifying the fields in 
question, so that it wouldn't ignore the new value set for 
"campaign_priority". This is what the modified, successful mutate looks 
like (updated part is highlighted):

*campaign_service = client.get_service("CampaignService")*
*campaign_operation = client.get_type("CampaignOperation")*
*campaign = campaign_operation.update*
*campaign.resource_name = campaign_service.campaign_path(*
*    googleAdsId, campaignId*
*)*
*campaign.shopping_setting.campaign_priority = 0*
*campaign_operation.update_mask = {*
*    'paths': ['resource_name', 'shopping_setting.campaign_priority']*
*}*
*response = campaign_service.mutate_campaigns(*
*    customer_id=googleAdsId,*
*    operations=[campaign_operation]*
*)*

On Monday, July 22, 2024 at 1:05:14 AM UTC-4 Google Ads API Forum Advisor 
wrote:

> Hi,
>
> Thank you for reaching out to the Google Ads API support team.
>
> I would suggest you refer to the document Automatic steps 
> <https://developers.google.com/google-ads/shopping/full-automation/articles/t22#automatic_steps>
>  to 
> get more information on how to set campaign priority with the Google Ads 
> API. 
>
> If you are still facing the issues, please share the complete API logs (
> request 
> <https://developers.google.com/google-ads/api/docs/concepts/field-service#request>
> , response 
> <https://developers.google.com/google-ads/api/docs/concepts/field-service#response>
> , request-id 
> <https://developers.google.com/google-ads/api/docs/concepts/call-structure#request-id>
>  and request header 
> <https://developers.google.com/google-ads/api/docs/concepts/call-structure#request_headers>)
>  
> generated on your device with us. 
>
> 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 guide Python 
> <https://developers.google.com/google-ads/api/docs/client-libs/python/logging>
>  to 
> enable logging at your end. You can enable logging via the curl command by 
> using the -i flag for REST interface requests.
>
> You can send the details via *Reply privately to the author option*, or 
> *direct 
> private reply* to this email.
>   
> This message is in relation to case 
> "ref:!00D1U01174p.!5004Q02vDrFV:ref" (ADR-00253691)
>
> 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/cdb49524-bd95-4525-8a08-2fcb16e678d4n%40googlegroups.com.
  • Ca... mha...@simplepart.com
    • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
      • ... mha...@simplepart.com

Reply via email to