Escolar Documentos
Profissional Documentos
Cultura Documentos
January 2018
Customers who wish to implement this functionality in Release 11 need to perform the following
steps
Customizations Steps
a. Create a new Price Element with the name ‘Running Price’, Code as
‘RUNNING_PRICE’ of type Price using Fusion Setup Manager -> Manage Price
Elements and Activate the element.
b. Based on the requirement to apply Tier/Simple rule on the discount total, create a
Pricing Basis with Basis type Tier/Adjustment using Fusion Setup Manager ->
Manage Pricing Bases and set the Price element as the element created in the
previous step. Ensure that the charge criteria for Tier Basis includes all the charges
on which the discount rule is based on.
c. For the terms to be shown in the EFF List of Values for Order Header, Create a
Discount List and Add a discount rule for Item Level as ‘All Items’ and create a
simple/tier/attribute discount rule and ensure that the Tier/Adjustment basis is
set with the basis created in the previous step. Also ensure that this discount list is
not added to any Strategy, else this discount will be picked up without the EFF
setup at the Order header and will result in Invalid basis error.
d. Ensure that the Price Type, Charge Type and Charge SubType is selected according
to the requirement of the discounts. Eg: If you want the discounts to be applied
on all One Time Charges, set the Price Type, Charge Type and Charge SubType as
‘One Time’, ‘All’ and ‘All’ respectively.
3
2. Define EFF’s for Order Header
Define EFFs as shown below
c. Search for Task ‘Manage Extensible Flexfields’ Functional Setup Manager (FSM) task
d. Search for Extensible Flexfield with Name ‘Header Information’ and click on Edit
4
h. Under Context Usages, Add a new row and set Name as Additional Header Information
and View Privileges and Edit Privileges as None.
i. Click on Save. Add a new row under Context Sensitive Segments and add the
following details for ‘Create Segment’ and click on ‘Create Value Set’
Name Discount Rule
Code DiscountRule
API Name discountRule
Enabled Yes
Data Type Number
Table Column ATTRIBUTE_NUMBER1
5
Value Column Name PRICING_TERM_ID
Description Column Name NAME
ID Column Name PRICING_TERM_ID
WHERE Clause PARENT_ENTITY_TYPE_CODE='DISCOUNT_LINE' AND
PARENT_ENTITY_KEY_COLUMN1 IN (SELECT
qp_discount_list_items.DISCOUNT_LIST_ITEM_ID from
qp_discount_list_items where
qp_discount_list_items.ITEM_LEVEL_CODE='ALL_ITEMS')
l. Click on ‘Save and Close’ for the Segment after validating the Value Set information
6
m. Click ‘Save and Close’ on the Edit Context page and ‘Done’ on the Manage
Contexts page.
p. Under the Category: Details -> Associated Contexts, Click on Select and Add.
7
q. Search and add the newly created Context ‘Pricing Header Information’.
r. Click ‘Save’. Under Pages -> Associated Context Details, Click ‘Select and Add’ and
add the newly added context.
8
3. Service Mappings Changes
a. Open the zip file downloaded as part of the previous step, move to
'oracle\apps\scm\doo\processOrder\flex\headerContextsB\view\', open the View Object
Definition with the name 'HeaderEffBPricing__Header__InformationprivateVO.xml'.
b. Open Fusion Pricing -> Manage Service Mappings, Edit 'Sales' Service Mapping
Entity Description
PricingHdrEff_Custom Entity to save Order Header EFF values
9
e. Under 'Services' tab, select the Service 'PriceSalesTransaction'. Under 'PriceSalesTransaction:
Details', in the 'Entities' tab, add a new row and associate the entity to pass the EFF value(s) to
pricing as below:
1
g. Under 'Sources' tab, select the Source 'OrderHeader'. Under 'OrderHeader: Details', in the
'Entity Mappings' tab, create a new entity mapping to the EFF VO attributes as below. This
step ensures that the EFF values are read from the EFF VO and passed to Pricing when the
order is priced using Price Order action or saving of the order.
h. In the same region above, under PricingHdrEff _Custom: Details', add attributes as below:
Attribute View Object Attribute
HeaderId_Custom HeaderId
PricingTerm_Custom Eg. pricingTerm
1
4. Algorithm Primer
Here is a reference to the algorithm primer. We recommend reading this is as a pre-
requisite before starting algorithm customizations.
5. Algorithm Changes
a. Import the Custom algorithm which applies discounts to all the lines that are part
of the Order Header based on the EFF setup on the Order Header.
CreateOrderTotalDiscountCustom.zip
1
d. The algorithm also uses the Price Element Code as ‘RUNNING_PRICE’ – the
element created as part of the previous setup. If the element was created with a
different code, ensure that Assignment Value under Step 5 -> Input Variables ->
PriceElement is changed to represent the elements code.
1
e. After making all the changes, Save the algorithm, re-open ‘Manage Algorithms’
page, select the Algorithm ‘Create Order Total Discount Custom’ , Click Actions ->
Publish.
f. In Fusion Pricing -> Manage Algorithms, search for algorithm 'Price Sales
Transactions', click on the most current version used in FOM Pricing, click Actions
-> Create Version, say this creates Version 2. Click Actions -> Edit, Edit the
description to add to the existing one a brief note on the functionality being
achieved via the customization and the name of the person who can be contacted
in case of issues eg. 'This version calls the sub algorithm which applies discount
rules populated on the Order Header Information EFF. Author: Jdoe.'
g. Create a sub-algorithm step after Step 28 ‘Apply Manual Adjustments for Pricing
Charges’ to invoke the ‘Create Order Total Discount Custom' algorithm created
above and pass the PriceRequest as input and output variables.
1
h. After making all the changes, Save the algorithm, re-open ‘Manage Algorithms’
page, select the latest version of the Algorithm ‘Price Sales Transaction’ , Click
Actions -> Publish.
6. Upgrade Considerations
a. In Release 13, the structure of the Price Sales Transaction algorithm has changed
and all the Price adjustments are applied from ‘Create Pricing Charges’ algorithm.
hence to ensure that these changes work with Release 13, remove the
customization done to ‘Price Sales Transaction’ as part of the above step.
1
7. Test the changes
a. Test the Price Sales Transaction Version 2 thoroughly to make sure this works correctly
and applies MPAs and overrides the prices as expected and does not cause any
regressions when there are no price overrides.
b. Here is a test payload to test the Price Sales Transactions Algorithm. Make the necessary
changes noted in the payload. In the Test tab, create a test case with Test Case Name =
"Order Total Discount Test". Under the Test Input tab, select the row with Variable Name
'Price Request', edit the default Variable Value, select all the lines of the default payload
and paste the payload below. Click the 'Run' button. Now click the Test Output tab and
you will see that the discount with the specified PricingTermId is applied on the line.
<PriceRequestInternal:CalculatePricingChargesFlag>true</PriceRequestInternal:Calcu
latePricingChargesFlag>
<PriceRequestInternal:CalculateShippingChargesFlag>false</PriceRequestInternal:Cal
culateShippingChargesFlag>
<PriceRequestInternal:CalculateTaxFlag>false</PriceRequestInternal:CalculateTaxFla
g>
<PriceRequestInternal:SellingBusinessUnitId>xx1</PriceRequestInternal:SellingBusin
essUnitId>
<PriceRequestInternal:SellingLegalEntityId>xx2</PriceRequestInternal:SellingLegalE
ntityId>
<PriceRequestInternal:TransactionTypeCode>ORA_SALES_ORDER</PriceRequestInternal:Tr
ansactionTypeCode>
</PriceRequestInternal:Header>
<PriceRequestInternal:PricingServiceParameter>
<PriceRequestInternal:InventoryItemId>yyy</PriceRequestInternal:InventoryItemId>
<PriceRequestInternal:InventoryOrganizationId>yy1</PriceRequestInternal:InventoryO
rganizationId>
<PriceRequestInternal:LineId>1001</PriceRequestInternal:LineId>
<PriceRequestInternal:LineCategoryCode>ORDER</PriceRequestInternal:LineCategoryCod
e>
<PriceRequestInternal:LineQuantity unitCode="yy2"
xmlns:tns="http://xmlns.oracle.com/adf/svc/errors/">2</PriceRequestInternal:LineQu
antity>
<PriceRequestInternal:LineQuantityUOMCode>yy2</PriceRequestInternal:LineQuantityUO
MCode>
Indicates the PricingTermId that needs to be applied on all the
lines.
<PriceRequestInternal:LineTypeCode>ORA_BUY</PriceRequestInternal:LineTypeCode>
</PriceRequestInternal:Line>
<PriceRequestInternal:PricingHdrEff_Custom>
1
<PriceRequestInternal:PricingTerm_Custom>300100110522449
</PriceRequestInternal:PricingTerm_Custom >
<PriceRequestInternal:HeaderId_Custom>101</PriceRequestInternal:HeaderId_Custom>
</PriceRequestInternal:PricingHdrEff_Custom>
Line Attributes
Line.InventoryItemId
Line.InventoryOrganizationId
Line.LineQuantity.UOMCode
Line.LineQuantityUOMCode
Create an order line on the above order with the item that you want to use for testing. Then use the
query below to derive the IDs for the attributes above. Remember to replace the header_id in the
query below with the header_id returned in the query above. Note that the UOMCode "Ea" appears
in 2 places as highlighted in RED in the payload and both need to be replaced with the value returned
from the query.
select inventory_item_id as InventoryItemId, inventory_organization_id as InventoryOrganizationId,
ordered_uom as LineQuantityUOMCode from doo_fulfill_lines_all where header_id = $header_id;
This needs to be replaced with Pricing_term_id retrieved from the query below based on the discount
rule that needs to be applied.
select name,pricing_term_id from qp_pricing_terms_vl where
parent_entity_type_code='DISCOUNT_LINE' and
PARENT_ENTITY_KEY_COLUMN1 in (select qp_discount_list_items.DISCOUNT_LIST_ITEM_ID from
qp_discount_list_items where
qp_discount_list_items.ITEM_LEVEL_CODE='ALL_ITEMS');
1
2 Error below while testing the algorithm
Error: Unable to parse the variable[PriceRequest] using the service
definition [Sales.PriceRequestInternal]. Please check the variable value or service schema
This error usually means that the XML in the test case input is not a valid XML.
Please use an XML editor and make sure the XML is a valid XML.
Indication: This error occurs when there is a change made to the algorithm and when trying to publish
immediately after saving the changes.
Workaround: In the Manage Algorithms page, use the QBE as shown in the screen shot below, change
the search criteria eg. %Cust% and hit enter and perform the search and search again and then try
publishing. Once this error appears Actions->Deactivate, Actions->Activate and Actions -> Publish to
republish the algorithm.
Indication: Error occurs when there are unsaved changes in the input payload and the user tries to
run the test case
Workaround: Save the changes before running the test case. Once the error appears, user needs to
Cancel the algorithm edit, go to the Manage Algorithm page, reopen the algorithm and re-run the test
1
case.
1
Copyright © 2018, Oracle and/or its affiliates. All rights reserved. This document is provided for information purposes only and the
January 2018
contents hereof are subject to change without notice. This document is not warranted to be error-free, nor subject to any other
Author: Priya Gopal
warranties or conditions, whether expressed orally or implied in law, including implied warranties and conditions of merchantability or
fitness for a particular purpose. We specifically disclaim any liability with respect to this document and no contractual obligations are
Oracle Corporation formed either directly or indirectly by this document. This document may not be reproduced or transmitted in any form or by any
World Headquarters means, electronic or mechanical, for any purpose, without our prior written permission.
500 Oracle Parkway
Redwood Shores, CA 94065 Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
U.S.A.
Intel and Intel Xeon are trademarks or registered trademarks of Intel Corporation. All SPARC trademarks are used under license and
Worldwide Inquiries:
are trademarks or registered trademarks of SPARC International, Inc. AMD, Opteron, the AMD logo, and the AMD Opteron logo are
Phone: +1.650.506.7000
trademarks or registered trademarks of Advanced Micro Devices. UNIX is a registered trademark of The Open Group. 0612
Fax: +1.650.506.7200
oracle.com