Hi,
could you help me with API
error ExtensionSettingError.INCOMPATIBLE_UNDERLYING_MATCHING_FUNCTION which
I get always I call the requet to create new callout in Account level.
Everything works great when I create new callout related to AdGroup od
Campaign (Using CampaignExtensionSettingService or
AdGroupExtensionSettingService). But if I use
CustomerExtensionSettingService like this:
// Get CustomerExtensionSettingService
$extensionSettingService =
$this->_getService(cm\CustomerExtensionSettingService::class); // Internal
method to get service correctly
$calloutFeedItem = (new cm\CalloutFeedItem())
->setFeedType(cm\FeedType::CALLOUT)
->setCalloutText('Test Callout');
// Prepare basic data
$extensionSetting = (new cm\CustomerExtensionSetting())
// ->setCampaignId(...) // when I tried to create to AdGroup or campaign
->setExtensionType(cm\FeedType::CALLOUT)
->setExtensionSetting(new cm\ExtensionSetting([$calloutFeedItem]));
// Create operation
$operations = new cm\CustomerExtensionSettingOperation(cm\Operator::ADD, null,
$extensionSetting);
// Add the callout over API to adwords
$result = $extensionSettingService->mutate([$operations]);
there si error Uncaught Google\AdsApi\AdWords\v201702\cm\ApiException:
[ExtensionSettingError.INCOMPATIBLE_UNDERLYING_MATCHING_FUNCTION @
operations[0].operand].
Very straingh weird is that all this works fine in test account... But on
real, production account it throw this error.
Thank you for responses
Dne neděle 26. března 2017 13:29:42 UTC+2 [email protected] napsal(a):
>
> Hi,
> Thank you for assistance,
> this is code snippet that I wrote for adding call out extension for
> account:
>
> public CustomerExtensionSettingReturnValue
> SetAccountCallOutExtention(string customerId, string calloutText)
> {
> CustomerExtensionSettingService
> customerExtensionSettingService =
>
> (CustomerExtensionSettingService)AdwordsUser.GetService(AdWordsService.v201702.CustomerExtensionSettingService);
>
> _customerExtensionSettingService.RequestHeader.clientCustomerId =
> customerId;
> CustomerExtensionSetting customerExtensionSetting = new
> CustomerExtensionSetting
> {
> extensionType = FeedType.CALLOUT,
> extensionSetting = new ExtensionSetting()
> {
> extensions = new ExtensionFeedItem[]
> {
> new CalloutFeedItem
> {
> calloutText = calloutText,
> feedType = FeedType.CALLOUT
> }
> }
> }
> };
>
> CustomerExtensionSettingOperation customerOperation = new
> CustomerExtensionSettingOperation()
> {
> operand = customerExtensionSetting,
> @operator = Operator.ADD,
> };
>
> return customerExtensionSettingService.mutate(new[] {
> customerOperation });
> }
>
> On Thursday, March 23, 2017 at 8:24:09 PM UTC+2, Shwetha Vastrad (AdWords
> API Team) wrote:
>>
>> Hi,
>>
>> You need to set the clientCustomerId in the request header
>> <https://developers.google.com/adwords/api/docs/guides/call-structure#request_headers>
>> to
>> add an extension at the customer level using
>> CustomerExtensionSettingService
>> <https://developers.google.com/adwords/api/docs/reference/v201702/CustomerExtensionSettingService>.
>>
>> You will not be setting the customerId in the CustomerExtensionSetting
>> <https://developers.google.com/adwords/api/docs/reference/v201702/CustomerExtensionSettingService.CustomerExtensionSetting>
>> object.
>> You can programmatically set the clientCustomerId at runtime by following
>> the instructions provided here
>> <https://developers.google.com/adwords/api/docs/guides/samples-use-cases#anatomy_of_an_api_code_sample>
>> for
>> your client library.
>>
>> Regards,
>> Shwetha, AdWords API Team.
>>
>
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
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/a9df1f0c-2b1b-4184-a828-e6001274897c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.