Pricelists

This describes StoreInfo schema version 1.6.

While most product information is static over time, prices are not. Stores have different prices for the same product and prices change at different times. This information is stored in pricelists which is one kind of StoreInformation package.

In contrast to products and campaigns, pricelists are not automatically inherited along the customer tree. A store uses the pricelist named STANDARD from its own node by default, but a named pricelist from a parent node can be explicitly selected instead.

Pricelists are described by packages with a name and a start date, but no stop date. If no name is provided, the default name STANDARD is assumed. If you also provide a package id, you can later use this to refer to that package instead of using name + start date.

Mediablob primarily identifies packages by id + countryCode. If id is not provided, the package is identified by name + countryCode. We recommend using the id for identification when possible. This behaviour is different from previous versions of the api and should be considered when updating existing integrations.

Prices are changed by sending a new package with the same name for a later date.

Lets build a pricelist from scratch and see how it evolves with different requirements.

A basic pricelist

Lets say store S123 wants to sell our sample product for 205 SEK. The price is valid from September 21st, 2008. The corresponding xml format for creating a standard pricelist is:

<storeInformation customerID="HQ" customerIDType="ExternalID" createDate="2020-01-01T14:01:00" schemaVersion="1.6" xmlns="http://shoppa.com/storeInfoSchema">
    <package id="PL01" startDate="2020-01-01" countryCode="se">
        <product id="111111" idType="Code1">
            <field name="price" value="49.95" />
        </product>
    </package>
</storeInformation>

Creating a named pricelist

Some stores may use a mutual pricelist. In this case HQ wants to publish a named pricelist the stores can subscribe to. We create the same pricelist above as a named pricelist. We use an id from the HQ ERP system for future tracking and updates. Here is the xml we need:

<storeInformation customerID="HQ" customerIDType="ExternalID" createDate="2020-01-01T14:01:15" schemaVersion="1.6" xmlns="http://shoppa.com/storeInfoSchema">
    <package id="PL01" name="Central Pricelist" startDate="2020-01-01" countryCode="se">
        <product id="111111" idType="Code1">
            <field name="price" value="49.95" />
        </product>
    </package>
</storeInformation>

Adding a product to an existing pricelist

Now we want to add two other products to the named pricelist. The xml for this is:

<storeInformation customerID="HQ" customerIDType="ExternalID" createDate="2020-01-01T09:00:00" schemaVersion="1.6" xmlns="http://shoppa.com/storeInfoSchema">
    <package id="PL01" startDate="2020-01-01" countryCode="se">
        <product id="222222" idType="Code1">
            <field name="price" value="29.95" />
        </product>
        <product id="333333" idType="Code1">
            <field name="price" value="34.95" />
        </product>
    </package>
</storeInformation>

After this, the pricelist contains three priced products.

Deleting a complete pricelist

We finally decide to restructure our pricelist system and want to delete a pricelist completely. We do this by setting the delete attribute but omitting the startDate. The xml for this is simply:

<storeInformation customerID="HQ" customerIDType="ExternalID" createDate="2020-01-01T15:11:14" schemaVersion="1.6" xmlns="http://shoppa.com/storeInfoSchema">
    <package id="PL01" countryCode="se" delete="true" />
</storeInformation>

Removing a product from the pricelist

In addition to deleting a complete pricelist you also have the option to remove a selection of products from the existing pricelist. Instead of defining the delete attribute in the package tag, it will be set in the product tag. The xml for this is simply:

<storeInformation customerID="HQ" customerIDType="ExternalID" createDate="2020-01-01T15:11:14" schemaVersion="1.6" xmlns="http://shoppa.com/storeInfoSchema">
    <package id="PL01" countryCode="se">
        <product id="111111" idType="Code1" delete="true" />
    </package>
</storeInformation>

Last updated