Future price changes

Future price changes requires the use of StoreInfo schema version 1.6 or higher and is only supported by Shoppa versions 2.25 or higher.

Changing the price for a later date

Assume we have the following base price list to begin with. It has a start date of 2020-01-01

<storeInformation customerID="HQ" customerIDType="ExternalID" createDate="2020-01-01T12:51:18" 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>
        <product id="222222" idType="Code1">
            <field name="price" value="29.95" />
        </product>
        <product id="333333" idType="Code1">
            <field name="price" value="34.95" />
        </product>
        <product id="444444" idType="Code1">
            <field name="price" value="79.95" />
        </product>
    </package>
</storeInformation>

From 2020-01-15 we want to increase the price of product 111111 to 59.95 SEK. We also want to lower the price of 222222 to 19.95 and 444444 to 69.95 two weeks later.

Here we have to refer to the same package ID as the base price list if the changes are to be combined with the base price list at desired change date. Each package startdate in the XML defines when the changes will apply.

We have therefore created one package with startdate 2020-01-15 and one with startdate 2020-02-01 for the respective price changes.

<storeInformation customerID="HQ" customerIDType="ExternalID" createDate="2020-01-01T12:51:18" schemaVersion="1.6" xmlns="http://shoppa.com/storeInfoSchema">
    <package id="PL01" startDate="2020-01-15" countryCode="se">
        <product id="111111" idType="Code1">
            <field name="price" value="59.95" />
        </product>
    </package>
    <package id="PL01" startDate="2020-02-01" countryCode="se">
        <product id="222222" idType="Code1">
            <field name="price" value="19.95" />
        </product>
        <product id="444444" idType="Code1">
            <field name="price" value="69.95" />
        </product>
    </package>
</storeInformation>

The price of the product 333333remains the same at each change date.

Periodically changed price

If we want to reduce a price during a short period of time, for e.g. under a two month time. Afterwards we are to set the old price back again. We can not set a stopdate for the reduced price, instead we have to send the higher price on new.

<storeInformation customerID="HQ" customerIDType="ExternalID" createDate="2020-01-01T12:51:18" schemaVersion="1.6" xmlns="http://shoppa.com/storeInfoSchema">
    <package id="PL01" name="Central Pricelist" startDate="2020-01-01" countryCode="se">
        <product id="222222" idType="Code1">
            <field name="price" value="29.95" />
        </product>
    <package id="PL01" name="Central Pricelist" startDate="2020-02-01" countryCode="se">
        <product id="222222" idType="Code1">
            <field name="price" value="19.95" />
        </product>
    </package>
    <package id="PL01" name="Central Pricelist" startDate="2020-04-01" countryCode="se">
        <product id="222222" idType="Code1">
            <field name="price" value="29.95" />
        </product>
    </package>
</storeInformation>

The product will now be on a reduced priced during the two months between 2020-02-01 and 2020-03-31. At 2020-04-01 th eproduct will return to its original price.

Deleting future price changes

It is possible to remove a previously uploaded package in case it was incorrect. This will remove all price changes that were set to occur at the specific date.

We delete the price changes above for 2020-02-01 with this xml:

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

The price change at 2020-01-15 will still be in effect.

To remove individual products from future price changes, use the delete attribute on the product element, like so:

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

We have now deleted the change for product 444444.The change for product 222222 at 2020-02-01 will still remain.

Removing all future price changes for a product

Here we will send in a few price changes for the product 111111 over a period of time. We will have price changes at each package startdate.

<storeInformation customerID="HQ" customerIDType="ExternalID" createDate="2020-01-01T15:11:14" schemaVersion="1.6" xmlns="http://shoppa.com/storeInfoSchema">
    <package id="PL01" startDate="2020-02-01" countryCode="se">
        <product id="111111" idType="Code1">
            <field name="price" value="69.95" />
        </product>
    </package>
    <package id="PL01" startDate="2020-03-01" countryCode="se">
        <product id="111111" idType="Code1">
            <field name="price" value="64.95" />
        </product>
    </package>
    <package id="PL01" startDate="2020-04-01" countryCode="se">
        <product id="111111" idType="Code1">
            <field name="price" value="69.95" />
        </product>
    </package>
    <package id="PL01" startDate="2020-05-01" countryCode="se">
        <product id="111111" idType="Code1">
            <field name="price" value="59.95" />
        </product>
    </package>
</storeInformation>

To remove all future price changes for product 111111we have to delete the product from each future price change package with the same startdate defined as when the change were to occur. The XML will look like this:

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

Assuming we don't know when all the price changes for a product occurs, we can delete all prices for a product by sending in the product with an empty price value. The startdate of the package will determine from which date the prices are deleted.

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

All future price changes and the current price for product 111111 are now deleted, starting 2020-01-15.

Correct a future price change

<storeInformation customerID="HQ" customerIDType="ExternalID" createDate="2020-01-01T16:32:05" schemaVersion="1.6" xmlns="http://shoppa.com/storeInfoSchema">
    <package id="PL01" startDate="2020-02-01" countryCode="se">
        <product id="222222" idType="Code1">
            <field name="price" value="19.95" />
        </product>
    </package>
</storeInformation>

Here we have a price change for 2020-02-01. After a while it is decided that the product should have another price from the same startdate. Correcting the price change is accomplished by setting the new price for the same startdate.

<storeInformation customerID="HQ" customerIDType="ExternalID" createDate="2020-01-01T16:32:05" schemaVersion="1.6" xmlns="http://shoppa.com/storeInfoSchema">
    <package id="PL01" startDate="2020-02-01" countryCode="se">
        <product id="222222" idType="Code1">
            <field name="price" value="24.95" />
        </product>
    </package>
</storeInformation>

At 2020-02-01 the product will now have a price of 24.95 instead of the original 19.95.

Replacing an entire pricelist

Some time passes and we have made multiple changes to our pricelists at different times. For some reason we may have the need to replace all prices in a pricelist with new prices. Some products may no longer be relevant for example. We do this by setting the fullPackage attribute like this:

<storeInformation customerID="HQ" customerIDType="ExternalID" createDate="2020-04-15T16:32:05" schemaVersion="1.6" xmlns="http://shoppa.com/storeInfoSchema">
    <package id="PL01" startDate="2020-04-15" countryCode="se" fullPackage="true">
        <product id="111111" idType="Code1">
            <field name="price" value="49.95" />
        </product>
        <product id="222222" idType="Code1">
            <field name="price" value="29.95" />
        </product>
    </package>
</storeInformation>

Now there will no longer be a price for product 333333 or 444444 starting from 2020-04-15.

Last updated