[TEASER-GOODS-EXPORT-REQUIREMENTS_0]

The file requirements for ads exported to Mgid

   

The format and the schema of the file

   

       The ads export is performed by the use of an external XML file.        
       The file must be available on an external URL.    

   
       Example of an XML file available on an external URL:
      https://dashboard.mgid.com/schemas/mgid_teaser_goods_export_example.xml    
   

The XML document must conform to the XSD format schema specified below:    

   
 <!ELEMENT mgid_teaser_goods_export (categories, teasers)>
    <!ATTLIST mgid_teaser_goods_export date CDATA #REQUIRED>

    <!ELEMENT categories (category+)>
        <!ELEMENT category (#PCDATA)>
            <!ATTLIST category id CDATA #REQUIRED parentId CDATA #IMPLIED>

    <!ELEMENT teasers (teaser+)>

        <!ELEMENT teaser (categoryId, url, picture, title, text, price?)>
            <!ATTLIST teaser id CDATA #REQUIRED active (true | false | 0 |1) "true">

            <!ELEMENT categoryId (#PCDATA)>
            <!ELEMENT url (#PCDATA)>
            <!ELEMENT picture (#PCDATA)>
            <!ELEMENT title (#PCDATA)>
            <!ELEMENT text (#PCDATA)>

            <!ELEMENT price (#PCDATA)>
                <!ATTLIST price currency (USD | EUR | CAD | AUD | INR | GBP | ZAR) "USD">
 
   

XML header

   
    
      
   

Standart XML header with mandatory indication of the UTF-8 encoding and the standalone=”no” tag, which indicates that the schema is kept in a separate file.    
   The file must have the UTF-8 encoding.

   

The ‘mgid_teaser_goods_export’ element

   
    
        
            ...
        
        
            ...
        
    
    
   

The document must use as a root tag the ‘mgid_teaser_goods_export ‘ element with a specified date attribute,
   which must correspond to the date and the time of generation of the XML-file in the ‘YYYY-MM-DD HH:mm’ format.

   

The ‘Categories’ element


    Clothing
    Leisure goods
    Pants

There must be at least a single ‘category’ tag in this block (see the XSD schema). The ‘category’ tag must have an ‘id’ attribute with an integer as a key. For indication of nested categories the ‘parentId’ attribute may be used. The value of ‘parentId’ must be one of the listed categories.

   

The ‘teasers’ element

   
    
        
            12
            http://shopsiteexample.com/product-AE-124563.html
            http://shopsiteexample.com/picture-AE-124563/main.jpg
            Levis Jeans for men
            Mens Jeans Levis, at the lowest price! Only 5 days!
            59
        
    
    
   

In this block all the ads that are to be imported must be listed. Each ad must be represented by the ‘teaser’ tag.

   

Description of elements and attributes within the ‘teaser’ tag

   

The order of the elements within the ‘teaser’ tag must be kept exactly as it is in the table!

                                                                                                                                                                                                                                                                                                                                                                                                                       
Element or attributeDescription
idThis atribute of the 'teaser' tag is mandatory. The unique identifier of an ad, that is placed in the sensor code on the page of the goods. Allowed values: [0-9, A-Z, a-z, -, _]            
activeThis atribute of the 'teaser' tag is NOT mandatory. Default value = false Teaser status. Allowed values: [0, 1, true, false]. If false teaser would not be created.            
categoryIdThis tag is mandatory. The unique identifier of an ad's category. If the 'type' attribute's value is ”Own”, the category is taken from the list of categories, listed in the 'categories' element. The category identifier, used in the Mgid system, can also be specified.            
urlThis tag is mandatory. It is a link to the goods page
pictureThis tag is mandatory. A link to the picture of the goods. The picture itself must not be smaller than 492x328. Ideally, it must be exactly 492x328. Allowed extensions: * .jpg, * .jpeg            
titleThis tag is mandatory. It is the title of a teaser. Ideally, it shouldn't contain more than 65 symbols, otherwise it will be cut to 65 symbols                by the system's means (words won't be split in the process). The same symbols may be used as when creating the teaser.            
textThis tag is mandatory. It is an advertising text (a short description). Ideally, it shouldn't contain more than  75 symbols, otherwise it will be cut to 65 symbols by the system's means (words won't be split in the process). The same symbols may be used as when creating the teaser.            
priceThis tag is NOT mandatory. The price of the teaser in the stated currency. Allowed values: [0-9]
currencyThe price tag's attribute - not mandatory. It is an identifier of the currency used to specify the price. The default value = USD. Must posess a value from this list:                
                       
  • AED
  • BYN
  • EUR
  • GEL
  • ILS
  • INR
  • KZT
  • RUB
  • UAH
  • USD
  •                
           
   

Conditions for replacements

   

The XML standard requires mandatory replacements of some symbols with equivalent symbolic primitives. Below is the list of such replacements.

       
" "
& &
> >
< <
' '
© ©
¢ ¢
® ®