Batch Job - Customizer Feed Item - NullError.NULL_CONTENT

113 views
Skip to first unread message

Calin Ignat

unread,
Aug 9, 2017, 8:19:53 AM8/9/17
to AdWords API Forum
Greetings,

When trying to create feed items trough batch job, i'm returned with the operation failed, supposedly because the AdGroupID is NULL.

<errorList>
<errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="NullError"> <fieldPath>operations[32].operand.adGroupTargeting.adGroupId</fieldPath> <fieldPathElements> <field>operations</field> <index>32</index> </fieldPathElements> <fieldPathElements> <field>operand</field> </fieldPathElements> <fieldPathElements> <field>adGroupTargeting</field> </fieldPathElements> <fieldPathElements> <field>adGroupId</field> </fieldPathElements> <trigger /> <errorString>NullError.NULL_CONTENT</errorString> <ApiError.Type>NullError</ApiError.Type> <reason>NULL_CONTENT</reason> </errors> 
</errorList>

The operation that is sent to the api has an AdGroupID, its a temporary one:

  object(Google\AdsApi\AdWords\v201705\cm\FeedItemOperation)[423]
      protected 'operand' => 
        object(Google\AdsApi\AdWords\v201705\cm\FeedItem)[421]
          protected 'feedId' => int 57793071
          protected 'feedItemId' => null
          protected 'status' => null
          protected 'startTime' => null
          protected 'endTime' => null
          protected 'attributeValues' => 
            array (size=3)
              0 => 
                object(Google\AdsApi\AdWords\v201705\cm\FeedItemAttributeValue)[319]
                  protected 'feedAttributeId' => int 1
                  protected 'integerValue' => null
                  protected 'doubleValue' => null
                  protected 'booleanValue' => null
                  protected 'stringValue' => string 'NYC-ROM' (length=7)
                  protected 'integerValues' => null
                  protected 'doubleValues' => null
                  protected 'booleanValues' => null
                  protected 'stringValues' => null
                  protected 'moneyWithCurrencyValue' => null
              1 => 
                object(Google\AdsApi\AdWords\v201705\cm\FeedItemAttributeValue)[390]
                  protected 'feedAttributeId' => int 2
                  protected 'integerValue' => null
                  protected 'doubleValue' => null
                  protected 'booleanValue' => null
                  protected 'stringValue' => int 1
                  protected 'integerValues' => null
                  protected 'doubleValues' => null
                  protected 'booleanValues' => null
                  protected 'stringValues' => null
                  protected 'moneyWithCurrencyValue' => null
              2 => 
                object(Google\AdsApi\AdWords\v201705\cm\FeedItemAttributeValue)[420]
                  protected 'feedAttributeId' => int 3
                  protected 'integerValue' => null
                  protected 'doubleValue' => null
                  protected 'booleanValue' => null
                  protected 'stringValue' => string '08-09-2017' (length=10)
                  protected 'integerValues' => null
                  protected 'doubleValues' => null
                  protected 'booleanValues' => null
                  protected 'stringValues' => null
                  protected 'moneyWithCurrencyValue' => null
          protected 'policyData' => null
          protected 'devicePreference' => null
          protected 'scheduling' => null
          protected 'campaignTargeting' => null
          protected 'adGroupTargeting' => 
            object(Google\AdsApi\AdWords\v201705\cm\FeedItemAdGroupTargeting)[422]
              protected 'TargetingAdGroupId' => int -3
          protected 'keywordTargeting' => null
          protected 'geoTargeting' => null
          protected 'geoTargetingRestriction' => null
          protected 'urlCustomParameters' => null
      protected 'operator' => string 'ADD' (length=3)
      protected 'OperationType' => null
      private 'parameterMap' (Google\AdsApi\AdWords\v201705\cm\Operation) => 
        array (size=1)
          'Operation.Type' => string 'OperationType' (length=13)

The adGroup referred is created in the same batch but way ahead, there are other operations that use the same temporary id to add to the AdGroup keywords, negatives, ads, even the ad that would use the customizer feed, everything works just fine. The feed itself is created before/outside the batch.

As explained here, the BatchJob supports FeedItemOperations. On the old library I had a similar process that worked well.
Obviously I am doing something wrong this time...

I have attached the SOAP logs too.

Thank you.
Good day!


bjutil.log
soap.log

Calin Ignat

unread,
Aug 10, 2017, 6:28:22 AM8/10/17
to AdWords API Forum
Good day.

As an update, i've tried making another batch job for the feed items after everything is done, i've used the real id of the adGroup but i am getting the same error.
I still haven't figured out what's wrong.

Thank you, 
Good day.

array (size=1)
 
0 =>
   
object(Google\AdsApi\AdWords\v201705\cm\FeedItemOperation)[796]
     
protected 'operand' =>
       
object(Google\AdsApi\AdWords\v201705\cm\FeedItem)[746]
         
protected 'feedId' => int 57843974

         
protected 'feedItemId' => null
         
protected 'status' => null
         
protected 'startTime' => null
         
