UserListError.CONCRETE_TYPE_REQUIRED

132 views
Skip to first unread message

18824...@163.com

unread,
Dec 19, 2017, 4:12:42 PM12/19/17
to AdWords API Forum
Hi all,
       I have a problem when I try to create UserList 

it return 'UserListError.CONCRETE_TYPE_REQUIRED'
What am I doing wrong? Thanks for help in advance.



Vincent Racaza (AdWords API Team)

unread,
Dec 20, 2017, 12:55:30 AM12/20/17
to AdWords API Forum
Hi,

The error UserListError.CONCRETE_TYPE_REQUIRED means that you need to specify the type of user list in your requestUpon checking your SOAP request, indeed, you didn't specify the type attribute in the operand element. You may check the sample SOAP request snippet below with type for reference.
<operand xmlns:ns8="https://adwords.google.com/api/adwords/rm/v201710xsi:type="ns8:ExpressionRuleUserList">
For additional information on Remarketing and Audience Targeting, you can visit this link, and you can also see the sample codes here.

Thanks,
Vincent
AdWords API Team

18824...@163.com

unread,
Dec 21, 2017, 4:57:52 AM12/21/17
to AdWords API Forum
Dear Vincent
         Thanks very much for your reply.this is my code.

<x:Envelope xmlns:x="http://schemas.xmlsoap.org/soap/envelope/" xmlns:v="https://adwords.google.com/api/adwords/rm/v201702" xmlns:v1="https://adwords.google.com/api/adwords/cm/v201702" ><x:Header><v:RequestHeader><v1:clientCustomerId>XXXXXXXXX</v1:clientCustomerId><v1:developerToken>XXXXXXX</v1:developerToken><v1:userAgent>test</v1:userAgent><v1:validateOnly>false</v1:validateOnly><v1:partialFailure>false</v1:partialFailure></v:RequestHeader></x:Header><x:Body>
<v:mutate>
<v:operations>
<v1:operator>ADD</v1:operator>
<v:operand xmlns:ns8="https://adwords.google.com/api/adwords/rm/v201702" xsi:type="ns8:ExpressionRuleUserList">
<v:name>开发测试</v:name>
<v:description>test-operand-description</v:description>
<v:status>CLOSED</v:status>
<v:membershipLifeSpan>10</v:membershipLifeSpan>
<v:prepopulationStatus>REQUESTED</v:prepopulationStatus>
<v:rule>
<v:groups>
<v:items>
<v:StringRuleItem>
<v:key>
<v:name>url__</v:name>
</v:key>
<v:op>CONTAINS</v:op>
<v:value>example.com</v:value>
</v:StringRuleItem>
</v:items>
</v:groups>
</v:rule>
</v:operand>
</v:operations>
</v:mutate></x:Body></x:Envelope>
However it doesn't work.can you help me correct the code because  I have too little knowledge of xml .

Vincent Racaza (AdWords API Team)

unread,
Dec 21, 2017, 5:22:12 AM12/21/17
to AdWords API Forum
Hi,

It seems that you are not using one of our client libraries, that's why it generated an error on your end since there is something wrong in your XML request in creating an ExpressionRuleUserList. See sample SOAP request snippet below in creating this user list type.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   
<soapenv:Header>
       
<ns1:RequestHeader xmlns:ns1="https://adwords.google.com/api/adwords/rm/v201710" soapenv:mustUnderstand="0">
           
<ns2:clientCustomerId xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201710">XXX-XXX-XXXX</ns2:clientCustomerId>
           
<ns3:developerToken xmlns:ns3="https://adwords.google.com/api/adwords/cm/v201710">REDACTED</ns3:developerToken>
           
<ns4:userAgent xmlns:ns4="https://adwords.google.com/api/adwords/cm/v201710">unknown </ns4:userAgent>
           
<ns5:validateOnly xmlns:ns5="https://adwords.google.com/api/adwords/cm/v201710">false</ns5:validateOnly>
           
<ns6:partialFailure xmlns:ns6="https://adwords.google.com/api/adwords/cm/v201710">false</ns6:partialFailure>
       
</ns1:RequestHeader>
   
</soapenv:Header>
   
<soapenv:Body>
       
<mutate xmlns="https://adwords.google.com/api/adwords/rm/v201710">
           
<operations>
               
<ns7:operator xmlns:ns7="https://adwords.google.com/api/adwords/cm/v201710">ADD</ns7:operator>

               
<operand xmlns:ns8="https://adwords.google.com/api/adwords/rm/v201710" xsi:type="ns8:ExpressionRuleUserList">

                   
<ns8:name>Expression based user list sample</ns8:name>
                   
