Skip to content

Importing Products

Any integration with Sprii starts by ensuring that Sprii is aware of the products you want to sell.

The easiest way to achieve this is by importing a Google Shopping feed. Setting up the product feed importer in the Sprii Admin is quick and simple.

Once the products are imported into Sprii, you can add them to your campaigns and clips.

Product Feed Format

The product feed should follow the format of a Google Shopping feed. Here's an example feed:

xml
<rss xmlns:g="http://base.google.com/ns/1.0" version="2.0">
	<channel>
		<title>Sprii demo shop</title>
		<link>https://spriidemoshop.com/</link>
		<description>The sprii demo shop</description>
		<item>
			<g:id>460</g:id>
			<g:title>Nice pants (Medium, Blue)</g:title>
			<g:description>Fits any occation</g:description>
			<g:link>https://spriidemoshop.com/products/nice-pants</g:link>
			<g:image_link>https://cdn.spriidemoshop.com/images/collections/144/primary.png</g:image_link>
			<g:additional_image_link>https://cdn.spriidemoshop.com/images/collections/144/packshot.png</g:additional_image_link>
			<g:availability>in stock</g:availability>
			<g:price>14.99 EUR</g:price>
			<g:sale_price>9.99 EUR</g:sale_price>
			<g:brand>Sprii</g:brand>
			<g:size>Medium</g:size>
			<g:color>Blue</g:color>
			<g:item_group_id>144</g:item_group_id>
			<g:gtin>12345678901231</g:gtin>
		</item>
		<item>
			<g:id>461</g:id>
			<g:title>Nice pants (Large, Blue)</g:title>
			<g:description>Fits any occation</g:description>
			<g:link>https://spriidemoshop.com/products/nice-pants</g:link>
			<g:image_link>https://cdn.spriidemoshop.com/images/collections/144/primary.png</g:image_link>
			<g:additional_image_link>https://cdn.spriidemoshop.com/images/collections/144/packshot.png</g:additional_image_link>
			<g:availability>in stock</g:availability>
			<g:price>14.99 EUR</g:price>
			<g:sale_price>9.99 EUR</g:sale_price>
			<g:brand>Sprii</g:brand>
			<g:size>Large</g:size>
			<g:color>Blue</g:color>
			<g:item_group_id>144</g:item_group_id>
			<g:gtin>12345678901232</g:gtin>			
		</item>
		<item>
			<g:id>462</g:id>
			<g:title>Nice pants (Medium, Black)</g:title>
			<g:description>Fits any occation</g:description>
			<g:link>https://spriidemoshop.com/products/nice-pants</g:link>
			<g:image_link>https://cdn.spriidemoshop.com/images/collections/144/primary.png</g:image_link>
			<g:additional_image_link>https://cdn.spriidemoshop.com/images/collections/144/packshot.png</g:additional_image_link>
			<g:availability>in stock</g:availability>
			<g:price>14.99 EUR</g:price>
			<g:sale_price>9.99 EUR</g:sale_price>
			<g:brand>Sprii</g:brand>
			<g:size>Medium</g:size>
			<g:color>Black</g:color>
			<g:item_group_id>144</g:item_group_id>
			<g:gtin>12345678901233</g:gtin>
		</item>
		<item>
			<g:id>463</g:id>
			<g:title>Nice pants (Large, Black)</g:title>
			<g:description>Fits any occation</g:description>
			<g:link>https://spriidemoshop.com/products/nice-pants</g:link>
			<g:image_link>https://cdn.spriidemoshop.com/images/collections/144/primary.png</g:image_link>
			<g:additional_image_link>https://cdn.spriidemoshop.com/images/collections/144/packshot.png</g:additional_image_link>
			<g:availability>in stock</g:availability>
			<g:price>14.99 EUR</g:price>
			<g:sale_price>9.99 EUR</g:sale_price>
			<g:brand>Sprii</g:brand>
			<g:size>Large</g:size>
			<g:color>Black</g:color>
			<g:item_group_id>144</g:item_group_id>
			<g:gtin>12345678901234</g:gtin>
		</item>
		<item>
			<g:id>464</g:id>
			<g:title>Butterfly</g:title>
			<g:description>The only Butterfly you will need</g:description>
			<g:link>https://spriidemoshop.com/products/butterfly</g:link>
			<g:image_link>https://cdn.spriidemoshop.com/images/collections/464/primary.png</g:image_link>
			<g:additional_image_link>https://cdn.spriidemoshop.com/images/collections/464/packshot.png</g:additional_image_link>
			<g:availability>in stock</g:availability>
			<g:price>20.00 EUR</g:price>
			<g:sale_price>15.00 EUR</g:sale_price>
			<g:brand>Sprii</g:brand>
			<g:gtin>12345678901234</g:gtin>
			<g:custom_json>{&quot;field_id_1&quot;:&quot;field_value_1&quot;, &quot;field_id_2&quot;:13}</g:custom_json>
		</item>	
	</channel>
</rss>

In this example, products 460, 461, 462, and 464 will be grouped as one product in Sprii, with options to choose color and size. Product 464 will be imported as a simple product.

Mapping

Feed IDSprii FieldUsage
idproduct_idSDK
titlenamePlayer, Overlays, SOME Messages
gtinskuSDK
pricepriceSDK, SOME Messages
linkurlPlayer, Overlays, SOME Messages
sale_pricepricePlayer, Overlays, SOME Messages
image_linkimagePlayer, Overlays, SOME Messages
availabilityinventoryPlayer, Overlays, SOME Messages
  • If the feed has both a price and a sale_price value, then sale_price is set as the product price, and price is set as the regular price.
  • If availability has the value in stock or in_stock, then the product is sellable.

Custom Attributes

All product events in the SDK have an optional property called custom_attributes. These properties can help you when integrating with a shop's basket logic.

For example, the product_id or sku may not provide enough information to add a product to a basket. You may also need additional information from custom fields in the feed.

In the Sprii Admin, you can select the fields you want to make available as custom_attributes. If the content of the field is a valid JSON string, it will be converted to an object. For example:

XML
<g:custom_json>{&quot;field_id_1&quot;:&quot;field_value_1&quot;, &quot;field_id_2&quot;:13}</g:custom_json>

Will be converted to:

JSON
{
    "custom_attributes": {
        "custom_json": {
            "field_id_1": "field_value_1",
            "field_id_2": 13
        }
    }
}

Alternative Methods

If you don't have a product feed, there are alternative ways to make products available on Sprii.

Excel Upload

Sprii supports file upload. You can download the template for this in the Sprii Admin.

Sprii Pulls Products from Your API

If your e-commerce platform has an API for fetching products, we can integrate with it.

Your Platform Sends Products to Sprii

You can also use our API to send products to Sprii. You can find the API documentation here.