Hi again,
I tested with Client Library and it updated CpcBid but my script response 
shows no change in CpcBid. For my script, I am not using Library (please 
note that). It is custom made PHP script and I am able to get all campaigns 
and adgroups data using SOAP requests.
As per nolibrary documentation (
https://code.google.com/p/google-api-adwords-php/wiki/NoClientLibrary) it 
says we have to convert some variables into SoapVar.

so for changing bid, here is some piece of code for your understand through 
which I need help.

//Store AdGroupID(s) and new Bids in variable
$changeBid=array();

//---for 1122334455, original bid is 0.12
$changeBid['1122334455']=0.05;

//---create operations array with operation of each AdGroup---
$operations=array();
foreach($changeBid as $id=>$adBid)
{
//---- $id is ID of AdGroupID
//--- $adBid is bid amount in FLOAT 


//---create Money type variable with microAmount---
$bid1_soap=new SoapVar(NULL, NULL, 'Money',ADWORDS_API_NAMESPACE);
$bid1_soap->microAmount=($adBid * 1000000);

//---create CpcBid Type variable and set bid to previous SoapVar
$bid2_soap=new SoapVar(NULL, NULL, 'CpcBid',ADWORDS_API_NAMESPACE);
$bid2_soap->bid=$bid1_soap;

//---create BiddingStrategyConfiguration variable and set bids as an 
array---
$BiddingStrategyConfiguration=new SoapVar(NULL, NULL, 
'BiddingStrategyConfiguration',ADWORDS_API_NAMESPACE);
$BiddingStrategyConfiguration->bids=array($bid2_soap);


//---add operation to operations array for this adgroup....
$operations[]=array("operator"=>"SET","operand"=>array("id"=>$id,"biddingStrategyConfiguration"=>array("bids"=>array($bid2_soap))));

}


//---create Request array

    $request = array(
"mutate" => array(
"operations" => $operations
)
    );


After doing *print_r($request)* ....

Array
(
    [mutate] => Array
        (
            [operations] => Array
                (
                    [0] => Array
                        (
                            [operator] => SET
                            [operand] => Array
                                (
                                    [id] => 1122334455
                                    [biddingStrategyConfiguration] => Array
                                        (
                                            [bids] => Array
                                                (
                                                    [0] => SoapVar Object
                                                        (
                                                            [enc_type] => 999998
                                                            [enc_stype] => 
CpcBid
                                                            [enc_ns] => 
https://adwords.google.com/api/adwords/cm/v201306
                                                            [bid] => SoapVar 
Object
                                                                (
                                                                    [enc_type] 
=> 999998
                                                                    [enc_stype] 
=> Money
                                                                    [enc_ns] => 
https://adwords.google.com/api/adwords/cm/v201306
                                                                    
[microAmount] => 50000
                                                                )

                                                        )

                                                )

                                        )

                                )

                        )

                )

        )

)




Output result show no change ...


 [bids] => Array
 (
     [0] => stdClass Object
         (
             [Bids.Type] => CpcBid
             [bid] => stdClass Object
                 (
                     [ComparableValue.Type] => Money
                     [microAmount] => 120000
                 )

             [cpcBidSource] => ADGROUP
         )

     [1] => stdClass Object
         (
             [Bids.Type] => CpaBid
             [bid] => stdClass Object
                 (
                     [ComparableValue.Type] => Money
                     [microAmount] => 10000
                 )

         )

     [2] => stdClass Object
         (
             [Bids.Type] => CpmBid
             [bid] => stdClass Object
                 (
                     [ComparableValue.Type] => Money
                     [microAmount] => 250000
                 )

             [cpmBidSource] => ADGROUP
         )

 )


Please let me know what is wrong. I am not using Client Library because I 
started this work without library and already done with work except changing 
bids.

NEED HELP :(

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to