Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Data should be validated before usage, especially data that is provided by the end - users, for example:

  • Logic inputs

  • Pricing Company Parameters that are updated by the end users

  • Prices from price - lists

In general, there are two courses of actions to take when a data validation fail.

When an issue can be resolved by the end - user, display a warning. The message in the warning should guide the end - user towards a resolution, for example:

  • Input is missing a required value.

  • Text input is incorrectly formatted.

  • A number input is exceeding a limit.

  • A pricing company parameter is missing.

  • The results from previous elements are missing, or invalid, due to invalid user input.

...

When an issue cannot be resolved by the end - user or a calculation cannot be finalized, throw an exception. To recover from these fatal issues, typically a super - user or a support engineer would need to be involved. Examples of fatal issues are:

  • When a required Required configuration is missing.

  • When integration Integration with a third-party service has failed and required data is missing.

...

  • “Customer 10000123 is missing ShipTo location”

  • Target margin is not defined for product family D123 in PP TargetMargin“

Tip

Throw exceptions with api.throwException(). The message on the screen will be more end- user friendly than when using throw new Exception().

...