Hi Josh,

You sure did saved a lot of my team's time.

Many thanks.


On Monday, July 28, 2014 11:14:04 AM UTC-4, Josh Radcliff (AdWords API 
Team) wrote:
>
> Hi Muhammad,
>
> There are two ways to get this information: reporting or a combination of 
> the various feed services.
>
> The reporting approach is, by far, the simpler way to go. If you have 
> impressions where call extensions have served, you can simply run the 
> Placeholder 
> Feed Item Report 
> <https://developers.google.com/adwords/api/docs/appendix/reports#placeholder-feed-item>,
>  include 
> the *FeedId*, *FeedItemId*, and *AttributeValues* fields, and look for 
> rows where *PlaceholderType* is equal to *2* (for CALL). On the row 
> corresponding to the PHONE NUMBER placeholder field 
> <https://developers.google.com/adwords/api/docs/appendix/placeholders>, 
> the *AttributeValues* field will contain the phone number.
>
> You could also use the various feed services to find the phone number as 
> follows:
>
>    1. Use *CampaignFeedService* to find the CampaignFeed 
>    
> <https://developers.google.com/adwords/api/docs/reference/v201406/CampaignFeedService.CampaignFeed>
>  that 
>    has the appropriate campaignId 
>    
> <https://developers.google.com/adwords/api/docs/reference/v201406/CampaignFeedService.CampaignFeed#campaignId>
>     and placeholderTypes 
>    
> <https://developers.google.com/adwords/api/docs/reference/v201406/CampaignFeedService.CampaignFeed#placeholderTypes>
>  containing 
>    *2*.
>    2. Inspect the matchingFunction 
>    
> <https://developers.google.com/adwords/api/docs/reference/v201406/CampaignFeedService.CampaignFeed#matchingFunction>
>  of 
>    the *CampaignFeed* to determine which feed ID and feed item IDs are 
>    mapped to the campaign for the CALL placeholder type. Chances are that the 
>    function's lhsOperand 
>    
> <https://developers.google.com/adwords/api/docs/reference/v201406/CampaignFeedService.Function#lhsOperand>
>  is 
>    a RequestContextOperand 
>    
> <https://developers.google.com/adwords/api/docs/reference/v201406/CampaignFeedService.RequestContextOperand>
>     with contextType 
>    
> <https://developers.google.com/adwords/api/docs/reference/v201406/CampaignFeedService.RequestContextOperand#contextType>
>     *FEED_ITEM_ID*, and the function's rhsOperand 
>    
> <https://developers.google.com/adwords/api/docs/reference/v201406/CampaignFeedService.Function#rhsOperand>
>  is 
>    a ConstantOperand 
>    
> <https://developers.google.com/adwords/api/docs/reference/v201406/CampaignFeedService.ConstantOperand>
>     whose longValue 
>    
> <https://developers.google.com/adwords/api/docs/reference/v201406/CampaignFeedService.ConstantOperand#longValue>
>  contains 
>    the feed item IDs. You'll want to capture the feed item IDs from the 
>    *rhsOperand*.
>    3. Use *FeedMappingService* to find the FeedMapping 
>    
> <https://developers.google.com/adwords/api/docs/reference/v201406/FeedMappingService.FeedMapping>
>     where placeholderType 
>    
> <https://developers.google.com/adwords/api/docs/reference/v201406/FeedMappingService.FeedMapping#placeholderType>
>  equals 
>    *2* and feedId 
>    
> <https://developers.google.com/adwords/api/docs/reference/v201406/FeedMappingService.FeedMapping#feedId>
>  equals 
>    the feed ID from step 2. Find the AttributeFieldMapping 
>    
> <https://developers.google.com/adwords/api/docs/reference/v201406/FeedMappingService.AttributeFieldMapping>
>     where AttributeFieldMapping.fieldId 
>    
> <https://developers.google.com/adwords/api/docs/reference/v201406/FeedMappingService.AttributeFieldMapping#fieldId>
>  is 
>    equal to *1* (for the *PHONE NUMBER* placeholder field), and note the 
>    feedAttributeId 
>    
> <https://developers.google.com/adwords/api/docs/reference/v201406/FeedMappingService.AttributeFieldMapping#feedAttributeId>
>    .
>    4. Now that you have the feed ID and feed item IDs from step 2 and the 
>    feed attribute ID from step 3, use FeedItemService 
>    
> <https://developers.google.com/adwords/api/docs/reference/v201406/FeedItemService>
>  to 
>    retrieve the feed items.
>    5. On each feed item, inspect the FeedItem.attributeValues 
>    
> <https://developers.google.com/adwords/api/docs/reference/v201406/FeedItemService.FeedItem#attributeValues>
>  where 
>    the feedAttributeId 
>    
> <https://developers.google.com/adwords/api/docs/reference/v201406/FeedItemService.FeedItemAttributeValue#feedAttributeId>
>  is 
>    equal to the feed attribute ID from step 3. The stringValue 
>    
> <https://developers.google.com/adwords/api/docs/reference/v201406/FeedItemService.FeedItemAttributeValue#stringValue>
>  will 
>    contain the phone number for the call extension.
>
> Note that the above assumes that you only have call extensions defined at 
> the *Campaign* level. If you have *AdGroup*-specific call extensions, 
> then use AdGroupFeedService 
> <https://developers.google.com/adwords/api/docs/reference/v201406/AdGroupFeedService>
>  instead 
> of CampaignFeedService 
> <https://developers.google.com/adwords/api/docs/reference/v201406/CampaignFeedService>
>  for 
> steps 1 and 2.
>
> Cheers,
> Josh, AdWords API Team
>
> On Sunday, July 27, 2014 9:51:55 AM UTC-4, dgs world (Tech Team) wrote:
>>
>> Hi all,
>>
>> The tech team at DGS World has been utilizing the services of AdWords API 
>> for quiet a long time now. Recently, we came across a requirement to 
>> retrieve the 'Phone number' defined under the *Call extensions* under 
>> the *Ad extensions* tab defined for the Campaign or AdGroup.
>>
>> We've tried the AdWords API and the Reporting services, but we haven't 
>> been able to find the solution.
>>
>> Can you guys please direct us towards a solution to get the Phone number 
>> defined for the Campaign or AdGroup?
>>
>> Thanks,
>> Muhammad Jawwad
>>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to