Unable to set/update AdGroup status

已查看 52 次
跳至第一个未读帖子

s...@feedonomics.com

未读,
2018年4月5日 20:52:282018/4/5
收件人 AdWords API Forum
function set_adgroup_status($adgroup_id, $status) {
$adGroup = new AdGroup();
$adGroup->setId($adgroup_id);
$adGroup->setStatus($status);

$operation = new AdGroupOperation();
$operation->setOperand($adGroup);
$operation->setOperator(Operator::SET);

return $operation;
}

Why does processing this operation result in all these errors?

<errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="OperatorError">
<fieldPath>operations[2]</fieldPath>
<fieldPathElements>
<field>operations</field>
<index>2</index>
</fieldPathElements>
<trigger/>
<errorString>OperatorError.OPERATOR_NOT_SUPPORTED</errorString>
<ApiError.Type>OperatorError</ApiError.Type>
<reason>OPERATOR_NOT_SUPPORTED</reason>
</errors>
<errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="RequiredError">
<fieldPath>operations[2].operator</fieldPath>
<fieldPathElements>
<field>operations</field>
<index>2</index>
</fieldPathElements>
<fieldPathElements>
<field>operator</field>
</fieldPathElements>
<trigger/>
<errorString>RequiredError.REQUIRED</errorString>
<ApiError.Type>RequiredError</ApiError.Type>
<reason>REQUIRED</reason>
</errors>
<errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="RequiredError">
<fieldPath>operations[2].operand</fieldPath>
<fieldPathElements>
<field>operations</field>
<index>2</index>
</fieldPathElements>
<fieldPathElements>
<field>operand</field>
</fieldPathElements>
<trigger/>
<errorString>RequiredError.REQUIRED</errorString>
<ApiError.Type>RequiredError</ApiError.Type>
<reason>REQUIRED</reason>
</errors>
<errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="RequiredError">
<fieldPath>operations[2].operator</fieldPath>
<fieldPathElements>
<field>operations</field>
<index>2</index>
</fieldPathElements>
<fieldPathElements>
<field>operator</field>
</fieldPathElements>
<trigger/>
<errorString>RequiredError.REQUIRED</errorString>
<ApiError.Type>RequiredError</ApiError.Type>
<reason>REQUIRED</reason>
</errors>
<errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="RequiredError">
<fieldPath>operations[2].operand</fieldPath>
<fieldPathElements>
<field>operations</field>
<index>2</index>
</fieldPathElements>
<fieldPathElements>
<field>operand</field>
</fieldPathElements>
<trigger/>
<errorString>RequiredError.REQUIRED</errorString>
<ApiError.Type>RequiredError</ApiError.Type>
<reason>REQUIRED</reason>
</errors>

I then checked the operator object:

  object(Google\AdsApi\AdWords\v201710\cm\AdGroupOperation)#95 (4) {
    ["operand":protected]=>
    object(Google\AdsApi\AdWords\v201710\cm\AdGroup)#96 (16) {
      ["id":protected]=>
      string(11) "60706718824"
      ["campaignId":protected]=>
      NULL
      ["campaignName":protected]=>
      NULL
      ["name":protected]=>
      NULL
      ["status":protected]=>
      string(6) "PAUSED"
      ["settings":protected]=>
      NULL
      ["labels":protected]=>
      NULL
      ["forwardCompatibilityMap":protected]=>
      NULL
      ["biddingStrategyConfiguration":protected]=>
      NULL
      ["contentBidCriterionTypeGroup":protected]=>
      NULL
      ["baseCampaignId":protected]=>
      NULL
      ["baseAdGroupId":protected]=>
      NULL
      ["trackingUrlTemplate":protected]=>
      NULL
      ["urlCustomParameters":protected]=>
      NULL
      ["adGroupType":protected]=>
      NULL
      ["adGroupAdRotationMode":protected]=>
      NULL
    }
    ["operator":protected]=>
    string(3) "SET"
    ["OperationType":protected]=>
    NULL
    ["parameterMap":"Google\AdsApi\AdWords\v201710\cm\Operation":private]=>
    array(1) {
      ["Operation.Type"]=>
      string(13) "OperationType"
    }
  }

Any ideas? Thanks!

Peter Oliquino

未读,
2018年4月6日 01:52:262018/4/6
收件人 AdWords API Forum
Hi,

In order to better identify the exact cause of the issue, could you provide to me the complete SOAP request and response that was generated when this error occurred? You may reply using the Reply privately to author option.

Best regards,
Peter
AdWords API Team

Christian Semmler

未读,
2018年4月6日 03:44:272018/4/6
收件人 AdWords API Forum
We are also seeing these errors (OPERATOR_NOT_SUPPORTED - RequiredError.REQUIRED) when editing a shopping bidding tree with the BatchJobService. I will see if I can provide the SOAP request.

Peter Oliquino

未读,
2018年4月6日 05:27:072018/4/6
收件人 AdWords API Forum
Hi Christian,

So I can assist you better, could you provide more details such as your batch job ID and any SOAP request and response? You may reply to me privately via the Reply privately to author option.
回复全部
回复作者
转发
0 个新帖子