CustomParameter questions

60 views
Skip to first unread message

mm

unread,
May 11, 2015, 9:29:53 PM5/11/15
to adwor...@googlegroups.com
Hey Guys -

I was updating customParameters on a Keyword and inadvertently misspelled one. I tried to correct it, changing the spelling from "promocode" to "promoCode":

   <operations>
    <operator>SET</operator>
    <operand xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201502" xsi:type="ns2:BiddableAdGroupCriterion">
     <adGroupId>21999324732</adGroupId>
     <criterion>
      <id>138950229372</id>
     </criterion>
     <destinationUrl/>
     <finalUrls>
     </finalUrls>
     <finalMobileUrls>
     </finalMobileUrls>
     <urlCustomParameters>
      <parameters>
       <key>kwid</key>
       <value>feb8e13727a8408486739991f33bdee0</value>
      </parameters>
      <parameters>
       <key>promoCode</key>
       <value>nyc55893</value>
      </parameters>
      <parameters>
       <key>season</key>
       <value>Fall_getaway</value>
      </parameters>
      <parameters>
       <key>promocode</key>
       <isRemove>true</isRemove>
      </parameters>
     </urlCustomParameters>
    </operand>
   </operations>
  </mutate>

And received:
                <partialFailureErrors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="DistinctError">
                    <fieldPath>operations[0].operand.urlCustomParameters.parameters[3].key</fieldPath>
                    <trigger>promocode</trigger>
                    <errorString>DistinctError.DUPLICATE_ELEMENT</errorString>
                    <ApiError.Type>DistinctError</ApiError.Type>
                    <reason>DUPLICATE_ELEMENT</reason>
          </partialFailureErrors>
 
Is this a bug, or are customParameters really case insensitive?

Thanks -
mm

Anthony Madrigal

unread,
May 12, 2015, 2:47:18 PM5/12/15
to adwor...@googlegroups.com, marg...@buyerpath.com
Hey,

According to your error message, you have a DUPLICATE_ELEMENT. In this case, the parameter keys are not case sensitive so that is why it is reading a duplicate for promocode and promoCode. You could remove the parameters for promocode and insert a <doReplace>true</doReplace> inside of your urlCustomParameters tag instead. This will replace all existing parameters with the parameters in your request.

Take care,
Anthony, AdWords API Team

Hunter McMillen

unread,
May 12, 2015, 3:46:10 PM5/12/15
to adwor...@googlegroups.com, marg...@buyerpath.com

> In this case, the parameter keys are not case sensitive so that is why it is reading a duplicate for promocode and promoCode.

Can you be more specific about which case you mean? Are there other cases where the customParameter keys are treated case sensitively?

mm

unread,
May 12, 2015, 4:44:44 PM5/12/15
to adwor...@googlegroups.com, marg...@buyerpath.com
Hey Hunter -
I was thinking of them like url parameters and just didn't expect them to be case-insensitive (wasn't treating them that way). I'll update my logic to accommodate. I also didn't quite grok the use of doReplace - that looks like it will simplify my code nicely.

Thanks!
mm
Reply all
Reply to author
Forward
0 new messages