AdWords
1.6K members online now
1.6K members online now
For questions related to Google Shopping and Merchant Center. Learn to optimize your Shopping ads
Guide Me
star_border
Reply

Product feeds - can the XML include empty values (e.g. for mpn)?

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

My current feeds currently don't include an XML element for MPN (Manufacturers Part Number).  Some of my products have an MPN, some don't.  My feed is produced from a fairly complex SQL server process which makes it difficult to selectively add this element where relevant and leave it out when there is no value for MPN.

 

The easy way is to always include an XML element for MPN but have a blank value where one is not available.  Is this permissible, or if I try this will my listings suddenly all get marked as disapproved?!  

1 Expert replyverified_user

Re: Product feeds - can the XML include empty values (e.g. for mpn)?

[ Edited ]
Top Contributor
# 2
Top Contributor


generally, blank empty values should only be used within
a tab-delimited or spreadsheet feed -- a google-xml feed
should not include the tag, at all -- if a value does not apply,
or may otherwise be processed as a possible value and can
trigger a disapproval depending on the context.

note that mpn, gtin, and brand attributes are global-trade-data
that should be assigned by the manufacturer -- not merchants.

also, depending on the type of item, mpn may not be needed.
https://support.google.com/merchants/answer/1344057

Re: Product feeds - can the XML include empty values (e.g. for mpn)?

Follower ✭ ✭ ✭
# 3
Follower ✭ ✭ ✭
Can't you place the data in arrays or variables.

Than when the value is empty for mpn do not print the mpn tag else print.

Re: Product feeds - can the XML include empty values (e.g. for mpn)?

[ Edited ]
Top Contributor
# 4
Top Contributor


as long as the element (tags) are not included.

the method and details concerning how tags do not get included
is not part of any requirement and is mostly merchant-specific --
using arrays, checking for an empty value, and then not including
the tags is certainly one method, among many; another might be
some form of sql statement: and (mpn is not null and mpn != '');
etc., depending on the back-end details.

Re: Product feeds - can the XML include empty values (e.g. for mpn)?

Visitor ✭ ✭ ✭
# 5
Visitor ✭ ✭ ✭

Thanks for your responses.

 

My problem was that my 100,000+ listings contain a number of parts that have a manufacturer's part number (which I would like to include for the purposes of siding their searchability) and a number of items which do not have an official manufacturers part number.  I can work out which is which in my database but its tricky to tell SQL Server not to create an element of the XML file conditionally.

 

As it turns out, SQL Server does not generate XML elements for data which is NULL, so all I have to do is ensure that the raw data for my feed gives an MPN value where needed and a NULL value otherwise - and SQL Server does the rest, omitting the mpn element where relevant.

 

However, I live in eternal fear that my automated feed submissions will one day get declined based on rules over things like this, so it is handy to know what would happen if these elements were left in with blank values.

 

Re: Product feeds - can the XML include empty values (e.g. for mpn)?

Follower ✭ ✭ ✭
# 6
Follower ✭ ✭ ✭
Normally, an SQL Server is the database holding information.
Than you have another language that collects the data from the database and generates custom data output in languages such as PHP.

Now I guess what you are doing is exporting it directly from SQL which is not really a good and easy way to control your data and have custom rule sets.

If you write an XML data feed script instead than you would be able to create what you want.

Why not search for Google Merchant How To Setup A Live XML Data Feed With MySql and PHP

Or whichever relevant language you want to use.