keyword text keyword match type keyword id

327 views
Skip to first unread message

timprepscius

unread,
Dec 22, 2009, 5:54:05 PM12/22/09
to AdWords API Forum
Just wondering,

Why do I need to specify keyword text and keyword match type when
modifying a keyword's status or bid etc?

Shouldn't a customerId + adgroupId + keywordId be sufficient?

If these values which I pass in are somehow wrong (which I hope they
never are), will the keyword's text and match type change or will an
exception be thrown?

-tim

AdWords API Advisor

unread,
Dec 23, 2009, 10:33:38 AM12/23/09
to AdWords API Forum
Hi Tim,

This is a common question, and the good news is that you don't need to
send in the keyword text or match type when you are updating the bid,
etc. The trick is that when you are creating your updated
AdGroupCriterion, set the criterion field to an instance of the base
type Criterion, which only has an id field. If you use the Keyword or
Placement types then the server will validate that all the required
fields have values (like text and matchType).

Best,
- Eric Koleda, AdWords API Team

timprepscius

unread,
Dec 23, 2009, 1:54:43 PM12/23/09
to AdWords API Forum
Thanks!

Have a happy holiday!

On Dec 23, 10:33 am, AdWords API Advisor

Amit Kumar Verma

unread,
Apr 10, 2018, 11:29:20 AM4/10/18
to AdWords API Forum
I am getting the similar issue while adding an existing keyword to a shared set . I followed the same thing , created instance of Criterion instead of Keyword but now its giving me error [SharedSetCriterionError.CONCRETE_TYPE_REQUIRED @ operations[0].operand.criterion]#0

Milind Sankeshware (AdWords API Team)

unread,
Apr 10, 2018, 3:33:26 PM4/10/18
to AdWords API Forum
Hi Amit,

The error CONCRETE_TYPE_REQUIRED meaning, the concrete type of criterion (e.g., keyword and placement) is required for ADD operations. Could you please share the complete SOAP request and response logs along with CID so that I can troubleshoot the issue?

Thanks,
Milind, AdWords API Team.

Amit Kumar Verma

unread,
Apr 11, 2018, 5:44:18 AM4/11/18
to AdWords API Forum
CID: 1552618597

Request:

<soap-env:body>
<ns1:mutate>
<ns1:operations>
<ns1:operator>ADD</ns1:operator>
<ns1:operand>
<ns1:sharedsetid>1587701975</ns1:sharedsetid>
<ns1:criterion>
<ns1:id>10120631</ns1:id>
<ns1:type>KEYWORD</ns1:type>
</ns1:criterion>
<ns1:negative>true</ns1:negative>
</ns1:operand>
</ns1:operations>
</ns1:mutate>
</soap-env:body> Response:
<soap:body>
<soap:fault>
<faultcode>soap:Client</faultcode>
<faultstring>[SharedSetCriterionError.CONCRETE_TYPE_REQUIRED @ operations[0].operand.criterion]</faultstring>
<detail>
<apiexceptionfault
<message>[SharedSetCriterionError.CONCRETE_TYPE_REQUIRED @ operations[0].operand.criterion]</message>
<applicationexception.type>ApiException</applicationexception.type>
<errors
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="SharedCriterionError">
<fieldpath>operations[0].operand.criterion</fieldpath>
<fieldpathelements>
<field>operations</field>
<index>0</index>
</fieldpathelements>
<fieldpathelements>
<field>operand</field>
</fieldpathelements>
<fieldpathelements>
<field>criterion</field>
</fieldpathelements>
<trigger></trigger>
<errorstring>SharedSetCriterionError.CONCRETE_TYPE_REQUIRED</errorstring>
<apierror.type>SharedCriterionError</apierror.type>
<reason>CONCRETE_TYPE_REQUIRED</reason>
</errors>
</apiexceptionfault>
</detail>
</soap:fault>
</soap:body>

Milind Sankeshware (AdWords API Team)

unread,
Apr 11, 2018, 3:25:53 PM4/11/18
to AdWords API Forum
Hi Amit,

