Feedback data is downloaded from the Feefo servers using the standard URL in the form of:
- merchantidentifier = the merchant’s unique Feefo identifier, which in this example is example-retail-merchant. To find your merchant identifier, see Find Your Merchant Identifier.
This example uses just one parameter, merchantidentifier. There are a number of other parameters that can be used to specify the data to be returned and these are described in XML: Parameters For Downloading A Feed.
The downloaded data from Feefo contains raw feedback data in XML format as shown in this example:
<?xml version="1.0" encoding="UTF-8"?> <FEEDBACKLIST> <SUMMARY> <MERCHANTIDENTIFIER>example-retail-merchant</MERCHANTIDENTIFIER> <TOTALSERVICECOUNT>131</TOTALSERVICECOUNT> <TOTALPRODUCTCOUNT>139</TOTALPRODUCTCOUNT> <COUNT>130</COUNT> <SUPPLIERLOGO>https://api.feefo.com/api/merchant-image/example-retail-merchant-logo.png</SUPPLIERLOGO> <URL>https://www.feefo.com/reviews/example-retail-merchant</URL> <TITLE>Example Retail Merchant</TITLE> <BEST>100</BEST> <WORST>0</WORST> <AVERAGE>75</AVERAGE> <START>1</START> <LIMIT>20</LIMIT> <SERVICEEXCELLENT>61</SERVICEEXCELLENT>
Associated with the feedback data is a feedback template which defines how the feedback information is to be displayed on the merchant website. The feedback template is written in Extensible Stylesheet Language (XSL), which is an international standard that describes how to transform XML documents. Shown below is an excerpt:
<?xml version="1.0" encoding="ISO-8859-1" ?> <?xml-stylesheet type="text/css" href="style.css"?> <html xsl:version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Feefo Feedback</title> <link rel="stylesheet" type="text/css" href="style.css" /> </head> <body> <div id="page"> ...
The transformation of the XML requires the input of both the feedback data (XML) and feedback template (XSL) into an XSL Transformation (XSLT) Processor as shown in the next diagram:
The processor transforms the feedback data into HTML content that can be included on the merchant website.
Feefo provide sample files, stylesheets, and code for a Full Integration that includes a PHP language script (feefofeedback.php) to invoke the transformation process. The files can be downloaded from http://www.feefo.com/samples/FeefoXMLfiles.zip and should be stored in a sub-directory of the website root (e.g. ~/feefo). The URL for the script contains the merchant identifier and other parameters to customise the output.
Merchants can create customised templates and transformation processes that meet their needs providing it is done in accordance with Feefo’s policy of displaying the Feefo logo alongside any Feefo feedback information.
And a reminder … A timeout parameter should always be used for all XML calls that are made from a web page, and this should include any Feefo XML calls. The parameter protects a web page’s load time if there are any performance issues on third party contributor’s to that web page. Without it, if an XML call is made to a third party and experiences problems, web pages may load very slowly or not at all.