Creating Custom Context Attributes
Creating Custom Context Attributes
1|Page
Contents
Applies to : .................................................................................................................................................................................2
Goal:.............................................................................................................................................................................................3
Solution:......................................................................................................................................................................................3
Pricing Components:.................................................................................................................................................................4
Implementation Steps:..............................................................................................................................................................5
Queries:.....................................................................................................................................................................................18
2|Page
Applies to :
Oracle Advanced Pricing - Version: 11.5.8 and later [Release: 11.5 and later ]
Goal:
This note explains the details of creating custom qualifier context, its attributes and attribute linking &
mapping using a custom source. Explains how to accomplish following business scenario.
Business Scenario: We have an additional attribute (EDP Number) defined for Items and based on which
we need to apply some discounts for the items while placing sales orders on those Items.
Solution:
1. Create items and assign a value for the attribute EDP Number (For ex 64514)
5. Create a pl/sql package which determines/fetches the value of EDP Number for the item being used in
the Sales Order
7. Create a Modifier which decides the percentage of discount to be applied in the Sales order for the items
8. Create a line level qualifier for which sales order lines, above created modifier should be applied
9. Create a Sales order and check whether the discount is applied or not.
3|Page
Pricing Components:
Modifiers: Pricing modifiers control how the pricing engine can modify the pricing requests and pricing
request lines
Attribute Mapping: Attribute mapping is the process used to pass in data (from other applications or sys-
tems) that is not seeded in the delivered product into Oracle Advanced Pricing for use in price lists, modifi-
ers, agreements, qualifiers, and formulas.
Context : Contexts are a group of related pricing elements that can have attributes linked to them. In At-
tribute Management, users can set up 3 types of contexts. Product context, Qualifier context, and Pricing
context
Qualifier Contexts and its attributes allow for the creation of qualifiers, which determine eligibility. The at-
tributes in the product context help to define the product hierarchy. Attributes within a pricing context en-
able users to further define eligibility for a line.
Attribute: Attributes can be used as product, qualifier or pricing attributes. Attributes are linked to a Pri-
cing Transaction Entity depending on the defined Request Types
4|Page
Implementation Steps:
2. Create a Price list and assign this Item to the Price List:
Navigation: Oracle Pricing Manager(resp) -> Price Lists -> Price List Setup
5|Page
6|Page
3. Create Qualifier Context:
Navigation: Oracle Pricing Manager(resp) -> Setup -> Attribute Management -> Context and Attributes
Code : LSS_EDP
Name: LSS_EDP
7|Page
4. Create Qualifier Attribute:
Code: LSS_EDP
Name: LSS_EDP
Precedence: 600
5. Create a PL/SQL package which calculates EDP number for the item given in the Sales Order:
Package Specification:
8|Page
Package Body:
9|Page
6. Map the attribute created in step 5 with the package created in above step.
Navigation: Advanced Pricing Manager(resp) -> Setup -> Attribute Linking and Mapping
Now select the Context created in Step5. i.e. LSS_EDP . Click on Link Attributes
10 | P a g e
Select the Request Type, ASO and enter the details as below:
Now, select the Request Type as ONT and enter the details as below:
11 | P a g e
Save the details entered and close the window. A dialog box will be displayed which means that this
context attribute is not used in any of the setups(Price Lists/Dynamic Formula/Modifiers) yet.
If you observe the qualifier context, Assigned to PTE check box will be checked automatically.
12 | P a g e
7. Create a Modifier:
Navigation: Oracle Pricing Manager (resp) -> Modifiers -> Modifier Setup
13 | P a g e
Here Application Method is percent and Value is 10 i.e. 10% of the discount is applied on the sales order
line.
Value From: 64514 (For which category of EDP Number this discount has to be applied)
14 | P a g e
8. Run the concurrent program, Build Attribute Mapping Rules.
Navigation: Oracle Advanced Pricing Manager (resp) -> Reports, Requests
15 | P a g e
9. Create a Sales Order:
Navigation: Order Management Super User(resp) -> Orders, Returns -> Sales Orders
Initially, Unit Selling Price $200 is assigned which is from the price list LSS_IBE_PriceList2012.
16 | P a g e
Now the modified price will be displayed for the sales order line:
17 | P a g e
Here two discounts have been applied on the sales order line. One is Default Discount and the other is
applied through the modifier created XXLSS_EDP_MODIFIER. Click on Attributes.
Queries:
Queries to find the details of Custom Context and Attribute:
18 | P a g e
SELECT A.PRC_CONTEXT_TYPE, A.PRC_CONTEXT_CODE, A.SEEDED_FLAG SEEDED_CONTEXT,A.ENABLED_FLAG
CONTEXT_ENABLED, B.SEGMENT_ID, B.SEGMENT_CODE CODE,B.USER_PRECEDENCE,B.SEEDED_FLAG
SEEDED_ATTRIBUTE,B.SEGMENT_MAPPING_COLUMN COLUMN_MAPPED, C.SEGMENT_LEVEL LEVEL_CODE,
C.SEEDED_SOURCING_METHOD, C.USER_SOURCING_METHOD SOURCING_METHOD, C.SOURCING_ENABLED
SOURCING_ENABLED, C.USED_IN_SETUP USED_IN_SETUP, C.SOURCING_STATUS SOURCE_STATUS,C.LOV_ENABLED
LOV_ENABLED, C.LIMITS_ENABLED LIMITS_ENABLED,B.AVAILABILITY_IN_BASIC AVAIL_IN_BASIC
FROM QP_PRC_CONTEXTS_B A,QP_SEGMENTS_B B, P_PTE_SEGMENTS C
WHERE 1=1 AND A.PRC_CONTEXT_TYPE IN ('PRODUCT', 'QUALIFIER', 'PRICING_ATTRIBUTE')
AND B.PRC_CONTEXT_ID = A.PRC_CONTEXT_ID
AND C.SEGMENT_ID = B.SEGMENT_ID AND C.PTE_CODE = 'ORDFUL'
AND A.PRC_CONTEXT_CODE like 'LSS_EDP' AND A.PRC_CONTEXT_TYPE = 'QUALIFIER'
ORDER BY PRC_CONTEXT_TYPE, A.PRC_CONTEXT_CODE;
19 | P a g e