Import work order rows

Prerequisites

  • You should read this section before proceeding to get necessary background info about work orders (WO) and variation orders (VO)
  • Work order rows can only be posted to existing work orders or variation orders in Next. It is therefore important in the integration to make sure that the WO or VO is created before trying to post work order rows.
  • If you want to leverage the built in logic for framework contract, project specific and/or customer specific prices all articles should have a unique codeno in the price list registry in Next and no price should be specified when posting the WO rows to Next. The Next article number is stored in field codeno.
  • There are a number of fields that are only applicable to customers running the Next module payoff (avräkning) such as commissionpercent, factorypricelistid, ispayoff, payoffunitprice and resourceid. Make sure to ignore these fields if payoff is not used.

Limitations

The following limitations apply to the handling of work order rows

  • No support for handling the flow to generate work order rows based on row level interpretation of incoming supplier invoices via Next E-invoice.
  • No support for stating which price list should be used for fetching price. If the customer has multiple price lists containing articles with the same codeno this means that an exact match cannot be made.

Relevant endpoints

Create row: POST /workorderrow/

Update row: PUT /workorderrow/

Process

When order rows are posted to Next, the following logic will apply

  1. If Next can match codeno with an article in the article registry and one of the following fields do not have a value at posting time, that information will be automatically fetched from the price list registry
    1. priceunit
    2. priceunitpricelist (if priceunit is fetched from price list this field will display which one)
    3. costunit
    4. costunitpricelist (if costunit is fetched from price list this field will display which one)
    5. payoffunitprice (if payoff module activated)
    6. payoffunitpricelist (if payoffunitprice is fetched from price list this field will display which one)
  2. If no price is specified when posting a row (i.e. priceunit not set), price will be fetched from the pricelist registry in Next based on codeno and according to built in logic for framework contract, project specific and customer specific prices.
    1. If there is more than 1 article with the same codeno the first match will be retrieved.
    2. Price will be fetched according to following priority
      1. Project specific price
      2. Framework contract
      3. Customer specific price
  3. If a price is specified when posting a row (also applies if priceunit is '0'), the given price will be set without regard to built in logic for project specific, framework contract and customer specific prices.

In addition to the above logic the following needs to be kept in mind when integrating:

  • If rows are created for calculating costs plannedquantity should be used instead of usedquantity
  • If rows are created that should not be shown in the mobile client showinmobile should be set to false.
  • If rows are created that should not be picked up by customer invoices chargeable should be set to false.