Hi Alex,

Sorry for the confusion.

I take a look on your codes once again and saw that your doing the 
FeedMapping for attributeId 1 only.  Based on the documentation 
<https://developers.google.com/adwords/api/docs/appendix/placeholders#structured-snippets>,
 
there is feedAttributeId "2" that you need to create for feedMapping as 
well.

You are making the "header" attribute which are pre-defined (Types, Brands, 
etc.). However, you need to create also the "values" to show those 
information.

Using Java client example 
<https://github.com/googleads/googleads-java-lib/blob/master/examples/adwords_axis/src/main/java/adwords/axis/v201603/extensions/AddSiteLinksUsingFeeds.java>,
 
I was able to create the Structured Snippet successfully. I did the 
following code to do the mapping of FeedAttributeIds:

    // Map the FeedAttributeIds to the fieldId constants.
    AttributeFieldMapping headerFieldMapping = new AttributeFieldMapping();
    
headerFieldMapping.setFeedAttributeId(structuredSnippetData.headerFeedAttributeId);
    
headerFieldMapping.setFieldId(PLACEHOLDER_FIELD_STRUCTURED_SNIPPET_HEADER); 
//PLACEHOLDER_FIELD_STRUCTURED_SNIPPET_HEADER = 1
    AttributeFieldMapping valuesFieldMapping = new AttributeFieldMapping();
    
valuesFieldMapping.setFeedAttributeId(structuredSnippetData.valuesFeedAttributeId);
    
valuesFieldMapping.setFieldId(PLACEHOLDER_FIELD_STRUCTURED_SNIPPET_VALUES); 
//PLACEHOLDER_FIELD_STRUCTURED_SNIPPET_VALUES = 2

    // Create the FeedMapping and operation.
    FeedMapping feedMapping = new FeedMapping();
    feedMapping.setPlaceholderType(PLACEHOLDER_STRUCTURED_SNIPPET);
    feedMapping.setFeedId(structuredSnippetData.structureSnippetFeedId);
    feedMapping.setAttributeFieldMappings(new AttributeFieldMapping[] 
{headerFieldMapping,
        valuesFieldMapping});
    FeedMappingOperation operation = new FeedMappingOperation();
    operation.setOperand(feedMapping);
    operation.setOperator(Operator.ADD);

>From the PHP code example 
<https://github.com/googleads/googleads-php-lib/blob/master/examples/AdWords/v201603/Extensions/AddSitelinksUsingFeeds.php>,
 
you may refer from line 170 to line 194.

This means that you need to create feedMapping for attributeId 1 and 
attributeId 2 to create structured snippet successfully.

Please let me know if this explains the solution on your case.

Thanks and Regards,
Joyce, 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 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.
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/837780da-0e21-4c08-be36-25c2923bdc96%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to