In order to start using Motive Commerce Search, you must integrate it into your online store. To carry out this integration, your catalogue must be reflected in a feed that Motive can work with.
This page provides the set of instructions you need to follow in order to integrate Motive Commerce Search into your online shop.
Understanding the Feed
When using a feed, the XML file consists of a head including the metadata followed by the different products you want to display. The metadata contains the following information:
created_at
: Indicates when the feed was created.currency
: Indicates the currency of the feedlang
: Indicates the language of the feed.shop
: Indicates the URL of the shop.source
: Indicates the platform information.version
: Indicates the version of the feed.
Languages and CurrenciesIf your online store has more than one language, each of the languages must have a different feed. For currencies, automatic exchange rates are applied for the different currencies you display on your online store. |
After the header, the different products of the catalogue are listed. Each product has various fields associated with them that allow you to enter the specifications of each of the items.
The way in which products without variations (or plain) and with variations of it (or variants) are presented differ. The upcoming sections present the necessary information for both kinds of products.
Plain Product Feed
This section displays the different fields shown in the feed.
After that, various specifications of the product are detailed in the feed. See the following tables to understand what each of them means.
Mandatory Fields
Each product is represented by a numerical ID (id
) followed by this mandatory data:
Field | Parameter | Type |
Description |
---|---|---|---|
name |
string |
Indicates a short name of the product. |
|
description |
string |
Indicates the description of the product. |
|
url |
string |
Indicates the URL of the product. |
|
images |
string |
Indicates the image displayed in the online store, including:
|
|
availability |
stock | string | Indicates the number of items in stock. |
price |
regular | string | Indicates the regular price (mandatory) |
on_sale | string | Indicates the price on sale (optional) |
Optional Fields
Field | Parameter | Type |
Description |
---|---|---|---|
short_description
|
string |
Indicates a short description of the product. |
|
category |
custom_category |
string |
Indicates the item category, which can be customised. |
code |
reference |
string |
Indicates the reference of the item. |
gtin |
string |
Indicates the Global Trade Item Number. |
|
mpn |
string |
Indicates the Manufacturer Part Number. |
|
isbn |
string |
Indicates the International Standard Book Number. |
|
color |
name |
string |
Indicates the colour of the item. |
hex |
string |
Indicates the HEX code of the colour. |
|
brand
|
string |
Indicates the brand of the product. |
|
is_new
|
boolean |
Indicates if it is a new brand. |
|
is_virtual
|
boolean |
Indicates if it is a virtual product. |
|
tags
|
string |
Indicates the tags associated with the item. |
Feed Example
Here’s a full example of a XML feed for a set of plain products, including the header and the list of products of that feed:
<?xml version="1.0" encoding="UTF-8"?>
<root>
<metadata>
<created_at>2021-03-19T10:21:42+01:00</created_at>
<currency>EUR</currency>
<lang>es</lang>
<shop>https://shop.motive.co/</shop>
<source>Motive/1.0.0; Magento</source>
<version>0.1.0</version>
</metadata>
<products>
<product>
<!-- MANDATORY FIELDS -->
<id>1</id>
<name>Test product 1</name>
<description>This is the description of the product 1</description>
<short_description>Short descrption 1</short_description>
<url>https://shop.motive.co/products/1</url>
<images>
<image>
<url>https://shop.motive.co/products/1.png</url>
<alt>Product image</alt>
</image>
</images>
<availability>
<stock>182</stock>
<allow_order>true</allow_order>
</availability>
<price>
<regular>11.0</regular>
<on_sale>7.9</on_sale>
</price>
<categories>
<category>1|Test category 1|>2|Test category 2</category>
<category>1|Test category 1|>2|Test category 3</category>
</categories>
<code>
<reference>928378943</reference>
<gtin>78236743</gtin>
<mpn>7466729022</mpn>
</code>
<!-- OPTIONAL FIELDS -->
<color>
<name>Yellow</name>
<hex>#F1C40F</hex>
</color>
<brand>Product brand</brand>
<is_new>false</is_new>
<is_virtual>true</is_virtual>
<tags></tags>
</product>
<product>
<!-- MANDATORY FIELDS -->
<id>2</id>
<name>Test product 2</name>
<description>This is the description of the product 2</description>
<short_description>Short descrption 2</short_description>
<url>https://shop.motive.co/products/2</url>
<images>
<image>
<url>https://shop.motive.co/products/2.png</url>
<alt>Product image</alt>
</image>
</images>
<availability>
<stock>50</stock>
<allow_order>false</allow_order>
</availability>
<price>
<regular>11.0</regular>
<on_sale>7.9</on_sale>
</price>
<categories>
<category>1|Test category|>3|Test category 3|>5|Test category 5|>6|Test category 6</category>
</categories>
<code>
<reference>XJAUGGS738</reference>
<gtin>HUIAUHSHBS</gtin>
</code>
<!-- OPTIONAL FIELDS -->
<color>
<name>Yellow</name>
<hex>#F1C40F</hex>
</color>
<brand>Product brand</brand>
<tags></tags>
<!-- CUSTOM FIELDS -->
<customattr1>Custom value1</customattr1>
<customattr2>Custom value2</customattr2>
<customattr3>Custom value3</customattr3>
</product>
</products>
</root>
Variant Product Feed
For products with variants, the fields of the feed are the same as the plain product feed. When a product contains variants, each product has a property with an array of the product's variations:
Field | Parameter | Type |
Description |
---|---|---|---|
id
|
string |
Indicates the ID number of the variant. |
|
url
|
string |
Indicates the URL of the variant. |
|
images
|
url
|
string |
Indicates the URL where the image of the variant is hosted. |
alt
|
string |
Indicates the alt text of the image of the variant. |
|
availability
|
stock
|
string |
Indicates the number of items of this variant in stock. |
allow_order
|
boolean |
Indicates if the variant can be ordered. |
|
price
|
regular
|
string |
Indicates the regular price |
on_sale
|
string |
Indicates the price on sale. |
|
code
|
reference
|
string |
Indicates the reference of the item. |
gtin
|
string |
Indicates the Global Trade Item Number. |
|
mpn
|
string |
Indicates the Manufacturer Part Number. |
|
isbn
|
string |
Indicates the International Standard Book Number. |
Here’s a full example of an XML feed for a set of variants, including the header and the list of products and variants of that feed:
<?xml version="1.0" encoding="UTF-8"?>
<root>
<metadata>
<created_at>2021-03-19T10:21:42+01:00</created_at>
<currency>EUR</currency>
<lang>es</lang>
<shop>https://shop.motive.co/</shop>
<source>Motive/1.0.0; Magento</source>
<version>0.1.0</version>
</metadata>
<products>
<product>
<!-- MANDATORY FIELDS -->
<id>1</id>
<name>Test product 1</name>
<description>This is the description of the product 1</description>
<short_description>Short descrption 1</short_description>
<url>https://shop.motive.co/products/1</url>
<images>
<image>
<url>https://shop.motive.co/products/1.png</url>
<alt>Product image</alt>
</image>
</images>
<availability>
<stock>182</stock>
<allow_order>true</allow_order>
</availability>
<price>
<regular>11.0</regular>
<on_sale>7.9</on_sale>
</price>
<categories>
<category>1|Test category 1|>2|Test category 2</category>
<category>1|Test category 1|>2|Test category 3</category>
</categories>
<code>
<reference>928378943</reference>
<gtin>78236743</gtin>
<mpn>7466729022</mpn>
</code>
<!-- OPTIONAL FIELDS -->
<color>
<name>Yellow</name>
<hex>#F1C40F</hex>
</color>
<brand>Product brand</brand>
<variations>
<variation>
<!-- CUSTOM/VARIATION FIELDS -->
<id>78346783467834</id>
<url>https://shop.motive.co/products/1/variant/1</url>
<images>
<image>
<url>https://shop.motive.co/products/1.png</url>
<alt>Product variant image 1</alt>
</image>
</images>
<availability>
<stock>16</stock>
<allow_order>true</allow_order>
</availability>
<price>
<regular>10</regular>
</price>
<code>
<reference>3456653456</reference>
<gtin>1345345</gtin>
<mpn>7276846783</mpn>
</code>
</variation>
<variation>
<!-- CUSTOM/VARIATION FIELDS -->
<id>78346783467834</id>
<url>https://shop.motive.co/products/1/variant/2</url>
<images>
<image>
<url>https://shop.motive.co/products/2.png</url>
<alt>Product variant image 2</alt>
</image>
</images>
<availability>
<stock>0</stock>
<allow_order>false</allow_order>
</availability>
<price>
<regular>10</regular>
<on_sale>150</on_sale>
</price>
<code>
<reference>EGRTHYHRHD</reference>
<gtin>ASDFASDF</gtin>
<mpn>BHJASBHJD</mpn>
</code>
</variation>
</variations>
</product>
<product>
<!-- MANDATORY FIELDS -->
<id>2</id>
<name>Test product 2</name>
<description>This is the description of the product 2</description>
<short_description>Short descrption 2</short_description>
<url>https://shop.motive.co/products/2</url>
<images>
<image>
<url>https://shop.motive.co/products/2.png</url>
<alt>Product image</alt>
</image>
</images>
<availability>
<stock>0</stock>
<allow_order>false</allow_order>
</availability>
<price>
<regular>77.56</regular>
</price>
<categories>
</categories>
<code>
<reference>764564</reference>
<gtin>234234</gtin>
</code>
<!-- OPTIONAL FIELDS -->
<color>
<name>Yellow</name>
<hex>#F1C40F</hex>
</color>
<variations>
<variation>
<!-- CUSTOM/VARIATION FIELDS -->
<id>78346783467834</id>
<url>https://shop.motive.co/products/2/variant/1</url>
<images>
<image>
<url>https://shop.motive.co/products/2.png</url>
<alt>Product variant image 2</alt>
</image>
</images>
<availability>
<stock>16</stock>
<allow_order>true</allow_order>
</availability>
<price>
<regular>10</regular>
</price>
<custom_attr>custom attr inside variation</custom_attr>
</variation>
</variations>
</product>
<product>
<!-- MANDATORY FIELDS -->
<id>3</id>
<name>Test product 3</name>
<description>This is the description of the product 3</description>
<short_description>Short descrption 3</short_description>
<url>https://shop.motive.co/products/3</url>
<images>
<image>
<url>https://shop.motive.co/products/3.png</url>
<alt>Product image</alt>
</image>
</images>
<availability>
<stock>177</stock>
<allow_order>false</allow_order>
</availability>
<price>
<regular>10.0</regular>
</price>
<categories>
</categories>
<code>
<reference>35645</reference>
<gtin>23424</gtin>
</code>
<!-- OPTIONAL FIELDS -->
<color>
<name>Yellow</name>
<hex>#F1C40F</hex>
</color>
</product>
</products>
</root>
Learn More
If this page wasn't aimed to the feed you use, or you are curious to know more about other integrations try following these pages:
- Integrating via JSON feed: Understands the steps you need to take to integrate a JSON feed.
- Integrating via Prestashop Module Manager: Learn the steps to integrate Motive Commerce Search using the Prestashop module manager.
Comments
0 comments
Please sign in to leave a comment.