This chapter covers the following topics:
Defaulting rules enable you to create and update quotes easily. Based on the setup, appropriate fields in the quote are automatically filled in. Oracle Quoting has seeded defaulting rules that mirror the behavior of the application when defaulting was hard coded. However, you have the flexibility to disable the seeded rules and add your own.
You can enable defaulting rules by setting the ASO: Enable Defaulting Rule profile to Yes. See Profile Options for Defaulting for more details.
The following sections explain some terms that are part of the defaulting rules setup.
Defaulting rules populate values into fields in a quote (both header and line). You can define the rules and the sequence in which the defaulting must take place. You can also define the trigger and dependant fields.
You can set up defaulting rules such that most of the mandatory and business rules-centric fields are taken care of. By doing so, you can focus on other aspects of the quote.
Entities represent specific flows in Oracle Quoting when defaulting should occur. The entities in Quoting are Quote Header, Quote Line, and Quote Oppty.
Quote Header
Applicable to Create Standalone Quote and Update Quote (all quotes) flows
Quote Line
Applicable to Create Standalone Quote and Update Quote (all quotes) flows
Quote Oppty
Applicable only to Create Quote from Opportunity flow
Defaulting condition templates act like top-level filters based on which the corresponding defaulting rules are executed. Entities are the conditions for the filters. Each entity has attributes. Defaulting rules are applicable to these attributes within an entity.
For example, Payment Type and Customer are entities. The attributes for these entities are Credit card and Business World respectively. Always is a generic condition.
Attributes are individual fields in the quote. Defaulting rules are created for some of the quote attributes. The defaulting rule indicates what the default value for the attribute should be and the source from where it should be derived. Based on the defaulting condition, the corresponding defaulting rule is chosen for the attribute.
The source types provide default values for the quote attributes. The following are the seeded source types for Oracle Quoting.
Source Type | Meaning |
---|---|
Same Record | Using ‘Same Record’ as a source type, you can default an attribute from another attribute on the same entity record. For example-
|
System Variable | This system variable source option enables you to default system variables or functions of system variables for a field. This may be used to default date fields where SYSDATE expression or functions on SYSDATE can be used to default the current date or a function of the current date. For example, you can set up the quote expiration date to be SYSDATE+30. |
Constant Value | This source type enables you to specify a constant value instead of a field that contains a value. This will be useful if you want the default to be the same value or to be used if none of the other sources for the defaulting rule can provide a value. |
Profile Option | This allows you to use a profile option, either system or user-defined, as a default value source. |
PL/SQL API | This source type allows you to set up a complex defaulting rule that cannot be defined with the other source types listed above. The logic to derive the default value is coded into a PL/SQL API. The API name is referenced within the defaulting rule setup. See Seeded API Signature for PL/SQL for more information. |
Related Record | The related record can derive values from the corresponding field in the Quote Header.
Important: This source type is applicable only for line-level attributes. |
Web Applications Dictionary-Attribute and Web Applications Dictionary - Object Attribute |
Important: Both these source types are not supported in Oracle Quoting. |
Sequencing is the order in which the defaulting rules will be applied. Each attribute is associated with a value which determines its sequence.
A trigger attribute has one or more dependent attributes that must be defaulted into when the trigger attribute's value is changed. A dependent attribute must be cleared and defaulted if the corresponding trigger attribute is changed. For example, a defaulting rule can be defined to derive a value for the payment terms and price list attributes if the pricing agreement is changed. In this example, the pricing agreement is the trigger attribute and the payment terms and price list are dependent attributes.
In Oracle Quoting, you can enable dependencies via the Dependency Enabled flag. While setting up trigger and dependent attributes, it is important not to setup cyclical dependencies. Thus, if trigger attribute A has dependent attributes B, C, D and trigger attribute C has dependent attribute A, then there is a cyclical dependency for attribute A. This type of cyclic dependency should be avoided.
The tables below indicate the seeded mapping between the trigger and the dependent attributes. The current dependencies are enabled by setting the Dependency Enabled flag. You may disable a dependency between the trigger and dependent attributes by setting this flag to No.
Trigger Attribute | Dependent Attribute | Seeded Value for Dependency Enabled (Yes/No) |
---|---|---|
Operating Unit | Order Type Price List Primary Salesperson Contract Template Shipping Method |
Yes Yes Yes Yes Yes |
Order Type | Price List Shipping Priority Shipping Method FOB Demand Class Freight Terms |
Yes No No No No No |
Pricing Agreement | PO Number Payment Terms Bill to Customer Bill to Customer Account Freight Terms Price List |
No Yes No No No Yes |
Quote to Customer | Quote to Contact Quote to Address Quote to Phone Bill to Customer Bill to Customer Account Bill to Contact Bill to Address Ship to Customer Ship to Customer Account Ship to Contact Ship to Address End Customer End Customer Account End Customer Contact End Customer Address Automatic Pricing Automatic Tax |
No Yes Yes Yes Yes No Yes Yes Yes No Yes No No No No No No |
Quote to Customer Account | Price List FOB Freight Terms Requested Date Type |
Yes No No Yes |
Bill to Customer Account | Price List FOB Freight Terms Payment Terms Primary Salesperson Shipping Method Order Type |
No No No No No No No |
Bill to Address (Party Site) - If Bill to Customer Account is specified | Price List FOB Demand Class Freight Terms Payment Terms Primary Salesperson Shipping Method Order Type |
No No No No No No No No |
Ship to Customer Account | Price List FOB Freight Terms Payment Terms Primary Salesperson Shipping Method Order Type |
No No No No No No No |
Ship to Address (Party Site) - If Ship to Customer Account is specified) | Price List FOB Demand Class Freight Terms Payment Terms Primary Salesperson Shipping Method Order Type |
No No No No No No No No |
Price List | Payment Terms Freight Terms Shipping Method |
No No No |
Primary Salesperson | Primary Salesgroup | Yes |
Trigger Attribute | Dependent Attribute | Seeded Value for Dependency Enabled (Yes/No) |
---|---|---|
Line Type | Price List Shipment Priority FOB Demand Class Freight Terms Warehouse |
No No No No No No |
Pricing Agreement | PO Number Payment Terms Bill to Customer Bill to Customer Account Freight Terms Price List |
No No No No No Yes |
Bill to Customer Account | Price List FOB Freight Terms Payment Terms Shipping Method |
No No No No No |
Bill to Address (Party Site) - If Bill to Customer Account is specified) | Price List FOB Demand Class Freight Terms Payment Terms Shipping Method |
No No No No No No |
Ship to Customer Account | Price List FOB Freight Terms Payment Terms Shipping Method |
No No No No No |
Ship to Address (Party Site) - If Ship to Customer Account is specified) | Price List FOB Demand Class Freight Terms Payment Terms Shipping Method |
No No No No No No |
Price List | Payment Terms Freight Terms Shipping Method |
No No No |
If you change the seeded dependencies, you must run the Order Capture Dependency concurrent program. See Order Capture Dependency Generator concurrent program for more details.
Here are some scenarios where defaulting rules can be setup. You can also set up business rules that are specific to one or more operating units.
Default the Price List attribute at the header level based on the value of Bill To Customer.
Default the Primary Salesperson based on the Quote To Customer.
Change the defaulting logic for deriving the expiration date. Instead of using the profile, define the new logic in a PL/SQL API. The PL/SQL API will be the source for defaulting the value in the expiration date field. See Seeded API Signature for the PL/SQL Source Type for the seeded PL/SQL API source type signature.
Some notes about defaulting rules:
The price list defaulting is not filtered by currency. After the price list defaulting, if the new price list and existing currency combination is not valid or no conversion exists for it, then the price list is cleared.
Oracle Quoting does not preserve an existing value for a field if the defaulting rule does not come up with a value for it.
If Terms Substitution modifiers have been set up, the values in the Payment Terms, Freight Terms, and Shipping Method fields, populated based on defaulting rules, may be overridden after the pricing call.
Defaulting rules are not applicable for the creation and updation of quote templates.
Quote line defaulting rules for model components must take into account the nature of top model and parent model (ATO, PTO, Ship Model Complete PTO). For instance, you should not set up a quote line defaulting rule to default different Shipping Methods for the components of an ATO model.
You cannot use defaulting rules for the following quote header attributes:
Quote to Customer
The Quote to Customer in the Opportunity to Quote flow will get defaulted from the Opportunity and cannot be changed.
Opportunity Name
The Opportunity Name in the Opportunity to Quote flow will get defaulted from the Opportunity and cannot be changed.
Quote to Customer Account
The Quote to Customer Account in the Create Quote flow (standalone quote) does not use the defaulting rules framework.
Sales Supplement
The Sales Supplement field does not use the defaulting rules framework.
Quote Status
The Quote Status values are based on the transition rules set up in Quoting Forms. The defaulting rules framework is not used for this field.
Use the following pointers to create defaulting rules.
Steps
Log in to Oracle Quoting Forms with the Quoting Sales Manager responsibility and select Defaulting Rules from the Setup functions.
Query for Order Capture in the Application field.
Choose from any of these entities: Quote Header, Quote Line, and Quote Oppty.
Refer the Order Management Implementation Manual for detailed steps on creating defaulting rules.
Some dependencies are seeded for defaulting rules in the application. See Seeded Mapping Between Trigger and Dependent Attributes for more details Use this procedure to change the seeded dependency.
Steps
Login to the Linux/Unix server with appropriate permissions.
Make a copy of the asodepmp.sql file located in the $ASO_TOP/patch/115/sql/ folder.
Open the file (copy) and search for the line that has the trigger attribute name followed by the dependent attribute name on the following line.
Change the value of the Enabled_Flag from N to Y.
This example enables the dependency between Order Type (trigger attribute) and Shipment Priority code (dependent attribute).
l_Dep_Rec(l_count).Trigger_Attribute_Name := 'Q_ORDER_TYPE_ID'; l_Dep_Rec(l_count).Dependent_Attribute_Name := 'Q_SHIPMENT_PRIORITY_CODE'; l_Dep_Rec(l_count).Enabled_Flag := 'Y';
Save your changes and run the modified asodepmp.sql script with the apps user responsibility.
Login to Oracle Forms with the Quoting Sales Manager responsibility.
Create a defaulting rule for the dependent attribute in Step 4 above. If a defaulting rule already exists and is enabled, you can skip this step. For information on creating defaulting rules, see Creating Defaulting Rules.
Run the Order Capture Dependency Generator and Defaulting Generator concurrent programs. See Concurrent Programs in Defaulting Rules for more details.
There are two concurrent programs that affect the functioning of defaulting rules in Oracle Quoting. If you add a rule and change the dependency, it is recommended that the concurrent programs run in the following sequence:
To generate defaulting rules for the first time or update existing defaulting rules or defaulting conditions, you must submit the Defaulting Generator concurrent program. New or modified rules and conditions are not effective until the program is successfully run.
Note: Seeded defaulting rules can be disabled, but not modified. If you wish to modify a seeded defaulting rule, disable the seeded defaulting rule condition, and then create a copy of the seeded defaulting rule and include your changes in the copied defaulting rule.
The concurrent program must be submitted if you perform either of the following:
Add or update a defaulting rule
Enable or disable a defaulting rule
Add or update a defaulting condition template
Enable or disable a defaulting condition template
Notes
Log in to Oracle Forms with the Quoting Sales Manager responsibility and navigate to the Concurrent Requests form from the View > Requests menu.
Application
Select Order Capture.
Entity
Select either Quote Header, Quote Line or Quote Oppty depending on which entity you have modified.
Attribute
Select an attribute from the list.
This concurrent program updates the dependencies between Quoting Attributes. If you modify attribute dependencies, they are not effective until this concurrent program is successfully executed. The concurrent program must be executed if you perform any of the following:
Disable a dependency between two attributes
Enable a dependency between two attributes
If you modify the dependency between two Quote Header level attributes, run this concurrent program for the Quote Header. If you modify the dependency between two Quote Line level attributes, run this concurrent program for the Quote Line.
Notes
Login to Oracle Forms with the Quoting Sales Manager responsibility and navigate to the Concurrent Requests form from the View > Requests menu.
Database Object Name
Select either Quote Header ( ASO_AK_QUOTE_HEADER_V ) or Quote Line ( ASO_AK_QUOTE_LINE_V )
Primary Key Column Name
Select Q_QUOTE_HEADER_ID if you chose Quote Header as the Database Object Name or L_QUOTE_LINE_ID if you chose Quote Line as the Database Object Name.
Last Update Date Column Name
Select Q_LAST_UPDATE_DATE if you chose Quote Header as the Database Object Name or L_LAST_UPDATE_DATE if you chose Quote Line as the Database Object Name.
You can create a custom API for the PL/SQL API source type. Here is the signature of the seeded PL/SQL API:
<API Name> ( p_database_object_name in VARCHAR2, p_attribute_code in VARCHAR2 ) return <datatype> where the <datatype> can be NUMBER or VARCHAR2.
The table below describes Quoting entities, their associated entity code, and the database object that is called when the entity is processed within a Quoting transaction.
Entity | Entity Code | Database Object |
---|---|---|
Quote Header | QUOTE_HEADER | ASO_AK_QUOTE_HEADER_V |
Quote Line | QUOTE_LINE | ASO_AK_QUOTE_LINE_V |
Quote Oppty | QUOTE_OPPTY | ASO_AK_QUOTE_OPPTY_V |
Here is the sample code to default the Currency Code from the Quote Price List in a standalone quote or from the Price List in the Create Quote from Opportunity page:
FUNCTION Get_Currency_from_pricelist( P_Database_Object_Name IN VARCHAR2, P_Attribute_Code IN VARCHAR2 ) RETURN VARCHAR2 is Cursor C_currency_code(q_price_list_id Number) is SELECT currency_code FROM qp_price_lists_v WHERE price_list_id = q_price_list_id; l_price_list_id Number; l_currency_code C_currency_code%rowtype; Begin -- Getting the defaulting global record based on the Database object name IF p_database_object_name = 'ASO_AK_QUOTE_HEADER_V' THEN l_price_list_id := ASO_QUOTE_HEADER_DEF_HDLR.g_record.q_price_list_id; ELSIF p_database_object_name = 'ASO_AK_QUOTE_OPPTY_V' THEN l_price_list_id := ASO_QUOTE_OPPTY_DEF_HDLR.g_record.o_price_list_id; END IF; -- Getting the Currency Code based on the Price List open C_currency_code(l_price_list_id); fetch C_currency_code into l_currency_code; close C_Currency_code; -- Returning the Currency Code RETURN l_currency_code.currency_code; EXCEPTION -- Exception Handling WHEN NO_DATA_FOUND THEN RETURN NULL; WHEN OTHERS THEN IF OE_MSG_PUB.Check_Msg_Level (OE_MSG_PUB.G_MSG_LVL_UNEXP_ERROR) THEN OE_MSG_PUB.Add_Exc_Msg ( G_PKG_NAME , ' Get_Currency_from_pricelist ' ); END IF; RAISE FND_API.G_EXC_UNEXPECTED_ERROR; End Get_Currency_from_pricelist