Kit articles and sub order lines

Table of contents


There is occasionally a need to define an article in terms of other articles. This kind of article is called a kit article or structure article. For instance, let's say you have two physical articles:

  • A football.
  • A football pump.
You might want to have a kit article which consists of a football and a pump together.

The API allows you to create both the basic articles (the football and the pump), as well as the kit.

Creating kit articles

In ProcessArticle there is a tag called ArticleStructureSpecification which is used when creating a kit article.

The ArticleStructureSpecification is a list of StructureArticleDefinition tags which represent the articles which make up the kit. For each article which the kit contains, you will need to specify two things:

  • NumberOfItems - How many of this article which is contained in the kit.
  • SubArticleDefinition - The definition of the contained article. This tag is also an ArticleDefinition, just like the tag defining the kit article. The definition of the kit article is thus recursive in some sense.

Returning to the example of the football and the pump, to create a kit consisting of them both together, you would send in a ProcessArticle request for the kit along these lines:

  1. Specify ArticleNumber = Football and pump or something similar.
  2. The ArticleStructureSpecification list should have two elements of type StructureArticleDefinition. The first element would be defined like this:
    • NumberOfItems = 1.
    • SubArticleDefinition = the article definition of the football.
  3. And the second element would be defined like this:
    • NumberOfItems = 1.
    • SubArticleDefinition = the article definition of the football pump.
  4. In ArticleStructureSpecification, specify ArticleStructureType = StructureArticle.

Booking kit articles on orders

Booking the kit directly

If you have created a kit article as described above, then you may use the kit article just like any other article when you book orders. If you send in a ProcessOrder request and specify the article number of the "football and pump" kit, then the system will automatically translate this into an order for the correct physical articles which make up the kit.

Using sub order lines to make changes to a kit on the fly

When you call ProcessOrder to create an order, you may optionally specify a customer kit structure just for that order. The system will then book the order using the custom kit structure. The custom kit structure is sent as sub order lines.

For instance, say that you want certain customers to receive two footballs in their kit, instead of just one.

To accomplish this, you would call ProcessOrder with one order line for the "football and pump" kit. Then set SubOrderLineSpecification = RequestSpecification for the order line, and add two sub order lines:

  1. ArticleNumber = the article number of the football pump, NumberOfItems = 1,
  2. ArticleNumber = the article number of the football, NumberOfItems = 2.