Issue creating CriterionUserList from AdGroupCriterionService

117 views
Skip to first unread message

Hunter

unread,
Apr 25, 2016, 2:30:02 PM4/25/16
to AdWords API Forum
We recently started seeing one of our Unit tests fail related to creating CriterionUserList objects with the AdGroupCriterionService, we are currently using v201601 of the API and have not made any changes on our side. Have there been any changes to this service?  See below for relevant SOAP request and response. 

SOAP Request:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
  <SOAP-ENV:Header>
    <RequestHeader
      <clientCustomerId
      </clientCustomerId>
      <developerToken
      </developerToken>
      <userAgent
      </userAgent>
      <validateOnly
      </validateOnly>
      <partialFailure
      </partialFailure>
    </RequestHeader>
  </SOAP-ENV:Header>
  <SOAP-ENV:Body>
    <mutate
      <operations>
        <operator>ADD
        </operator>
        <operand
            xsi:type="BiddableAdGroupCriterion">
          <adGroupId>29068739164
          </adGroupId>
          <criterion
              xsi:type="CriterionUserList">
            <userListId>11461606624
            </userListId>
            <userListName>AudienceForSync31461606624
            </userListName>
            <userListMembershipStatus>OPEN
            </userListMembershipStatus>
          </criterion>
          <bidModifier>0.1
          </bidModifier>
        </operand>
      </operations>
      <operations>
        <operator>ADD
        </operator>
        <operand
            xsi:type="BiddableAdGroupCriterion">
          <adGroupId>29068739164
          </adGroupId>
          <criterion
              xsi:type="CriterionUserList">
            <userListId>21461606624
            </userListId>
            <userListName>AudienceForSync41461606624
            </userListName>
            <userListMembershipStatus>OPEN
            </userListMembershipStatus>
          </criterion>
          <bidModifier>10
          </bidModifier>
        </operand>
      </operations>
    </mutate>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

SOAP Response:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope
  <soap:Header>
    <ResponseHeader
      <requestId>00053152cfa7db880ac11896a10d4cab
      </requestId>
      <serviceName>AdGroupCriterionService
      </serviceName>
      <methodName>mutate
      </methodName>
      <operations>2
      </operations>
      <responseTime>74
      </responseTime>
    </ResponseHeader>
  </soap:Header>
  <soap:Body>
    <soap:Fault>
      <faultcode>soap:Server
      </faultcode>
      <faultstring>[EntityNotFound.INVALID_ID @ operations[0].operand.criterion.userListId; trigger:11461606624, EntityNotFound.INVALID_ID @ operations[1].operand.criterion.userListId; trigger:21461606624]
      </faultstring>
      <detail>
        <ApiExceptionFault
          <message>[EntityNotFound.INVALID_ID @ operations[0].operand.criterion.userListId; trigger:11461606624, EntityNotFound.INVALID_ID @ operations[1].operand.criterion.userListId; trigger:21461606624]
          </message>
          <ApplicationException.Type>ApiException
          </ApplicationException.Type>
          <errors
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:type="EntityNotFound">
            <fieldPath>operations[0].operand.criterion.userListId
            </fieldPath>
            <trigger>11461606624
            </trigger>
            <errorString>EntityNotFound.INVALID_ID
            </errorString>
            <ApiError.Type>EntityNotFound
            </ApiError.Type>
            <reason>INVALID_ID
            </reason>
          </errors>
          <errors
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:type="EntityNotFound">
            <fieldPath>operations[1].operand.criterion.userListId
            </fieldPath>
            <trigger>21461606624
            </trigger>
            <errorString>EntityNotFound.INVALID_ID
            </errorString>
            <ApiError.Type>EntityNotFound
            </ApiError.Type>
            <reason>INVALID_ID
            </reason>
          </errors>
        </ApiExceptionFault>
      </detail>
    </soap:Fault>
  </soap:Body>
