I have a campaign that I'd like to duplicate with the following BiddingStrategyConfiguration object
object(BiddingStrategyConfiguration)[52]
public 'biddingStrategyId' => null
public 'biddingStrategyName' => null
public 'biddingStrategyType' => string 'BUDGET_OPTIMIZER' (length=16)
public 'biddingStrategySource' => null
public 'biddingScheme' =>
object(BudgetOptimizerBiddingScheme)[53]
public 'bidCeiling' =>
object(Money)[55]
...
public 'enhancedCpcEnabled' => boolean false
public 'BiddingSchemeType' => string 'BudgetOptimizerBiddingScheme' (length=28)
private '_parameterMap' (BiddingScheme) =>
array (size=1)
...
public 'bids' => null
I'm using the following to create the biddingStrategyConfiguration
$biddingStrategyConfiguration->biddingStrategyType = 'BUDGET_OPTIMIZER';
$campaign->biddingStrategyConfiguration = $biddingStrategyConfiguration;
Which is producing the following bidding error
object(BiddingErrors)[36]
public 'reason' => string 'CANNOT_ATTACH_BIDDING_STRATEGY_TO_CAMPAIGN' (length=42)
public 'fieldPath' => string 'operations[0].operand.biddingStrategyConfiguration.biddingStrategyType' (length=70)
public 'trigger' => string 'BUDGET_OPTIMIZER' (length=16)
public 'errorString' => string 'BiddingErrors.CANNOT_ATTACH_BIDDING_STRATEGY_TO_CAMPAIGN' (length=56)
public 'ApiErrorType' => string 'BiddingErrors' (length=13)
Here is the SOAP error
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>[SelectorError.MISSING_PREDICATE_VALUES @ serviceSelector]</faultstring>
<detail>
<ApiExceptionFault xmlns="https://adwords.google.com/api/adwords/cm/v201406">
<message>[SelectorError.MISSING_PREDICATE_VALUES @ serviceSelector]</message>
<ApplicationException.Type>ApiException</ApplicationException.Type>
<errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="SelectorError">
<fieldPath>serviceSelector</fieldPath>
<trigger/>
<errorString>SelectorError.MISSING_PREDICATE_VALUES</errorString>
<ApiError.Type>SelectorError</ApiError.Type>
<reason>MISSING_PREDICATE_VALUES</reason>
</errors>
</ApiExceptionFault>
</detail>
</soap:Fault>
Since providing a bidding scheme is optional I'm at a loss to know what this is.
I have read the following documentation:
https://developers.google.com/adwords/api/docs/reference/v201406/CampaignService.Campaign
https://developers.google.com/adwords/api/docs/reference/v201406/CampaignService.BiddingStrategyConfiguration
Has anyone had experience here they could share?
Many thanks