External attributes

How do I add an attribute from an external source?

The Tweakwise feed is a large file, and so regenerating the entire feed just to update one property will have a huge impact and can take a long time. An external property is a much smaller file that can be loaded more often, parallel to the complete Tweakwise feed. These are the steps you need to take:

  1. You need to create an online feed on a URL that contains the data for the external property. This an example of the complete Tweakwise feed. Here are the steps you need to take:

    <?xml version="1.0"?>
    <items xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <item>
            <id>0000000361100</id>
            <values>
                <value>99.15858</value>
            </values>
        </item>
        <item>
            <id>000000036110107</id>
            <values>
                <value>99.15858</value>
            </values>
        </item>
    </items>
    
  2. The XML's definition is defined in an XSD. The definition is found at this URL: https://sttwdocseuwe.blob.core.windows.net/xsd/tweakwise-external-property-feed.xsd

  3. The IDs in the feed need to refer to product numbers in Tweakwise. The external property will be linked to the right product in Tweakwise based on those IDs.
    For example, the XML above shows that the <id> is defined as the number 0000000361100. That number should be found in Catalog > Products as one of the products' product number.

  4. If there are multiple products, then they can be loaded into the feed quite easily. Example:

    <item>
        <id>000000036110107</id>
        <values>
            <value>95.58</value>
            <value>93.55</value>
            <value>92.88</value>
        </values>
    </item>
    
  5. Create a new external property in: Tweakwise > Catalog > External property > New

  6. You need to load the external values periodically. To do this, you need to create a task in the Connectivity > Tasks module. Create a task of the Import external property type. On the Setup tab, you should fill in the feed URL under HTTP URL. Lastly, select the property you created in step 5 under External property.

  7. Start the task to complete the process. You can try doing this manually, but don't forget to create a trigger so that the task is executed daily. We do not recommend starting this task in unison with the Import and Publish tasks because this task might cause an error, which causes the publish task to not start.