protected 'endTime' => null
         
protected 'attributeValues' =>
           
array (size=3)
             
0 =>
 
               
object(Google\AdsApi\AdWords\v201705\cm\FeedItemAttributeValue)[784]

                 
protected 'feedAttributeId' => int 1
                 
protected 'integerValue' => null
                 
protected 'doubleValue' => null
                 
protected 'booleanValue' => null

                 
protected 'stringValue' => string 'US_NYC_NY_US_to_ROM_Italy' (length=25)

                 
protected 'integerValues' => null
                 
protected 'doubleValues' => null
                 
protected 'booleanValues' => null
                 
protected 'stringValues' => null
                 
protected 'moneyWithCurrencyValue' => null
             
1 =>
 
               
object(Google\AdsApi\AdWords\v201705\cm\FeedItemAttributeValue)[803]

                 
protected 'feedAttributeId' => int 2
                 
protected 'integerValue' => null
                 
protected 'doubleValue' => null
                 
protected 'booleanValue' => null
                 
protected 'stringValue' => int 1
                 
protected 'integerValues' => null
                 
protected 'doubleValues' => null
                 
protected 'booleanValues' => null
                 
protected 'stringValues' => null
                 
protected 'moneyWithCurrencyValue' => null
             
2 =>
 
               
object(Google\AdsApi\AdWords\v201705\cm\FeedItemAttributeValue)[800]

                 
protected 'feedAttributeId' => int 3
                 
protected 'integerValue' => null
                 
protected 'doubleValue' => null
                 
protected 'booleanValue' => null

                 
protected 'stringValue' => string '08-10-2017' (length=10)

                 
protected 'integerValues' => null
                 
protected 'doubleValues' => null
                 
protected 'booleanValues' => null
                 
protected 'stringValues' => null
                 
protected 'moneyWithCurrencyValue' => null
         
protected 'policyData' => null
         
protected 'devicePreference' => null
         
protected 'scheduling' => null
         
protected 'campaignTargeting' => null
         
protected 'adGroupTargeting' =>
 
           
object(Google\AdsApi\AdWords\v201705\cm\FeedItemAdGroupTargeting)[807]
             
protected 'TargetingAdGroupId' => int 44656141185

         
protected 'keywordTargeting' => null
         
protected 'geoTargeting' => null
         
protected 'geoTargetingRestriction' => null
         
protected 'urlCustomParameters' => null
     
protected 'operator' => string 'ADD' (length=3)
     
protected 'OperationType' => null
     
private 'parameterMap' (Google\AdsApi\AdWords\v201705\cm\Operation) =>
       
array (size=1)
         
'Operation.Type' => string 'OperationType' (length=13)


<?xml version="1.0" encoding="UTF-8"?>
<mutateResponse xmlns="https://adwords.google.com/api/adwords/cm/v201705">
   
<rval>

     
<errorList>
         
<errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="NullError">

           
<fieldPath>operations[0].operand.adGroupTargeting.adGroupId</fieldPath>
           
<fieldPathElements>
               
<field>operations</field>
               
<index>0</index>

           
</fieldPathElements>
           
<fieldPathElements>
               
<field>operand</field>
           
</fieldPathElements>
           
<fieldPathElements>
               
<field>adGroupTargeting</field>
           
</fieldPathElements>
           
<fieldPathElements>
               
<field>adGroupId</field>
           
</fieldPathElements>
           
<trigger />
           
<errorString>NullError.NULL_CONTENT</errorString>
           
<ApiError.Type>NullError</ApiError.Type>
           
<reason>NULL_CONTENT</reason>
         
</errors>
     
</errorList>

     
<index>0</index>
   
</rval>
</mutateResponse>



Nadine Sundquist (AdWords API Team)

unread,
Aug 10, 2017, 12:37:26 PM8/10/17
to AdWords API Forum
Hello Calin,

I think I've solved the mystery here. I took a look at your account, and your ad group ID that you're specifying is in a campaign that was removed. That means that the ad group is no longer viable because the campaign is in the removed state. At least that's the case for the second message that you sent. As for the first case, please make sure that the new ad group you're creating is in an enabled or paused campaign rather than a removed one. That could possibly be causing the issue since that appeared to be the problem in the second case.

Best,
Nadine, AdWords API Team

Calin Ignat

unread,
Aug 11, 2017, 2:28:15 AM8/11/17
to AdWords API Forum
Greetings Nadine,
Thank you for your reply.

The campaign is removed now, but at the time of the call it was not, it was actually made in a single process with one mutate job (for the feed) and two batch jobs (one for campaign, adGroups, ads, keywords and when that one was completed I made another one for the feed items matching them with the real adGroups ids) as i thought that would solve the problem. The reason why the campaign is removed now is because I made many tests, all with the same input data, creating the same campaign over and over again.

The account these tests we're made is a test account but meanwhile i made a couple of test on our live main account, with a bigger set of data, unfortunately had the same results... Everything works great except for adding the customizer feed items...

