Setting Pricing-Relevant Defaults During Line Item Creation

Prev Next

Setting Pricing-Relevant Defaults During Line Item Creation

When creating a new line item, default values that are relevant for pricing must be set before the initial pricing calculation is executed.

For the standard Create Line Item flow, use the AFTER_CREATE_SALESITEM IMC script group to set such values.

Processing Sequence

The line item creation process follows this sequence:

  1. Create and persist the Sales Item with its product and configuration context.
  2. Apply configuration defaults and triggers.
  3. Execute the AFTER_CREATE_SALESITEM IMC script group.
  4. Perform BOM explosion.
  5. Execute internal pricing.
  6. Execute Post Line Item Addition Groovy.

Configuration Guidance

Use AFTER_CREATE_SALESITEM when a value assigned during line item creation must be considered by the initial pricing calculation.

The script should:

  • Apply only to the newly created Sales Item.
  • Set the required pricing-relevant values before pricing is executed.
  • Use the active Sales Item context to identify the newly created line item.
  • Be idempotent within the creation event, where necessary.
  • Be limited to the creation lifecycle and should not be triggered by subsequent Save, Price, or Update operations.

Post Line Item Addition Groovy

Post Line Item Addition Groovy is executed after the initial internal pricing calculation. Therefore, it should not be used to set values that are expected to influence the initial pricing result.

Use Post Line Item Addition Groovy only for logic that is intended to run after the line item has been created and initially priced.

Recommendation: Use AFTER_CREATE_SALESITEM for pricing-relevant initialization during line item creation. Use Post Line Item Addition Groovy for post-processing that does not need to influence the initial pricing calculation.