Import external attributes in Tweakwise
Regenerating and importing the Tweakwise feed can take a lot of time. This can have a big impact on the duration of the entire update chain. If you want That's why we introduced a way to update a single attribute using a separate feed that can be loaded more frequently.
Here’s a step-by-step guide to achieve this:
- Create a feed
- Create a new atribute
- Import the feed
- Schedule the task
Tip
The concept of generating and importing this feed is similar to a regular Tweakwise XML feed.
To learn more, go to Create an XML feed to import your catalog data in Tweakwise.
1. Create a feed
You need to create an XML feed containing the data for the external attribute. Here's an example of what the feed might look like:
<?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>
Important:
- The
<id>
elements in the XML should correspond to item id's in Tweakwise. These IDs link the external attribute data to the appropriate products in your catalog. - The XML feed should conform to this schema: Tweakwise XSD Schema.
- If a product has multiple values for the attribute, the XML can be structured as follows:
<item>
<id>000000036110107</id>
<values>
<value>95.58</value>
<value>93.55</value>
<value>92.88</value>
</values>
</item>
2 Create a new attribute
- Go to
Tweakwise > Catalog > Attribute > New external attribute
. - Define the new external attribute with a meaningful name and relevant settings.
3. Import
- Navigate to Connectivity > Tasks.
- Create a new task of type Import external attribute.
- In the Setup tab, fill in the feed URL under HTTP URL.
- Select the external attribute you created in step 5 from the External attribute dropdown.
4. Schedule
- You can start the task manually to ensure it works correctly.
- Set up a trigger to run this task daily to keep the data updated.
- Avoid scheduling this task to run at the same time as the Import and Publish tasks to prevent potential errors.
By following these steps, you ensure that the external attribute data is imported and updated regularly without the need to regenerate the entire Tweakwise feed.
Updated 4 months ago