Data sent to Bazaarvoice for review requests (formerly post-interaction email or PIE), is referred to as the interaction data feed. This feed must be in one of the following file formats:

  • A tab-delimited text file with .txt extension
  • An XML file (preferred format)

Each file uploaded must have a unique name to avoid it overwriting the previous file. We accept any naming convention you choose but we recommend including your site name and current date, such as in the following example:

  • YourSiteName_InteractionData_20120928.txt
  • YourSiteName_OrderData_20120928.xml

If you intend to send multiple feeds a day, add a unique character to the file name. For example:

  • YourSiteName_InteractionData1_20120928.xml
  • YourSiteName_InteractionData2_20120928.xml

Tab-delimited interaction data feed

Tab-delimited review request text files support two kinds of columns:

  • Interaction. Interaction columns appear before product columns, and each column only appears once.
  • Product. Product columns appear after interaction columns, and can occur in repeating sets (maximum of 5) to define multiple products as part of a single interaction.

The following columns are ‘interaction’ columns:

  • Interaction date
  • Locale
  • Email address
  • User ID
  • User name

The following columns are ‘product’ columns:

  • Product ID
  • Product name
  • Product thumbnail image URL
  • Product price

The following example shows the general structure of a simplified tab-delimited interaction feed with:

  • interaction date
  • email address
  • user ID “interaction” columns
  • varying numbers of repeating sets of product ID, product thumbnail image URL
  • product name “product” columns
date  email  userId  productId  imageUrl  productName
date  email  userId  productId  imageUrl  productName  productId  imageUrl  productName
date  email  userId  productId  imageUrl  productName
date  email  userId  productId  imageUrl  productName  productId  imageUrl  productName

Use the following best practices when you create a tab-delimited interaction feed:

  • Interaction dates can be in any format that can be expressed via the methods defined in Java’s SimpleDateFormat class. Bazaarvoice recommends the following format:

    yyyy-MM-dd HH:mm:ss.SSS
    
  • Feeds may utilize header rows to denote column names; Bazaarvoice will ignore these rows.

XML-based interaction data feed

The XML interaction data feed file begins with a root node of <Feed xmlns="http://www.bazaarvoice.com/xs/PRR/PostPurchaseFeed/5.6" >, and each transaction in the feed features its own Interaction element under the root. Transaction-related metadata appears as children elements like TransactionDate under the appropriate transaction.

The following example shows the general structure of a simplified XML interaction feed that exhibits all possible elements:

<?xml version="1.0" encoding="UTF-8"?>
<Feed xmlns="http://www.bazaarvoice.com/xs/PRR/PostPurchaseFeed/5.6">
    <Interaction>
        <TransactionDate>...</TransactionDate>
        <EmailAddress>...</EmailAddress>
        <UserName>...</UserName>
        <UserID>...</UserID>
        <Locale>...</Locale>
        <Products>
            <Product>
                <ExternalId>...</ExternalId>
                <Name>...</Name>
                <ImageUrl>...</ImageUrl>
                <Price>...</Price>
            </Product>
        </Products>
    </Interaction>
</Feed>

Use the following best practices when you create an interaction data feed file (XML interaction feed):

  • Interaction dates must conform to the XML dateTime format. For example:

    2010-10-10T11:11:11.000
    
  • Ensure that the first line of your feed adheres to the following format:

    <?xml version="1.0" encoding="utf-8"?>
    
  • The standard character-encoding scheme, such as UTF-8 or Windows-1252, must match the scheme that you use for any special characters in the feed.
  • If you do not have a value for a particular field, omit the field from your feed. Do not include the field with a blank value.

Validating XML interaction feeds

You can validate your XML interaction feeds using a local validator such as XMLBeans before submitting them to Bazaarvoice. To do so, follow these steps:

  1. Visit http://xmlbeans.apache.org/ and install XMLBeans. Installation steps may vary by operating system and platform.
  2. Save a copy of the Bazaarvoice schema you’re validating to your local machine. To do this, visit the site defined in the xmlns. For example: http://www.bazaarvoice.com/xs/PRR/PostPurchaseFeed/5.6 and save the output as an XSD file on your local machine.
  3. Use the command line to call XMLBeans to validate your file. Full documentation of the XMLBeans command line tools can be found here: http://xmlbeans.apache.org/docs/2.0.0/guide/conValidationWithXmlBeans.html#command_line_validation

Example

svalidate schema.xsd localfile.xml