Ongoing Warehouse Developer

Order line identification

When creating an order or inorder, the API expects that an article will never appear on two or more distinct order lines.

Special care needs to be taken if you want to send in the same article on several different order lines.

Solution 1: Summarization

It is possible for Ongoing to set up the system so that it will summarize all order lines for the same article into a single order line.

Note: this is a setting which needs to be turned on. It has not necessarily been turned on for your integration. If you wish to use summarization, you need to verify that it has been turned on.

For example, let's say you call ProcessOrder or ProcessInOrder and specify OrderLineIdentification = ArticleNumber. If you send in four order lines like so:

  1. Article number AN1, quantity 5.
  2. Article number AN1, quantity 7.
  3. Article number AN2, quantity 10.
  4. Article number AN2, quantity 15.
If you have summarization turned on, then you will end up with an order in Ongoing with the following lines:
  1. First order line is for article number AN1, with quantity 12 (i.e. 5 + 7).
  2. Second order line is for article number AN2, with quantity 25 (i.e. 10 + 15).
If you have summarization turned off, then the system will use the last order line for each article you sent in. It is very unlikely that this is the desired behavior. In our example, this means that you will end up with:
  1. First order line is for article number AN1, with quantity 5.
  2. Second order line is for article number AN2, with quantity 15.

Solution 2: Identify each order line separately

Summarization will work for most cases, but for some integrations it is important to keep the original order lines intact.

Note: being able to identify each order line separately is also a setting which needs to be turned on. It has not necessarily been turned on for your integration.

In order to do that, you must specify a unique identifier for each order line. You might have such an identifier available in the system which is being integrated, but otherwise you can use a simple counter like 1, 2, 3, etc. The identifier only needs to be unique per order, it does not have to be globally unique.

To inform the system that you want the to keep the order lines intact, specify OrderLineIdentification = ExternalOrderLineCode in the call to ProcessOrder or ProcessInOrder. Then use the tag ExternalOrderLineCode to specify each order line's unique identifier. Using the same example as before, if you were to send in this:

  1. Article number AN1, quantity 5, ExternalOrderLineCode = 1.
  2. Article number AN1, quantity 7, ExternalOrderLineCode = 2.
  3. Article number AN2, quantity 10, ExternalOrderLineCode = 3.
  4. Article number AN2, quantity 15, ExternalOrderLineCode = 4.
Then the system would create four distinct order lines.