</soap:Envelope>

The error appears to be related to the CriterionUserList not *already* existing. Since this is an ADD operation I am confused as to why that fails, and why it only started failing recently.

Thanks.
Hunter. 

Josh Radcliff (AdWords API Team)

unread,
Apr 25, 2016, 4:44:30 PM4/25/16
to AdWords API Forum
Hi Hunter,

When constructing your CriterionUserList, the userListId must refer to an existing UserList. You can verify that the userListId specified is a valid ID by checking the results from AdwordsUserListService.get.

Thanks,
Josh, AdWords API Team

Hunter

unread,
Apr 26, 2016, 9:06:20 AM4/26/16
to AdWords API Forum
Hi Josh, 

So this is definitely not a recent change? Our logs indicate this behavior started occurring on 2016-04-20, previously this test had been running for ~7 months without issue. 

Thanks.
Hunter.

Josh Radcliff (AdWords API Team)

unread,
Apr 26, 2016, 9:09:50 AM4/26/16
to AdWords API Forum
Hi Hunter,

I'm not aware of any recent changes in behavior. Could you provide more details on your test set up? One possibility is that the UserList you were using for your tests was deleted on or around 4/20. Do you use an existing UserList in your tests, or recreate one each time the test runs?

Thanks,
Josh, AdWords API Team

Hunter

unread,
Apr 27, 2016, 9:20:09 AM4/27/16
to AdWords API Forum
Hi Josh, 

No we used a different UserList each time, and the Id using for that UserList was based on the current time the test was run i.e. UserList<unix timestamp>. The workflow for this test was as follows :

1. Create a campaign
2. Create an adgroup
3. Create a CriterionUserList object from the Perl client library
4. Create a BiddableAdGroupCriterion object from the Perl client library pointing to the CriterionUserList from (3)
5. Create an AdGroupCriterionOperation object from the Perl client library with an operand of the AdGroupCriterion from (4) and operator of 'ADD'
6. Call the mutate method of the AdGroupCriterionService passing the operation from (5)

Thanks, 
Hunter.

Josh Radcliff (AdWords API Team)

unread,
Apr 27, 2016, 7:45:20 PM4/27/16
to AdWords API Forum
Hi Hunter,

I took a look at your account but can't find any indication that user list ID 11461606624 ever existed, but it's entirely possible I'm just missing something.

Would you happen to have the request ID from the request that created the user list?

Thanks,
Josh, AdWords API Team

Hunter

unread,
Apr 28, 2016, 9:26:17 AM4/28/16
to AdWords API Forum
Hi Josh, 

That is correct, this one has never existed. Previously the mutate call to the AdGroupCriterionService was creating a Criterion for us as well if something did not exist. The behavior we are seeing now is that it doesn't do this. If that was the expected behavior all along then I am happy to rewrite our test. I am just trying to understand what is happening. 

Thanks. 
Hunter. 

Josh Radcliff (AdWords API Team)

unread,
Apr 28, 2016, 12:54:00 PM4/28/16
to AdWords API Forum
Hi Hunter,

I did some digging, and it turns out that one of my colleagues recently identified a validation issue with CriterionUserList and AdGroupCriterionService, in that the latter was not validating that the list specified actually existed.

I haven't found concrete proof yet, but I suspect that there was a change recently to correct this problem, which would explain why your test started failing. I'd recommend either modifying your test to use a different criterion type such as CriterionUserInterest, which lets you specify an ID from a list of predefined IDs. That way, you won't have to add a step to your test to create a UserList.

Thanks,
Josh, AdWords API Team

Hunter

unread,
Apr 28, 2016, 1:00:15 PM4/28/16
to AdWords API Forum
HI Josh, 

Thanks for digging into this, I am happy to rework the test since from what you described it has been wrong all along :) 

Thanks for your time on this. 
Hunter. 
Reply all
Reply to author
Forward
0 new messages