Create a System Generated Feed (FeedOrigin.Adwords)

49 views
Skip to first unread message

Mario Bianchi Vivern

unread,
Jan 30, 2018, 12:03:45 PM1/30/18
to AdWords API Forum

I'm struggling on how I can create a System Generated Feed (Call extension). I basically want to create the "Main phone number feed" feed if it does not exists. It gets created automatically if I enter a number manually and then I can add more feeditems through the API.

//******do not need feedattributes since I want a system feed - commented out *****
//FeedAttribute phoneNumberAttribute = new FeedAttribute();
//phoneNumberAttribute.type = FeedAttributeType.STRING;
//phoneNumberAttribute.name = "PHONE NUMBER";
//FeedAttribute countryCodeAttribute = new FeedAttribute();
//countryCodeAttribute.type = FeedAttributeType.STRING;
//countryCodeAttribute.name = "COUNTRY CODE";

Feed callAdFeed = new Feed();
callAdFeed.name = "Main phone number feed";

//callAdFeed.attributes = new FeedAttribute[] { phoneNumberAttribute, countryCodeAttribute }; //not required since it will be system feed - commented out
callAdFeed.origin = FeedOrigin.ADWORDS;

FeedOperation operation = new FeedOperation();
operation.operand = callAdFeed;
operation.@operator = Operator.ADD;

FeedReturnValue result = feedSvc.mutate(new FeedOperation[] { operation });

This returns error "Cannot specify ADWORDS origin for a non-system generated feed".

What am I missing? 

Sreelakshmi Sasidharan (AdWords API Team)

unread,
Jan 30, 2018, 2:45:52 PM1/30/18
to AdWords API Forum
Hi Mario, 

The "System Generated Feeds" cannot be created or removed manually. These feeds are created by the AdWords system when you add the first Ad extension of that kind. One possible option to trigger the creation of the feed is to add at least one call extension at any level either via the UI or via the API. This will create the system generated Feed along with the phone number as the FeedItem. You can check here for code snippets to add a call extension

If you are just looking to create a regular Feed containing the call extensions, you can use the FeedService and create the feeds with origin as USER. Please let me know if you have any additional questions. 

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