Hi Danny,

My apologies for the delay. At first it looked like in your post that you 
had solved the issue. I just re-read it, and I can see that you're still 
trying to get this figured out. So, I searched through our logs for your 
request and your response. I found the reason why you're having a failure 
by finding your request and response in our logs.

If you look at your response, you'll see that you're getting back an error 
that says *OperationAccessDenied.OPERATION_NOT_PERMITTED_FOR_CAMPAIGN_TYPE 
@ operations[0].operand.criterion; trigger:'SEARCH*. You can't use this 
type of criterion for search campaigns. It's only meant for display 
campaigns. You can read more about the types of campaigns where you can use 
audiences in the AdWords Help Center's article on audience targeting 
<https://support.google.com/adwords/answer/2497941?hl=en>. Once you try 
this same code on a display campaign, then this should work.

Best,
Nadine, AdWords API Team


On Tuesday, June 26, 2018 at 5:28:01 PM UTC-4, danny+awt...@pdffiller.com 
wrote:
>
> I also added next value:
>
> $userListCriterion->setCriterionType(CriterionType::CUSTOM_INTENT);
>
>
> so now I have:
>
> $userListCriterion = new CriterionCustomIntent();
> $userListCriterion->setCustomIntentId($item['CustomIntentId']);
>
>     $userListCriterion->setCriterionType(CriterionType::CUSTOM_INTENT);
>
>
> And switched BiddableAdGroupCriterion to AdGroupCriterion()
>
> But nothing changed.
>
> Danny.
>
> On Tuesday, June 26, 2018 at 6:42:56 PM UTC+3, Nadine Sundquist (AdWords 
> API Team) wrote:
>>
>> Hello Danny,
>>
>> That first error that you have with the REQUIRED is actually coming from 
>> CustomAffinityService. This is when you are creating your audience. It's 
>> saying that a name 
>> <https://developers.google.com/adwords/api/docs/reference/v201806/CustomAffinityService.CustomAffinity#name>
>>  is 
>> required. So, it looks like that call to create your custom affinity 
>> audience failed due to that. Please make sure to specify a name.
>>
>> The reason the second may be empty is because it looks like your first 
>> call to make the audience failed. Could you double-check to make sure that 
>> your first call really is successful and then try the second one again?
>>
>> Thanks,
>> Nadine, AdWords API Team
>>
>> On Tuesday, June 26, 2018 at 9:23:51 AM UTC-4, danny+...@pdffiller.com 
>> wrote:
>>>
>>> Hi Nadine!
>>>
>>> Thank you, I successfully created Custom Intent due to your manual, but 
>>> now have trouble how to link Intent to AdGroup if I have IntentID and 
>>> AdGroup ID?
>>>
>>> My way with error:
>>>
>>> $operations = [];
>>>
>>> foreach ($data as $item) {
>>>     if (!isset($item['AdGroupId'])) {
>>>         throw new AdWordsClientException('AdGroupId is not set');
>>>     }
>>>     if (!isset($item['CustomIntentId'])) {
>>>         throw new AdWordsClientException('CustomIntentId is not set');
>>>     }
>>>
>>>     $userListCriterion = new CriterionCustomIntent();
>>>     $userListCriterion->setCustomIntentId($item['CustomIntentId']);
>>>
>>>     $adGroupCriterion = new BiddableAdGroupCriterion();
>>>     $adGroupCriterion->setAdGroupId($item['AdGroupId']);
>>>     $adGroupCriterion->setCriterion($userListCriterion);
>>>
>>>     $operations[] = new CustomAffinityOperation(Operator::ADD, null, 
>>> $adGroupCriterion);
>>> }
>>>
>>> return $this->mutateOperations($operations);
>>>
>>>
>>> Produces error:
>>>
>>> <soap:Envelope 
>>> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";><soap:Header><ns2:ResponseHeader
>>>  
>>> xmlns:ns2="https://adwords.google.com/api/adwords/rm/v201806"; xmlns="
>>> https://adwords.google.com/api/adwords/cm/v201806";><requestId>00056f8b200ebf800a81ed01ae020b82</requestId><serviceName>CustomAffinityService</serviceName><methodName>mutate</methodName><operations>1</operations><responseTime>586</responseTime></ns2:ResponseHeader></soap:Header><soap:Body><soap:Fault><faultcode>soap:Client</faultcode><faultstring>[RequiredError.REQUIRED
>>>  
>>> @ operations[0].operand.name]</faultstring><detail><ns2:ApiExceptionFault 
>>> xmlns="https://adwords.google.com/api/adwords/cm/v201806"; xmlns:ns2="
>>> https://adwords.google.com/api/adwords/rm/v201806";><message>[RequiredError.REQUIRED
>>>  
>>> @ 
>>> operations[0].operand.name]</message><ApplicationException.Type>ApiException</ApplicationException.Type><errors
>>>  
>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
>>> xsi:type="RequiredError"><fieldPath>operations[0].operand.name
>>> </fieldPath><fieldPathElements><field>operations</field><index>0</index></fieldPathElements><fieldPathElements><field>operand</field></fieldPathElements><fieldPathElements><field>name</field></fieldPathElements><trigger></trigger><errorString>RequiredError.REQUIRED</errorString><ApiError.Type>RequiredError</ApiError.Type><reason>REQUIRED</reason></errors></ns2:ApiExceptionFault></detail></soap:Fault></soap:Body></soap:Envelope>
>>>
>>> But sent SOAP looks little bit strange with no data except operation 
>>> type:
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>>
>>> <SOAP-ENV:Envelope xmlns:SOAP-ENV="
>>> http://schemas.xmlsoap.org/soap/envelope/"; xmlns:ns1="
>>> https://adwords.google.com/api/adwords/cm/v201806"; xmlns:ns2="
>>> https://adwords.google.com/api/adwords/rm/v201806";><SOAP-ENV:Header><ns2:RequestHeader><ns1:clientCustomerId>***</ns1:clientCustomerId><ns1:developerToken>REDACTED</ns1:developerToken><ns1:userAgent>unknown
>>>  
>>> (AwApi-PHP, googleads-php-lib/35.2.0, PHP/5.6.31-1~ubuntu14.04.1+
>>> deb.sury.org
>>> +1)</ns1:userAgent><ns1:validateOnly>false</ns1:validateOnly><ns1:partialFailure>false</ns1:partialFailure></ns2:RequestHeader></SOAP-ENV:Header><SOAP-ENV:Body><ns2:mutate><ns2:operations><ns1:operator>ADD</ns1:operator><ns2:operand/></ns2:operations></ns2:mutate></SOAP-ENV:Body></SOAP-ENV:Envelope>
>>>
>>> On Tuesday, June 26, 2018 at 12:43:23 AM UTC+3, Nadine Sundquist 
>>> (AdWords API Team) wrote:
>>>>
>>>> Hello Danny,
>>>>
>>>> There was a new service introduced in v201806 called 
>>>> CustomAffinityService 
>>>> <https://developers.google.com/adwords/api/docs/reference/v201806/CustomAffinityService>.
>>>>  
>>>> If you already have custom audiences in your account, then you'll see them 
>>>> there. You can use the ID from those. You can also create audiences using 
>>>> the CustomAffinityService. In that service, you'll get back two types 
>>>> of audiences 
>>>> <https://developers.google.com/adwords/api/docs/reference/v201806/CustomAffinityService.CustomAffinity#type>,
>>>>  
>>>> *CUSTOM_INTENT* and *CUSTOM_AFFINITY*. You'll want to use the 
>>>> *CUSTOM_INTENT* one for a CriterionCustomIntent. 
>>>>
>>>> Cheers,
>>>> Nadine, AdWords API Team
>>>>
>>>> On Monday, June 25, 2018 at 3:41:13 AM UTC-4, danny+...@pdffiller.com 
>>>> wrote:
>>>>>
>>>>> Yes. Error with ExpressionRuleUserList was that in including files 
>>>>> part I had different library versions for classes. It produced incorrect 
>>>>> SOAP request. But after execution code I understood that it was not what 
>>>>> I 
>>>>> needed. I need a CriterionCustomIntent 
>>>>> <https://developers.google.com/adwords/api/docs/reference/v201806/AdGroupCriterionService.CriterionCustomIntent>
>>>>>  to 
>>>>> create audience for users, who visited domains, which I need add to 
>>>>> intent 
>>>>> list as keywords. 
>>>>> Type of that audience in UI is 'Custom intent audience'.
>>>>>
>>>>> Unfortunately I found no examples how to use CriterionCustomIntent 
>>>>> <https://developers.google.com/adwords/api/docs/reference/v201806/AdGroupCriterionService.CriterionCustomIntent>
>>>>> .
>>>>>
>>>>> On Monday, June 25, 2018 at 8:24:53 AM UTC+3, Peter Oliquino (AdWords 
>>>>> API Team) wrote:
>>>>>>
>>>>>> Hi Danny,
>>>>>>
>>>>>> Could you first confirm if you no longer have any issues with the 
>>>>>> ExpressionRuleUserList ADD request, and that what originally intended 
>>>>>> was 
>>>>>> to create a CriterionCustomIntent 
>>>>>> <https://developers.google.com/adwords/api/docs/reference/v201806/AdGroupCriterionService.CriterionCustomIntent>
>>>>>>  as 
>>>>>> a BiddableAdGroupCriterion 
>>>>>> <https://developers.google.com/adwords/api/docs/reference/v201806/AdGroupCriterionService.BiddableAdGroupCriterion>
>>>>>> ? 
>>>>>>
>>>>>> Thanks and regards,
>>>>>> Peter
>>>>>> AdWords API Team
>>>>>>
>>>>>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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 and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/0ef86ebe-9e1b-49ce-8b53-e9e3110f070b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
  • ... danny+awtest
    • ... 'Peter Oliquino (AdWords API Team)' via AdWords API and Google Ads API Forum
      • ... danny+awtest
        • ... 'Peter Oliquino (AdWords API Team)' via AdWords API and Google Ads API Forum
          • ... danny+awtest
            • ... 'Nadine Sundquist (AdWords API Team)' via AdWords API and Google Ads API Forum
              • ... danny+awtest
                • ... 'Nadine Sundquist (AdWords API Team)' via AdWords API and Google Ads API Forum
                • ... danny+awtest
                • ... danny+awtest
                • ... 'Nadine Sundquist (AdWords API Team)' via AdWords API and Google Ads API Forum
                • ... danny+awtest
                • ... 'Nadine Sundquist (AdWords API Team)' via AdWords API and Google Ads API Forum
                • ... danny+awtest
                • ... 'Nadine Sundquist (AdWords API Team)' via AdWords API and Google Ads API Forum
                • ... danny+awtest
                • ... 'Nadine Sundquist (AdWords API Team)' via AdWords API and Google Ads API Forum
                • ... danny+awtest
                • ... 'Nadine Sundquist (AdWords API Team)' via AdWords API and Google Ads API Forum
                • ... danny+awtest
                • ... danny+awtest

Reply via email to