Permission error creating PMax campaigns using BatchJobs

132 views
Skip to first unread message

Miquel Isern Roca

unread,
May 16, 2022, 10:01:20 AM5/16/22
to Google Ads API and AdWords API Forum
Hello Google,

We are facing an error when trying to create a PMax campaign through BatchJobs. We consistently get an error saying 'A mutate action is not allowed on this resource, from this client.' with the code: 'MUTATE_ACTION_NOT_PERMITTED_FOR_CLIENT'.

We have checked and are able to create such campaigns via a MutateRequest, but when doing so with a MutateOperation inside a BatchJob the operation fails. The operations we send are to create exactly the same type of Campaign with the same settings. See the examples of the operations.

The operation for the MutateRequest:
```
create {
  status: PAUSED
  advertising_channel_type: PERFORMANCE_MAX
  bidding_strategy_type: MAXIMIZE_CONVERSION_VALUE
  maximize_conversion_value {
    target_roas: 3.5
  }
  shopping_setting {
    merchant_id: XXXXXXX
    sales_country: "XX"
  }
  name: "automated_test_campaign_0_474d67eb-d35d-4bd4-8516-521e38483285"
  campaign_budget: "customers/XXXXXXX/campaignBudgets/XXXXXXX"
  url_expansion_opt_out: false
}
```

The operation inside the BatchJob:
```
campaign_operation {
  create {
    resource_name: "customers/XXXXXXX/campaigns/-57"
    status: PAUSED
    advertising_channel_type: PERFORMANCE_MAX
    bidding_strategy_type: MAXIMIZE_CONVERSION_VALUE
    maximize_conversion_value {
      target_roas: 0.5
    }
    shopping_setting {
      merchant_id: XXXXXXX
      sales_country: "XX"
    }
    name: "Test - Mutate Campaign ops - 57"
    campaign_budget: "customers/XXXXXXX/campaignBudgets/XXXXXXX"
    url_expansion_opt_out: false
  }
}
```

I have logs I can send privately of the BatchJob with the operation to create the Campaign failed.

Thanks,

Miquel Isern Roca

Ciel Eijssen

unread,
May 19, 2022, 3:23:32 AM5/19/22
to Google Ads API and AdWords API Forum
Hi,

I'd like to add to this that batch jobs containing AssetGroup operations do not finish for our test MCC account. So I am not sure if you are able to process these batch jobs, or if something needs to be enabled for our account? The same operations do succeed if I use the MutateRequest.

The operations are as follows:

asset_group_operation {
  create {
    resource_name: "customers/<redacted>/assetGroups/-1"
    campaign: "customers/<redacted>/campaigns/17306801024"
    name: "d26e8877-1a49-40da-9e98-6f8fcae2cf80"
    status: ENABLED
  }
}

asset_group_operation {
  create {
    resource_name: "customers/<redacted>/assetGroups/-2"
    campaign: "customers/<redacted>/campaigns/17295242067"
    name: "6b97b83c-1c71-4d5a-8d8b-e0b785e0eb70"
    status: ENABLED
  }
}

We would like to continue the development for Performance Max campaigns and - as an integrator - we rely heavily on batch jobs. Without it, we are uncertain whether we can make the deadline before the auto-migration of Smart Shopping Campaigns.

Hope you can help.

Best,
Ciel

Andrew Towe

unread,
May 27, 2022, 6:05:27 PM5/27/22
to Google Ads API and AdWords API Forum
Hello, 
We are also having issues with creating Performance Max Campaigns. The funny thing that we are experiencing is not the shopping setting problems, but instead having problems with the batch job. We can run the exact same operations with:
try ( GoogleAdsServiceClient googleAdsServiceClient = googleAdsClient.getLatestVersion().createGoogleAdsServiceClient() )
        {
            MutateGoogleAdsResponse response = googleAdsServiceClient.mutate(Long.toString(customerId), mutateOperations)
        }
and get a different result then when we use 
try ( BatchJobServiceClient batch_job_service_client = client.getSimpleGoogleAdsClient().getLatestVersion().createBatchJobServiceClient() )
        {
            batch_job_resource_name = createBatchJob(batch_job_service_client, client.getSimpleGoogleCustomerID());
            addAllBatchJobOperations(batch_job_service_client, client.getSimpleGoogleCustomerID(), batch_job_resource_name);
            OperationFuture<Empty, BatchJobMetadata> operation_future = batch_job_service_client.runBatchJobAsync(batch_job_resource_name);


Can someone advise me as to why the runBatchJobAsync would have a different result then just the mutation?

Google Ads API Forum Advisor

unread,
May 31, 2022, 1:52:07 AM5/31/22
to andrewwi...@gmail.com, adwor...@googlegroups.com
Hi Andrew,

Thank you for raising your concern to my team.

So that I can investigate the issue, could you provide the complete request and response logs with request ID and request header generated on your end for the successful and unsuccessful API transactions?

You can provide it via Reply privately to author option. If this option is not available, then send it instead on this email address googleadsa...@google.com.

Regards,
Google Logo
Ernie John
Google Ads API Team
 


ref:_00D1U1174p._5004Q2bERBr:ref
Reply all
Reply to author
Forward
0 new messages