Versions Compared

Key

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

At the end of this lesson you will be able to:

  • explainExplain, how to implement the calculation of line items of a Quote.

    • explainExplain, how to ask user for inputs (i.e., create input fields).

What

is

Is a Quote

Document A document for negotiation of product prices and other conditions.

QuoteHeaderScreenShot Godfather QuoteLineItemScreenShot GodFather

...

Use Cases

Add Line Item

QuoteAddingLine
Code Block
languagegroovy
themeMidnight
titleCreate new input field
linenumbersfalse
if (api.isSyntaxCheck()) {
    api.userEntry("Quantity")                       // ❶
    api.getParameter("Quantity").setRequired(true)  // ❷
}

during During Syntax Check mode, this function builds a definition for an input field.
retrieve Retrieves reference to the input field definition and sets it additionally to be as required.

Code Block
languagegroovy
themeMidnight
titleRead value provided by the user in the input field - several examples with the same result
linenumbersfalse
// allAll these samples work only in regular execution (i.e., not in Syntax Check mode)
input.Quantity
input["Quantity"]
api.input("Quantity")
api.userEntry("Quantity")

Recalculate Line Items

QuoteCalculationFlow

Configuration / Implementation of Quote

The configuration/implementation of a Quote usually consist of many things. This Handbook focuses only on the simple implementation.

  1. Simple implementation:

    • Line Item Logic

    • Quote Type setup

  2. Common implementation also has:

    • Header Logic

    • System Configuration Options

    • Approval Workflow

    • Price Record Mapping

Line Item Logic

The Quote Line Item logic typically does:

  • create Creates input fields for the line item.

    • this This is done only once, when the new line item is added. The logic will be executed in Syntax Check mode to collect the input fields for the SKU. And the system will store those input fields definitions on the line item.

  • calculate Calculates the results for the SKU on the line item.

    • this This is called for action each time, when the user re-calculates the Quote.

Quote Type Setup

The Quote Type describes, which logics will be used to perform various operations with the Quote.

You can find the types under Quoting  Quote Types.

It sets:

  • the Line Item logic - which Which logic will be used for every line of the Quote, to create it’s its input fields, and to calculate its results. The only exception is, if the SKU would have a logic setup set on the Product level (i.e., in the Product Master table).

  • the Header Logic - which Which logic is will be used to prepare header input fields and calculate aggregated overall results of the Quote.

  • the Workflow logic - which Which logic will prepare the approval Steps steps for the Quote after Submission.