I have even rewritten my code dealing with the feed items operation, just to be sure, its not too alienated from the code example here.

I've already worked/dealt with feeds and feed items, in a previous version of my tool, but on the old library. I had no problems then. I also checked and rechecked everything, compared code and modified the operations, to no avail.

Thank you,
Good Day!

Calin Ignat

unread,
Aug 11, 2017, 3:21:45 AM8/11/17
to AdWords API Forum
As a quick follow up,

I've made 2 more test campaigns and I will not delete them, I've attached the soap, batch logs and xml results from the batch jobs for both of them.
case1 - campaign all made in one batch job, feed items use temporary adGroup id
case2 - separated batch jobs, for the whole campaign and then another one for the feed items associated to the real adGroups ID.

Good day.
case1.zip
case2.zip

Nadine Sundquist (AdWords API Team)

unread,
Aug 11, 2017, 4:54:23 AM8/11/17
to AdWords API Forum
Hello Calin,

Thanks for providing all those logs. I've filed an issue so we can take a look into this. At this point, I'm not sure what's happening. I'll get back to you when we've made more progress in figuring this out.

Best,
Nadine, AdWords API Team

Calin Ignat

unread,
Aug 21, 2017, 2:21:10 AM8/21/17
to AdWords API Forum
Good day,

Any update on this?
I still haven't figure it out.

Thank you.

Nadine Sundquist (AdWords API Team)

unread,
Aug 21, 2017, 3:08:18 AM8/21/17
to AdWords API Forum
Hello Calin,

When you say that you're using an old library versus a new one, are you talking about the client libraries that we release? I just want to make sure we're working from the same baseline. 

Thanks,
Nadine, AdWords API Team

Calin Ignat

unread,
Aug 21, 2017, 3:41:20 AM8/21/17
to AdWords API Forum
Hello Nadine,

Yes, when i was talking about the old library I was referring at the old now depreciated client libraries.
My only point was that i was using that successfully adding feed items to a feed using batch job.
 
We've recently updated to v201705 and I had rewritten all the code from scratch for the tool that creates these campaigns.
The actual code to add feed items its not very different from the example here. The only difference is that instead of using mutate service i'm using the operation for the batch job. All the other elements from the campaign are working fine this way...

Thank you,
Good day.

Nadine Sundquist (AdWords API Team)

unread,
Aug 21, 2017, 7:33:15 PM8/21/17
to AdWords API Forum
Hi Calin,

Thanks for responding so quickly! If you're creating the same operations and passing them into the mutate service rather than the batch job service, is that still working for you for v201705? I'm just trying to pinpoint if this is a batch job service only issue.

Thanks,
Nadine, AdWords API Team

Calin Ignat

unread,
Aug 22, 2017, 2:10:49 AM8/22/17
to AdWords API Forum
Hello Nadine,

Yes, for now thats how i'm making campaigns, using the mutate service for the feed items. That works fine, but i'm not sure how it will work for large amounts of operations in big campaigns. Also it takes a bit more time as first i need to make the campaign with the batch job, then get all the adGroups created and match them with the feed items info, then create the feed items trough mutate job using the id of the adGroup. But yes, that gets the job done...
Today I will update the client library, I will let you know if anything changes.

Thank you,
Have a good day.

Calin Ignat

unread,
Aug 22, 2017, 3:20:48 AM8/22/17
to AdWords API Forum
Running now on v201708 of Release 28.1.0. There is no change, I get the same errors when trying to add feed items trough the batch job. 

Nadine Sundquist (AdWords API Team)

unread,
Aug 22, 2017, 7:38:28 PM8/22/17
to AdWords API Forum
Hello Calin,

Thanks for giving that a try. That helps me narrow it down a bit as to where in the code something could be going wrong. If I need anything further, I'll reach out. 

Regards,
Nadine, AdWords API Team

Nadine Sundquist (AdWords API Team)

unread,
Aug 29, 2017, 10:42:02 AM8/29/17
to AdWords API Forum
Hi Calin,

It looks like the XML being sent to the BatchJobService isn't quite right. There appears to be a capitalization issue. It should be <TargetingAdGroupId> rather than <targetingAdGroupId>. I've sent this over to our PHP client library owner to see if something there needs to be changed.

Best,
Nadine, AdWords API Team

Calin Ignat

unread,
Aug 30, 2017, 3:53:54 AM8/30/17
to AdWords API Forum
Hello,

Good news! I'm guessing the issues is here and will be easy to fix in future versions. Until then I will continue to use mutate service to build feed items.
Thank you very much for your assistance.

Good day.

Nadine Sundquist (AdWords API Team)

unread,
Aug 30, 2017, 9:07:49 AM8/30/17
to AdWords API Forum
Greetings Calin,

I got in touch with the owner of the PHP library on my team. He's working on figuring out a solution. Please keep an eye on GitHub repo for a fix. I don't have an exact time as to when that will happen, but I'll keep an eye on it to try to inform you when ti is available.

Take care,
Nadine, AdWords API Team
Reply all
Reply to author
Forward
0 new messages