Thanks for sharing the SOAP logs. Could you please confirm are you looking to add Keyword criteria to existing Shared set? If yes, you need to set criterion type and text in request as given below:

 <soapenv:Body>
            <operations>
                <operator>ADD</operator>
                <operand>
                    <sharedSetId>1687862249</sharedSetId>
                    <criterion xmlns:ns2="https://adwords.google.com/api/adwords/cm/v201802" xsi:type="ns2:Keyword">
                        <ns2:id>1111111</ns2:id>
                        <ns2:Criterion.Type>KEYWORD</ns2:Criterion.Type>
                        <ns2:text>XXXXX</ns2:text>
                        <ns2:matchType>BROAD</ns2:matchType>
                    </criterion>
                    <negative>true</negative>
                </operand>
            </operations>
     </mutate>
</soapenv:Body>


If you are still facing an issue, please share the complete SOAP request and response log. You could choose 'reply privately to author' option to send logs.

Amit Kumar Verma

unread,
Apr 12, 2018, 2:30:50 AM4/12/18
to AdWords API Forum
Thanks Milind for your reply , but I want to add an existing Keyword criteria to an existing Shared Set . If I define text and Match type , it creates new Keyword Criteria. Thats the whole issue.

Milind Sankeshware (AdWords API Team)

unread,
Apr 12, 2018, 3:43:32 PM4/12/18
to AdWords API Forum
Hi Amit,

Could you please clarify what you mean by "I want to add an existing Keyword criteria to an existing Shared Set "? Are you looking to modify the text of an existing keyword in an existing shared set? If you've created the shared set, you can use the SharedCriterionService.mutate() to add keywords to the existing set. To modify the keywords, you will need to use the SET operator. If you are using the ADD operator, the required attributes will have to be passed and that will add a new keyword to the shared set. Please refer this guide for more details.

Amit Kumar Verma

unread,
Apr 13, 2018, 6:10:20 AM4/13/18
to AdWords API Forum
HI Milind, I don't want to update keyword. I want to add an existing keyword to an another shared set. Is that possible or not ?  I have seen same keyword existing on multiple shared sets.

Milind Sankeshware (AdWords API Team)

unread,
Apr 13, 2018, 2:52:36 PM4/13/18
to AdWords API Forum
Hi Amit,

Each Shared set owns the keywords in that list. If you want to add a keyword with the same text and match type as in a different shared set, you will need to add the keyword again to the second shared set. Since the text is same, you might get the keyword criterion Id same as in the shared set one. But this does not mean that the keywords are same. The criterion id is not globally unique. The combination of shared set id and the criterion Id is globally unique. For more information please refer this guide. To summarize, you will have to add the keyword with the same text and match type to the second shared set. Please note that you might or might not get the same criterion Id while doing this. Let me know if you have further questions.
Message has been deleted

Amit Kumar Verma

unread,
Apr 16, 2018, 3:30:40 AM4/16/18
to AdWords API Forum
Hi Milind,

I want same criterion id for same text and match type because it will not be a one time operation , I may have to add same criterion to many other shared sets and may have to remove it from some shared set so if it will create different id each time , it will not look good as I am also saving all the criterion in database and displaying it so I don't want different criterion for same text and match type. Why can't we just add same existing criterion in different existing shared set ?

Thanks

Milind Sankeshware (AdWords API Team)

unread,
Apr 16, 2018, 1:37:05 PM4/16/18
to AdWords API Forum
Hi Amit, 

Let me clarify this for you. You can consider the shared set as a list of keywords. Instead of adding the individual keywords as criterion, you can just attach the list as the criterion to campaign or ad group. The ids of criterion alone are not globally unique, but the combination of the shared set id and the keyword id will be globally unique. This means that the keyword exist in the shared set and the concept of adding the same keyword with same id to a different set is ideally creating a new keyword in the second set. You might have seen that the adding keyword with same text is creating a keyword with same Id. This does not mean that the keywords are same. Also, there is no guarantee that the keywords will always have the same id. You can observe the same behavior while adding a keyword in the ad group too. To summarize, If you need the keyword with same text in a different shared set, you have to create it again in the second set and use the ADD operator. The new keyword will need to be referenced with the combination of the criterion id and the shared set id to uniquely identify it. 

Hope this clarifies your question. 

Thanks,
Milind, AdWords API Team.
Reply all
Reply to author
Forward
0 new messages