<ns8:description>Users who checked out in three month window OR visited the checkout page with more than one item in their cart</ns8:description>
                   
<ns8:prepopulationStatus>REQUESTED</ns8:prepopulationStatus>
                   
<ns8:rule>
                       
<ns8:groups>
                           
<ns8:items>
                               
<ns8:StringRuleItem>
                                   
<ns8:key>
                                       
<ns8:name>ecomm_pagetype</ns8:name>
                                   
</ns8:key>
                                   
<ns8:op>EQUALS</ns8:op>
                                   
<ns8:value>checkout</ns8:value>
                               
</ns8:StringRuleItem>
                           
</ns8:items>
                           
<ns8:items>
                               
<ns8:NumberRuleItem>
                                   
<ns8:key>
                                       
<ns8:name>cartsize</ns8:name>
                                   
</ns8:key>
                                   
<ns8:op>GREATER_THAN</ns8:op>
                                   
<ns8:value>1.0</ns8:value>
                               
</ns8:NumberRuleItem>
                           
</ns8:items>
                       
</ns8:groups>
                       
<ns8:groups>
                           
<ns8:items>
                               
<ns8:DateRuleItem>
                                   
<ns8:key>
                                       
<ns8:name>checkoutdate</ns8:name>
                                   
</ns8:key>
                                   
<ns8:op>AFTER</ns8:op>
                                   
<ns8:value>20171221</ns8:value>
                               
</ns8:DateRuleItem>
                           
</ns8:items>
                           
<ns8:items>
                               
<ns8:DateRuleItem>
                                   
<ns8:key>
                                       
<ns8:name>checkoutdate</ns8:name>
                                   
</ns8:key>
                                   
<ns8:op>BEFORE</ns8:op>
                                   
<ns8:value>20180321</ns8:value>
                               
</ns8:DateRuleItem>
                           
</ns8:items>
                       
</ns8:groups>
                       
<ns8:ruleType>DNF</ns8:ruleType>
                   
</ns8:rule>
               
</operand>
           
</operations>
       
</mutate>
   
</soapenv:Body>
</soapenv:Envelope>

You can emulate the SOAP request above and let us know if you encounter any issues. If it still does not work, please provide your latest SOAP request and response logs via Reply privately to author option.
Message has been deleted

Vincent Racaza (AdWords API Team)

unread,
Dec 22, 2017, 2:21:52 AM12/22/17
to AdWords API Forum
Hi,

I deleted your previous reply as it contains your private information (CID). Reposting again your original reply with masked information:

Your code worked.There isn't client librarise for us,Because we use Node.js to develop this project.I maybe lose jop without you reply.I want to konw if we can be a friend.
    there is another trouble when i try to upload a media of miage.it return 'Invalid content was found starting with element 'v:data',but the data of base64 is useful.

    <x:Envelope xmlns:x="http://schemas.xmlsoap.org/soap/envelope/"
                xmlns:v="https://adwords.google.com/api/adwords/cm/v201702">
        <x:Header>
            <v:RequestHeader>
                <v:clientCustomerId>XXX-XXX-XXXX</v:clientCustomerId>
                <v:developerToken>XXXXXXXXXXXXXXXXXX</v:developerToken>
                <v:userAgent>test</v:userAgent>
                <v:validateOnly>false</v:validateOnly>
                <v:partialFailure>false</v:partialFailure>

            </v:RequestHeader>
        </x:Header>
        <x:Body>
            <v:upload>
                <v:media>
                    <v:type>IMAGE</v:type>
                    <v:data>base64</v:data>
                </v:media>
            </v:upload>
        </x:Body>
    </x:Envelope>

In the future, please do not post private information publicly. You can refer to this guide before posting.

Vincent Racaza (AdWords API Team)

unread,
Dec 22, 2017, 2:22:43 AM12/22/17
to AdWords API Forum
Hi,

I'm flattered that you wish for us to be friends. :) You can always count on our team for any AdWords API specific concerns.

In regards to uploading an image media via the MediaService.upload(), please refer to the sample SOAP request snippet below that you can emulate on your end. Your data field should be of type base64binary.

 <soapenv:Body>
        <upload xmlns="https://adwords.google.com/api/adwords/cm/v201710">
            <media xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201710xsi:type="ns2:Image">
                <ns2:type>IMAGE</ns2:type>
                <ns2:data>base64binary data sample</ns2:data>
            </media>
        </upload>
  </soapenv:Body>


If you have other clarifications, I suggest to create a new forum thread so there will be one thread to monitor for your new issue/concern.

Hope this helps and happy holidays!
Reply all
Reply to author
Forward
0 new messages