Campaigns describe temporary prices used at one or more stores for a specific time period. Campaigns are usually used to show customers the original price and how much they save during the campaign. For this reason, campaigns are layered on top of the stores pricelist when used by Shoppa.
Like pricelists, campaigns are described in a StoreInformation package
. Campaigns are always created with a start- and a stopdate and they always need a name that can be used in Shoppa Client to select it.
As with pricelists, campaigns can be identified with name
, startDate
and countryCode
, but for simplicity we recommend using a reliable id
instead.
A campaign can not be converted to a pricelist and vice versa. If you create the wrong kind of package you need to delete the package and create a new one from scratch.
Lets make a 50% off campaign for our sample glass 65467-14
from October 1st - 4th. The xml for this is:
We decide to postpone our campaign one day and extend it to a full week. If we simply set a new startDate we would update product prices at that date rather than of changing the startdate of the entire campaign. Moving the campaign thus requires us to use the attribute newStartDate
:
What campaigns to run in an organization may be known a long time at HQ, but it may be sensitive to tell the stores too early and risk informing customers and competitors. By setting the visibleStartDate
attribute you decide how long beforehand the stores see the campaign. All users at HQ still see the campaign in their clients and can validate its content.
Similarly, some stores may want access to campaigns after they formally end, to run them a little longer and get rid of excess stock. To keep the campaign visible in Shoppa Client after the campaign ends you set the visibleStopDate
attribute.
A product can have complement products assigned to it specifically in a campaign. You can also assign campaign information to the complement products as you are assigning them. Note that values cannot be set with the value
attribute, they have to be contained by the field
element.
You should also add the attribute complementBehaviour
to the product element. This takes one of three values and determines the way complement products are added and/or removed. The accepted values are replace
, delete
and merge
. They do the following:
Replace: Removes all existing complement products and replaces them with the new ones. This is the default option.
Delete: Removes all existing complement products. Any new complement products will be ignored.
Merge: Adds the new complement products to the set of existing ones.
If a campaign should be removed completely, that can be achieved by setting the delete
attribute in the package
tag. We refer to the campaign by defining the corresponding id
, startDate
, and stopDate
. The xml for this is simply:
If we instead only want to remove a selection of products from the campaign, we set the delete
attribute in the product
tag. The xml for this is simply: