Productgroups

This describes Product Group schema version 1.1.

Product groups is used for creating a hierarchy of products. It makes it easier for the users to do the search by brand or by product type. Much like pricelists, product groups are not inherited along the customer tree automatically, only stores that subscribe to the the product groups can see them.

Usage

Subscriptions

Managing the product group subscriptions cannot currently be done through the API, it needs to be done through Mediablob.

Subscribing to product groups is all or nothing, the store either has access to the full set of product groups, or none at all.

Function call

Use the function call UploadProductGroupsXml to upload your product group xml.

Structure

The product groups are a hierarchy where each group can contain a number of subgroups, which in turn can have their own subgroups, etc. Each group must have its own unique ID. Shoppa places no particular restrictions on these ID:s, so we recommend that you mirror existing ID:s in whichever system you are using. Each group must also contain at least one text element, specifiying the name of the group. The group names can be specified by language, so that different users can have different group names, but bear in mind that the group structure and its contents will be the same.

The full definition of the product groups is done in two parts: first the structure is defined as per above, and then the products are assigned to their groups using the groups ID. Note that a product can belong to multiple groups.

<?xml version="1.0" encoding="UTF-8"?>
<productGroups customerID="" customerIDType="" createDate="2016-08-25T01:01:33Z" xmlns="http://shoppa.com/productGroupsSchema">
    <groups>
        <group id="">
            <texts>
                <text languageCode="" name="" />
            </texts>
            <groups>
                <group id="">
                    <texts>
                        <text languageCode="" name="" />
                        <text languageCode="" name="" />
                    </texts>
                </group>
            </groups>
        </group>
    </groups>
    <products>
        <product id="" idType="">
            <group ref="" />
            <group ref="" />
        </product>
    </products>
</productGroups>

Changing the structure

The group structure cannot be edited. If a change is required you need to send the entire structure again. Note that products can still be added to groups without having to resend the entire structure.

Examples

Basic product groups

<?xml version="1.0" encoding="UTF-8"?>
<productGroups customerID="1143" customerIDType="ShoppaID" createDate="2019-08-25T01:01:33Z" xmlns="http://shoppa.com/productGroupsSchema">
    <groups>
        <group id="1">
            <texts>
                <text languageCode="xx" name="Gardening" />
            </texts>
        </group>
        <group id="2">
            <texts>
                <text languageCode="xx" name="Interior decoration" />
            </texts>
        </group>
        <group id="3">
            <texts>
                <text languageCode="xx" name="Plumbing" />
            </texts>
        </group>
    </groups>
    <products>
        <product id="91234" idType="Code1">
            <group ref="1" />
        </product>
        <product id="92345" idType="Code1">
            <group ref="2" />
        </product>
        <product id="93456" idType="Code1">
            <group ref="3" />
        </product>
    </products>
</productGroups>

Nested groups with multiple languages

<?xml version="1.0" encoding="UTF-8"?>
<productGroups customerID="1143" customerIDType="ShoppaID" createDate="2016-08-25T01:01:33Z" xmlns="http://shoppa.com/productGroupsSchema">
    <groups>
        <group id="1">
            <texts>
                <text languageCode="xx" name="Plants" />
                <text languageCode="sv-SE" name="Växter" />
                <text languageCode="no-NO" name="Planter" />
            </texts>
            <groups>
                <group id="11">
                    <texts>
                        <text languageCode="xx" name="Vegetables" />
                        <text languageCode="sv-SE" name="Grönsaker" />
                        <text languageCode="no-NO" name="Grønnsaker" />
                    </texts>
                </group>
                <group id="12">
                    <texts>
                        <text languageCode="xx" name="Flowers" />
                        <text languageCode="sv-SE" name="Blommor" />
                        <text languageCode="no-NO" name="Blomster" />
                    </texts>
                    <groups>
                        <group id="121">
                            <texts>
                                <text languageCode="xx" name="Perennials" />
                                <text languageCode="sv-SE" name="Perenner" />
                                <text languageCode="no-NO" name="Stauder" />
                            </texts>
                        </group>
                        <group id="122">
                            <texts>
                                <text languageCode="xx" name="Annuals" />
                                <text languageCode="sv-SE" name="Annueller" />
                                <text languageCode="no-NO" name="Årbøker" />
                            </texts>
                        </group>
                    </groups>
                </group>
            </groups>
        </group>
        <group id="2">
            <texts>
                <text languageCode="xx" name="Gardening tools" />
                <text languageCode="sv-SE" name="Trädgårdsverktyg" />
                <text languageCode="no-NO" name="Hageredskap" />
            </texts>
        </group>
    </groups>
    <products>
        <product id="91234" idType="Code1">
            <group ref="11" />
            <group ref="12" />
        </product>
        <product id="92345" idType="Code1">
            <group ref="12" />
        </product>
        <product id="93456" idType="Code1">
            <group ref="121" />
        </product>
        <product id="94567" idType="Code1">
            <group ref="122" />
        </product>
        <product id="95678" idType="Code1">
            <group ref="2" />
        </product>
    </products>
</productGroups>

Last updated