Search

Searching DEVELOPERS

Export Page

Integrating product data into the Amplience platform offers you the capability to incorporate live product information into any of your Amplience media using the authoring studio.  This means that in Amplience you can also create very sophisticated product based media such PDPs and quick views.  Integrating product data is essential to support channel integrations including adding to basket. 

The preferred method for integrating product information is to use a REST based web service.   This involves providing a URL that returns either specified product information or a product list in a standard XML format adhering to the Amplience product schema.   The Amplience XML schema supports:

  • Standard product object model
  • Product variants and overrides
  • Custom fields

Considerations for building your REST interface

  • Ensure that you use only valid characters that do not compromise the XML.  Common examples of characters that break the XML include £ and € in the price fields.  This can be fixed using escaping and encoding such as £ and €  or using a CDATA section if concerned. See Response formatting below
  • Set the content type for the response – this can be achieved by setting the http header Content-Type to text/xml
  • Set you cache-control settings to reflect the Time To Live (TTL) policy across caches
    • no-cache – submit every response to the REST interface
    • private – basically cache on browser and ignore public caches e.g. internal proxy
    • public - cache everywhere
    • max-age – time to cache the data request
    • Switch off etags as unless these are managed and setup correctly you inaccurate results.  Cache-control and max-age is a far better way of managing cache updates.
    • Avoid redirects (301/304 http responses) as this causes severe problems with Ajax calls for the HTML5 player.

Response Formatting

This section describes how the product data responses should be formatted. The data returned in your  REST response should be in an XML format. The response must be valid XML, for example HTML escape sequences like £ are not valid XML. HTML tags will be stripped out of the text. Nodes containing HTML should be placed inside a CDATA node.

The following table lists the special characters and their encoded escape sequences:

Character

Escape Sequences

"

<

&lt;

>

&gt;

&amp;apos;

&

&amp;

£

&amp;pound;

¢

&amp;cent;

¥

&amp;yen;

©

&amp;copy;

®

&amp;reg;

&amp;euro;