[InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ com.google.ads.api.services.common.error.InternalApiError.<init>(InternalApiErro]

131 views
Skip to first unread message

Bryan Natter

unread,
May 21, 2019, 2:37:24 AM5/21/19
to AdWords API and Google Ads API Forum
 I am trying to create a smart campaign and i am getting an error - [InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ com.google.ads.api.services.common.error.InternalApiError.<init>(InternalApiErro]
Here is the request I am sending:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201809" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <SOAP-ENV:Header>
        <ns1:RequestHeader>
            <ns1:clientCustomerId>{CLIENTCUSTOMERID}</ns1:clientCustomerId>
            <ns1:developerToken>{DEVTOKN}</ns1:developerToken>
            <ns1:userAgent>SandO (AwApi-PHP, googleads-php-lib/40.0.0, PHP/7.1.25-1+ubuntu14.04.1+deb.sury.org+1)</ns1:userAgent>
            <ns1:validateOnly>false</ns1:validateOnly>
            <ns1:partialFailure>false</ns1:partialFailure>
        </ns1:RequestHeader>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body>
        <ns1:mutate>
            <ns1:operations>
                <ns1:operator>ADD</ns1:operator>
                <ns1:operand>
                    <ns1:name>new smart test 1</ns1:name>
                    <ns1:status>ENABLED</ns1:status>
                    <ns1:budget>
                        <ns1:budgetId>1995136005</ns1:budgetId>
                        <ns1:name>GSAPI Budget5ce2e9a846c8c9.09533048</ns1:name>
                        <ns1:amount>
                            <ns1:ComparableValue.Type>Money</ns1:ComparableValue.Type>
                            <ns1:microAmount>10000000</ns1:microAmount>
                        </ns1:amount>
                        <ns1:deliveryMethod>ACCELERATED</ns1:deliveryMethod>
                        <ns1:isExplicitlyShared>false</ns1:isExplicitlyShared>
                        <ns1:status>ENABLED</ns1:status>
                    </ns1:budget>
                    <ns1:settings xsi:type="ns1:ShoppingSetting">
                        <ns1:merchantId>{MERCHANTID}</ns1:merchantId>
                        <ns1:salesCountry>US</ns1:salesCountry>
                        <ns1:campaignPriority>3</ns1:campaignPriority>
                        <ns1:enableLocal>false</ns1:enableLocal>
                    </ns1:settings>
                    <ns1:settings xsi:type="ns1:GeoTargetTypeSetting">
                        <ns1:positiveGeoTargetType>LOCATION_OF_PRESENCE</ns1:positiveGeoTargetType>
                        <ns1:negativeGeoTargetType>DONT_CARE</ns1:negativeGeoTargetType>
                    </ns1:settings>
                    <ns1:advertisingChannelType>SHOPPING_GOAL_OPTIMIZED_ADS</ns1:advertisingChannelType>
                    <ns1:networkSetting>
                        <ns1:targetSearchNetwork>false</ns1:targetSearchNetwork>
                    </ns1:networkSetting>
                    <ns1:biddingStrategyConfiguration>
                        <ns1:biddingStrategyType>MAXIMIZE_CONVERSION_VALUE</ns1:biddingStrategyType>
                        <ns1:biddingScheme xsi:type="ns1:MaximizeConversionValueBiddingScheme"/>
                    </ns1:biddingStrategyConfiguration>
                    <ns1:trackingUrlTemplate/>
                    <ns1:finalUrlSuffix/>
                    <ns1:urlCustomParameters/>
                </ns1:operand>
            </ns1:operations>
        </ns1:mutate>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

I tried waiting 30 secs like the recommended handing tips say to do but i keep getting the same error
What am i sending wrong to cause this error?

Thank you

Bryan Natter

unread,
May 21, 2019, 2:37:30 AM5/21/19
to AdWords API and Google Ads API Forum
I am getting an [InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ com.google.ads.api.services.common.error.InternalApiError.<init>(InternalApiErro] error when trying to create a smart campaign through the api
The request i am sending is:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201809" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Header><ns1:RequestHeader><ns1:clientCustomerId>{CLIENTID}</ns1:clientCustomerId><ns1:developerToken>{DEVTOKEN}</ns1:developerToken><ns1:userAgent>SandO (AwApi-PHP, googleads-php-lib/40.0.0, PHP/7.1.25-1+ubuntu14.04.1+deb.sury.org+1)</ns1:userAgent><ns1:validateOnly>false</ns1:validateOnly><ns1:partialFailure>false</ns1:partialFailure></ns1:RequestHeader></SOAP-ENV:Header><SOAP-ENV:Body><ns1:mutate><ns1:operations><ns1:operator>ADD</ns1:operator><ns1:operand><ns1:name>new smart test 1</ns1:name><ns1:status>ENABLED</ns1:status><ns1:budget><ns1:budgetId>1995136005</ns1:budgetId><ns1:name>GSAPI Budget5ce2e9a846c8c9.09533048</ns1:name><ns1:amount><ns1:ComparableValue.Type>Money</ns1:ComparableValue.Type><ns1:microAmount>10000000</ns1:microAmount></ns1:amount><ns1:deliveryMethod>ACCELERATED</ns1:deliveryMethod><ns1:isExplicitlyShared>false</ns1:isExplicitlyShared><ns1:status>ENABLED</ns1:status></ns1:budget><ns1:settings xsi:type="ns1:ShoppingSetting"><ns1:merchantId>8152595</ns1:merchantId><ns1:salesCountry>US</ns1:salesCountry><ns1:campaignPriority>3</ns1:campaignPriority><ns1:enableLocal>false</ns1:enableLocal></ns1:settings><ns1:settings xsi:type="ns1:GeoTargetTypeSetting"><ns1:positiveGeoTargetType>LOCATION_OF_PRESENCE</ns1:positiveGeoTargetType><ns1:negativeGeoTargetType>DONT_CARE</ns1:negativeGeoTargetType></ns1:settings><ns1:advertisingChannelType>SHOPPING_GOAL_OPTIMIZED_ADS</ns1:advertisingChannelType><ns1:networkSetting><ns1:targetSearchNetwork>false</ns1:targetSearchNetwork></ns1:networkSetting><ns1:biddingStrategyConfiguration><ns1:biddingStrategyType>MAXIMIZE_CONVERSION_VALUE</ns1:biddingStrategyType><ns1:biddingScheme xsi:type="ns1:MaximizeConversionValueBiddingScheme"/></ns1:biddingStrategyConfiguration><ns1:trackingUrlTemplate/><ns1:finalUrlSuffix/><ns1:urlCustomParameters/></ns1:operand></ns1:operations></ns1:mutate></SOAP-ENV:Body></SOAP-ENV:Envelope>

Ive tried waiting 30 secs like the recommended handling tips but i get this error all the time

What am i sending wrong with my request?

Thank you

Google Ads API Forum Advisor Prod

unread,
May 21, 2019, 4:34:27 AM5/21/19
to adwor...@googlegroups.com

Hi Bryan,

Thanks for reaching out and for providing details.

Could you confirm if you are trying to create a smart shopping campaign? If yes, upon checking the provided SOAP request logs, I noticed that the you did not included the advertisingChannelSubType field in your request and set as SHOPPING_GOAL_OPTIMIZED_ADS. With this, you may try to make an API call again and please refer to the link that I provided on how to configure and to create a Smart Shopping campaigns.

Please let me know if you have further questions/clarifications.

Regards,
Ejay
Google Ads API Team



ref:_00D1U1174p._5001UAqDU8:ref

Bryan Natter

unread,
May 23, 2019, 4:13:55 PM5/23/19
to AdWords API and Google Ads API Forum
Ejay

Thank you very much. That was it. I was adding it in advertisingChannelType not the advertisingChannelSubType
I am now able to create a smart campaign and an adgroup for it. Although now i am getting an error creating product partitions for the adgroup.
I now get this error:
[CriterionError.INVALID_PRODUCT_BIDDING_CATEGORY @ operations[6].operand.criterion.caseValue; trigger:'ProductBiddingCategory{type=BIDDING_CATEGORY_L1, canonicalValue=null, value=ProductCategoryId: 0, countryCode=null}', AdGroupCriterionError.PRODUCT_PARTITION_REQUIRES_SAME_DIMENSION_TYPE_AS_SIBLINGS @ operations; trigger:'com.google.ads.api.serviceimpls.campaignmgmt.criterion.adgroupcriterion.ProductPartitionTree$Node@7244d096']

Here is the request being sent:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201809" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <SOAP-ENV:Header>
      <ns1:RequestHeader>
         <ns1:clientCustomerId>{clientCustomerId}</ns1:clientCustomerId>
         <ns1:developerToken>{developerToken}</ns1:developerToken>

         <ns1:userAgent>SandO (AwApi-PHP, googleads-php-lib/40.0.0, PHP/7.1.25-1+ubuntu14.04.1+deb.sury.org+1)</ns1:userAgent>
         <ns1:validateOnly>false</ns1:validateOnly>
         <ns1:partialFailure>false</ns1:partialFailure>
      </ns1:RequestHeader>
   </SOAP-ENV:Header>
   <SOAP-ENV:Body>
      <ns1:mutate>
         <ns1:operations>
            <ns1:operator>ADD</ns1:operator>
            <ns1:operand xsi:type="ns1:BiddableAdGroupCriterion">
               <ns1:adGroupId>77626575824</ns1:adGroupId>
               <ns1:criterion xsi:type="ns1:ProductPartition">
                  <ns1:id>-1</ns1:id>
                  <ns1:partitionType>SUBDIVISION</ns1:partitionType>
               </ns1:criterion>
               <ns1:biddingStrategyConfiguration />
            </ns1:operand>
         </ns1:operations>

         <ns1:operations>
            <ns1:operator>ADD</ns1:operator>
            <ns1:operand xsi:type="ns1:BiddableAdGroupCriterion">
               <ns1:adGroupId>77626575824</ns1:adGroupId>
               <ns1:criterion xsi:type="ns1:ProductPartition">
                  <ns1:partitionType>UNIT</ns1:partitionType>
                  <ns1:parentCriterionId>-1</ns1:parentCriterionId>
                  <ns1:caseValue xsi:type="ns1:ProductCustomAttribute">
                     <ns1:type>CUSTOM_ATTRIBUTE_0</ns1:type>
                     <ns1:value>Green</ns1:value>
                  </ns1:caseValue>
               </ns1:criterion>
               <ns1:biddingStrategyConfiguration />
            </ns1:operand>
         </ns1:operations>

         <ns1:operations>
            <ns1:operator>ADD</ns1:operator>
            <ns1:operand xsi:type="ns1:BiddableAdGroupCriterion">
               <ns1:adGroupId>77626575824</ns1:adGroupId>
               <ns1:criterion xsi:type="ns1:ProductPartition">
                  <ns1:partitionType>UNIT</ns1:partitionType>
                  <ns1:parentCriterionId>-1</ns1:parentCriterionId>
                  <ns1:caseValue xsi:type="ns1:ProductCustomAttribute">
                     <ns1:type>CUSTOM_ATTRIBUTE_1</ns1:type>
                     <ns1:value>Blue</ns1:value>
                  </ns1:caseValue>
               </ns1:criterion>
               <ns1:biddingStrategyConfiguration />
            </ns1:operand>
         </ns1:operations>

         <ns1:operations>
            <ns1:operator>ADD</ns1:operator>
            <ns1:operand xsi:type="ns1:BiddableAdGroupCriterion">
               <ns1:adGroupId>77626575824</ns1:adGroupId>
               <ns1:criterion xsi:type="ns1:ProductPartition">
                  <ns1:partitionType>UNIT</ns1:partitionType>
                  <ns1:parentCriterionId>-1</ns1:parentCriterionId>
                  <ns1:caseValue xsi:type="ns1:ProductCustomAttribute">
                     <ns1:type>CUSTOM_ATTRIBUTE_2</ns1:type>
                     <ns1:value>White</ns1:value>
                  </ns1:caseValue>
               </ns1:criterion>
               <ns1:biddingStrategyConfiguration />
            </ns1:operand>
         </ns1:operations>

         <ns1:operations>
            <ns1:operator>ADD</ns1:operator>
            <ns1:operand xsi:type="ns1:BiddableAdGroupCriterion">
               <ns1:adGroupId>77626575824</ns1:adGroupId>
               <ns1:criterion xsi:type="ns1:ProductPartition">
                  <ns1:partitionType>UNIT</ns1:partitionType>
                  <ns1:parentCriterionId>-1</ns1:parentCriterionId>
                  <ns1:caseValue xsi:type="ns1:ProductCustomAttribute">
                     <ns1:type>CUSTOM_ATTRIBUTE_3</ns1:type>
                     <ns1:value>Black</ns1:value>
                  </ns1:caseValue>
               </ns1:criterion>
               <ns1:biddingStrategyConfiguration />
            </ns1:operand>
         </ns1:operations>

         <ns1:operations>
            <ns1:operator>ADD</ns1:operator>
            <ns1:operand xsi:type="ns1:BiddableAdGroupCriterion">
               <ns1:adGroupId>77626575824</ns1:adGroupId>
               <ns1:criterion xsi:type="ns1:ProductPartition">
                  <ns1:partitionType>UNIT</ns1:partitionType>
                  <ns1:parentCriterionId>-1</ns1:parentCriterionId>
                  <ns1:caseValue xsi:type="ns1:ProductCustomAttribute">
                     <ns1:type>CUSTOM_ATTRIBUTE_4</ns1:type>
                     <ns1:value>Red</ns1:value>
                  </ns1:caseValue>
               </ns1:criterion>
               <ns1:biddingStrategyConfiguration />
            </ns1:operand>
         </ns1:operations>

         <ns1:operations>
            <ns1:operator>ADD</ns1:operator>
            <ns1:operand xsi:type="ns1:BiddableAdGroupCriterion">
               <ns1:adGroupId>77626575824</ns1:adGroupId>
               <ns1:criterion xsi:type="ns1:ProductPartition">
                  <ns1:partitionType>UNIT</ns1:partitionType>
                  <ns1:parentCriterionId>-1</ns1:parentCriterionId>
                  <ns1:caseValue xsi:type="ns1:ProductBiddingCategory">
                     <ns1:type>BIDDING_CATEGORY_L1</ns1:type>
                     <ns1:value>0</ns1:value>
                  </ns1:caseValue>
               </ns1:criterion>
               <ns1:biddingStrategyConfiguration />
            </ns1:operand>
         </ns1:operations>

         <ns1:operations>
            <ns1:operator>ADD</ns1:operator>
            <ns1:operand xsi:type="ns1:BiddableAdGroupCriterion">
               <ns1:adGroupId>77626575824</ns1:adGroupId>
               <ns1:criterion xsi:type="ns1:ProductPartition">
                  <ns1:partitionType>UNIT</ns1:partitionType>
                  <ns1:parentCriterionId>-1</ns1:parentCriterionId>
                  <ns1:caseValue xsi:type="ns1:ProductCanonicalCondition">
                     <ns1:condition>New</ns1:condition>
                  </ns1:caseValue>
               </ns1:criterion>
               <ns1:biddingStrategyConfiguration />
            </ns1:operand>
         </ns1:operations>

         <ns1:operations>
            <ns1:operator>ADD</ns1:operator>
            <ns1:operand xsi:type="ns1:BiddableAdGroupCriterion">
               <ns1:adGroupId>77626575824</ns1:adGroupId>
               <ns1:criterion xsi:type="ns1:ProductPartition">
                  <ns1:partitionType>UNIT</ns1:partitionType>
                  <ns1:parentCriterionId>-1</ns1:parentCriterionId>
                  <ns1:caseValue xsi:type="ns1:ProductBrand">
                     <ns1:value>Nike</ns1:value>
                  </ns1:caseValue>
               </ns1:criterion>
               <ns1:biddingStrategyConfiguration />

            </ns1:operand>
         </ns1:operations>
      </ns1:mutate>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

Since it said AdGroupCriterionError.PRODUCT_PARTITION_REQUIRES_SAME_DIMENSION_TYPE_AS_SIBLINGS i tried using one of the other types being sent but that does work.
Please advise as to what needs to be fixed to attach these partitions to the adgroup

Thank you

Google Ads API Forum Advisor Prod

unread,
May 24, 2019, 3:37:39 PM5/24/19
to sa...@salesandorders.com, adwor...@googlegroups.com
Hello Bryan

I am Ejay's team member working on your concern. The error PRODUCT_PARTITION_REQUIRES_SAME_DIMENSION_TYPE_AS_SIBLINGS occurs when you are not using the same kind of dimesion types for the units in the same subdivision. I see that under the same SUBDIVISION you are trying to include ProductCustomAttribute, ProductBiddingCategory, ProductCanonicalCondition and ProductBrand product dimension types. Also, for every SUBDIVISIOn others case must be included. Please make the changes accordingly and make the API call again. Please let me know if you are facing any other errors.

Regards,
Sai Teja, Google Ads API Team
 

ref:_00D1U1174p._5001UAqDU8:ref

Bryan Natter

unread,
May 28, 2019, 9:54:22 AM5/28/19
to AdWords API and Google Ads API Forum
Ejay

In the adwords UI it allows a user to select multiple partition types when they are nested together. I was trying to add multiple partitions with different dimension types to replicate that functionality. Is that not possible then with the API since everything must be the same dimension type.
Do you have a code example or xml example i may look at to accomplish this if possible

Thank you

Bryan Natter

unread,
May 28, 2019, 9:59:16 AM5/28/19
to AdWords API and Google Ads API Forum
Also what are the "other" cases that are required to do this with a smart campaign

Thank you

Bryan Natter

unread,
May 28, 2019, 10:05:55 AM5/28/19
to AdWords API and Google Ads API Forum
When I send only1 partition type in the request i get the following error whether i use a partition that requires a case value or does not require one.
[AdGroupCriterionError.PRODUCT_PARTITION_SUBDIVISION_REQUIRES_OTHERS_CASE @ operations; trigger:'ProductPartition{id=TempCriterionId{id=1}, bidSimulatorStatus=null, partitionType=SUBDIVISION, parentCriterionId=null, productGroup=null, productGroupObsoleteStatus=null, caseValue=null, decisionPath=[], salesCountry=null, merchantId=null, hasPromotedSuggestion=null}']

Google Ads API Forum Advisor Prod

unread,
May 28, 2019, 11:19:43 AM5/28/19
to adwor...@googlegroups.com
Hello Bryan,

Via API you cannot use multiple product dimensions in the same subdivision. The error PRODUCT_PARTITION_SUBDIVISION_REQUIRES_OTHERS_CASE occurs when there is no others unit type in the partition. Each subdivision must always be completely partitioned, so it must contain a unit type representing Other
Reply all
Reply to author
Forward
0 new messages