How to Add or Import Items to a Quote Without Recalculation

available since 16.0

You can add or import items into a Quote (and other CLIC documents) without auto‑recalculating the whole document. When enabled in the Quote Type (via parameters.recalculations.runOnlySyntaxCheck), Add Items/Add Products actions run only the input‑generation phase and cache generated inputs for similar items; full recalculation is deferred until you trigger it (e.g., Recalculate/Recalculate Changed). For imports, you can also disable the extra recalculation step (both text area and column‑mapped) via parameters.recalculations.disableInImport.

To add and import items without recalculation, add the above mentioned parameters to Quote Type JSON configuration:

JSON
{
   "name":"default",
   "tabs":[],
   "parameters":{
      "recalculations":{
         "disableInImport":true,
         "runOnlySyntaxCheck":[
            "addProducts",
            "addItems"
         ]
      }
   }
}

Reuse Form Init Results When Adding Items

available since 18.0

If the line items use a Forms 2.0 logic, you can make the Init phase of the form run only once when you add items. Several line items with the same form logic are often added in one step, for example from the Browse modal or by import. In that case, Pricefx runs the Init phase for the first item. All other items with the same form logic reuse its result.

To enable this, list the commands in parameters.forms.staticInitPhase in the header type JSON configuration. The parameter works for Quote Types, Agreement & Promotion Types, Rebate Agreement Types, and Compensation Plan Types. You can combine it with runOnlySyntaxCheck:

JSON
{
   "name":"default",
   "tabs":[],
   "parameters":{
      "forms":{
         "staticInitPhase":[
            "addProducts",
            "addItems"
         ]
      },
      "recalculations":{
         "runOnlySyntaxCheck":[
            "addProducts",
            "addItems"
         ]
      }
   }
}

Commands that are not in the list run the Init phase for each item. A full recalculation always runs the Init phase for each item.

Use staticInitPhase only if the Init phase generates the same inputs for every item. If the Init phase reads api.currentItem() or builds a different layout per item, all items added in one step get the inputs of the first item. Values that the Init phase computes, such as random numbers or timestamps, are also the same for all these items.