Вы находитесь на странице: 1из 28

Case1: To access OrderTypeCode_Custom(which is consider as custom attribute in pricing under

HeaderVO)

Case2: To access PricingHdrEff_Custom (which is OrderHeader EFF attribute, which is under


HeaderEffBPricing__Header__InformationprivateVO )

Case1:-
https://docs.oracle.com/en/cloud/saas/supply-chain-management/19b/faupr/use-
cases.html#FAUPR3004194

Retrieved describe of “documentPrices” REST before adding OrderTypeCode_Custom, Below is the reference
Rest Service: /fscmRestApi/priceExecution/documentPrices/getSalesPricingStrategy

Reference: Extracted above rest service from below docs

https://docs.oracle.com/en/cloud/saas/supply-chain-management/19a/fasrp/op-fscmrestapi-
priceexecution-documentprices-getsalespricingstrategy-post.html
First I have described below to know what all the attributes we can access under “getSalesPricingStrategy”

https://fuscdrmsmc290-fa-ext.us.oracle.com/fscmRestApi/priceExecution/documentPrices/describe
Method: GET

describe_of_Document_Prices_before_adding_OrderTypeCode_Custom.json-

describe_of_Docume
nt_Prices_before_adding_OrderTypeCode_Custom.json

Now declaring “OrderTypeCode_Custom” under header entity, below is the navigation

HomeOrder ManagementPricing AdministratorClick on Task BarManage Service Mappings Click on Sales


Now Create “OrderTypeCode_Custom” as below-Under Entities tab

Now in Sources Tab

Enter View Object Attribute as : OrderTypeCode


 Click Services > Query by Example, and then query for the PriceRequestHeader service.
 In the Details area, on the Entities tab, click the row that includes Header in the Entity
column.
 In the Entities area, click Actions > Add Row, then set values.

Added OrderTypeCode_Custom as below


Map Now Manage Matrix Classes  Sales Pricing Strategy Assignment
Mapping same in Manage Pricing Strategy Assignments
describe_of_Document_Prices_After_adding_OrderTypeCode_Custom.json. 

describe of
Document Prices After adding OrderTypeCode_Custom.json

Test Case from front end UI


Calling same assignment rule from REST service

Output
Same we could able to get from REST service, For Case1.

Case2:-
https://docs.oracle.com/en/cloud/saas/supply-chain-management/19a/faupr/use-
cases.html#FAUPR2426091

Retrieved describe of “documentPrices” REST before adding SalesChannel_Custom, Below is the reference
Rest Service: /fscmRestApi/priceExecution/documentPrices/getSalesPricingStrategy

Reference: Extracted above rest service from below docs

https://docs.oracle.com/en/cloud/saas/supply-chain-management/19a/fasrp/op-fscmrestapi-
priceexecution-documentprices-getsalespricingstrategy-post.html
First I have described below to know what all the attributes we can access under “getSalesPricingStrategy”

https://fuscdrmsmc290-fa-ext.us.oracle.com/fscmRestApi/priceExecution/documentPrices/describe
Method: GET

Describe JSON before adding “SalesChannel_Custom”

describe of
Document Prices After adding OrderTypeCode_Custom.json

Use an extensible flexfield to modify pricing:

1. Create the value set.

2. Define the extensible flexfield.

3. Administer the service mapping.


4. Modify the matrix class.

5. Modify the pricing algorithm.

6. Create the pricing strategy.

7. Test your work.

 Manage Application Core Value SetsCreate the Value Set:-

Define the extensible flexfield:-


Click on Manage Contexts I above screen
On the Manage Contexts page, click Actions, and then click Create.

Attribute Value

Display Name Pricing Header Information


Code PricingHeaderInformation
API Name Pricingheaderinformation

Enabled Contains a check mark


Behavior Single Row
On the Context Usages tab, click Actions, click Create, set the following values, and then
click Save.

Attribute Value

Name Additional Header Information


View Privileges None
Edit Privileges None

In the Context Sensitive Segments area, click Actions, and then click Create.

Attribute Value

Name SalesChannel
Code SalesChannel
API Name saleschannel

Enabled Contains a check mark


Data Type Character
Table Column ATTRIBUTE_CHAR1
Value Set SALES_ORDER_CHANNEL
Prompt Sales Channel
Display Type List of Values
On the Create Segment page, set the following values, and then click Save and Close.

On the Edit Context page, click Save and Close.

On the Manage Contexts page, click Save and Close.

Associate the context with the category:

1. On the Edit Extensible Flexfield page, in the Category area, click the row that contains the
following value.

Attribute Value

Display Name Additional Header Information

2. On the Associated Contexts tab, click Actions, and then click Select and Add.

Attribute Value

Name Pricing Header Information

3. In the Select and Add dialog, search for the following value.
4. In the search results, click the row, click Apply, and then click OK.
5. In the Associated Contexts tab, notice that the Associated Contexts tab now displays a row
for Pricing Header Information, which means you successfully assigned the Pricing Header
Information context to the Additional Header Information category.
6. Click Save.
Specify where to display the extensible flexfield:

1. In the Category Details area, click Pages, click Actions, and then click Create.


2. In the Create Page dialog, set the following values, and then click OK.

Attribute Value

Display Name Pricing Header Information


Code PricingHeaderInformation
Usage Additional Header Information

3. This step assign the contexts to the page in the Order Management work area that will
display the extensible flexfield.
4. On the Edit Extensible Flexfield page, in the Category Details area, click the row that
contains Pricing Header Information in the Display Name column.
5. In the Pricing Header Information - Associated Contexts Details area, click Actions, and
then click Select and Add.
6. In the Select and Add dialog, search for Pricing Header Information, wait for the search to
finish, click the result row, click Apply, and then click OK.
7. Click Save and Close.
8. On the Manage Extensible Flexfields page, click Deploy Flexfield, and then use the
Processing dialog that displays to monitor the deployment.

Deploy makes the extensible flexfield available in the Order Management work area.

9. Click Done, and then click Done again.


Add the header entity to the service mapping:

1. Log into Order Management with pricing manager privileges.


2. In the Navigator, click Pricing Administration.
3. On the Overview page, click Tasks, and then click Manage Service Mappings.
4. On the Manage Service Mappings page, in the Name column, click Sales.
5. On the Entities tab, click Action, click Add Row, set the following values, and then
click Save.

Attribute Value

Entity PricingHdrEff_Custom
Descriptio Entity for the flexfield on the sales order header. This modification supports the business flow that uses a
n sales channel.

Attribute Primary Key Type Allow Null

HeaderId_Custom Contains a Long Contains a check mark.


check mark.
SalesChannel_Custom String Contains a check mark.

6. In the Details area, add the following attributes, and then click Save.
Specify the service:

1. Click Services, and then click the row that contains the following value.

Attribute Value

Service PriceSalesTransaction

2. In the Details area, on the Entities tab, click Actions, click Add Row, set the following values,
and then click Save.

Attribute Value

Entity PricingHdrEff_Custom
Read Contains a check mark.
Write Does not contain a check mark.

3. In the PricingHdrEff_Custom - Entities area, add the following attributes.


Attribute Read Write

HeaderId_Custom Contains a check mark. Does not contain a check mark.


SalesChannel_Custom Contains a check mark. Does not contain a check mark.

Also add PricingHdrEff_Custom entity same into GetSalesPricingStrategy Service, So that we can
call in REST GetSalesPricingStrategy service.

Specify the sources:

1. Click Sources, and then click the row that contains the following value.


Attribute Value

Source OrderHeader

2. In the OrderHeader Details area, click Actions, click Add Row, set the following values, and
then click Save.

Attribute Value

Entity PricingHdrEff_Custom
Type View Object
View PricingHeaderInformation
Object
Make sure the value you enter for View Object matches the value from the Code attribute on
the Create Context page you used when you created the extensible flexfield earlier in this
topic.
Query Unique Identifier
Type
Query HeaderId
Attribute
Make sure the value you enter for Query Attribute matches the name you used earlier in this
topic when you defined the entity for the extensible flexfield.

How to retrieve View Object


Now save and extract in local folder in your system.

Navigate to oracle\apps\scm\doo\processOrder\flex\headerContextsB\view

In My case file name is “HeaderEffBPricing__Header__InformationprivateVO.xml”open the file


in notepad++

I could see as ViewObject name as “HeaderEffBPricing__Header__InformationprivateVO”

3. In the PricingHdrEff_Custom - Details area, add the following attributes.


Attribute View Object Value

HeaderId_Custom HeaderId

Make sure the value you enter matches the name you used earlier in this topic when
you defined the entity for the extensible flexfield.
SalesChannel_Custo Saleschannel

m
Make sure the value you enter matches the value of the API Name attribute on the
Create Segment page that you used when you defined the extensible flexfield
earlier in this topic.

View Object value of “SalesChannel_Custom”You can get it from archieve file which you have
downloaded above

Modify the Matrix Class

In this section, you modify the matrix class so it uses the SalesChannel_Custom attribute of the
PricingHdrEff_Custom entity when it determines whether the condition is true. For details about how
a matrix class works, see Managing Matrix Classes: Explained.
Modify the matrix class:

1. On the Overview page, click Tasks, and then click Manage Matrix Classes.


2. On the Manage Matrix Classes page, click the link that contains the following value.

Attribute Value

Name Sales Pricing Strategy Assignment

Attribute Value

Name Channel Method


Source Code Name SaleschannelCode
Comparison =
Compare to Attribute PricingHdrEff_Custom.SalesChannel_Custom
Required Does not contain a check mark.
Allow null Contains a check mark.
Null is Wild card Contains a check mark.
Domain Lookup: ORA_QP_CHANNEL_METHODS
Modify the Pricing Algorithm

In this section, you modify a predefined pricing algorithm so the pricing algorithm constrains the set
of records that it processes to the PricingHdrEff_Custom entity. For details about pricing algorithms,
see Managing Pricing Algorithms: Explained.

Modify the pricing algorithm:

1. On the Overview page, click Tasks, and then click Manage Algorithms.


2. On the Manage Algorithms page, click the row that contains the following value,
click Actions, and then click Create Version.

Attribute Value

Name Get Sales Pricing Strategy


3. In the Name column, click Get Sales Pricing Strategy.
4. On the Edit Algorithm page, on the Algorithm tab, expand step 13, Retrieve Header
Strategy, and then click step 14, Get Header Strategy.
5. In the Data Sets area, click Add Row, set the following values, and then click Save and
Close.
Attribute Value

Name PricingHdrEff_Custom
Variable Path PriceRequest.PricingHdrEff_Custom
Cardinality Zero or one
Primary Does not contain a check mark.
Data Set Join [HeaderId_Custom:{Header.HeaderId}]

6. On the Manage Algorithms page, click Actions, and then click Publish.

Add same in Step12, Get Header Strategy Assignment Matrix to retrieve from
getsalepricingstrategy REST service.
Now Navigate to

Manage Pricing Strategy AssignmentsNow create New Create Assignment Matrix with Channel
(i.e. Order Headr EFF ,PricingHdrEff_Custom) as below.

Below is the confirmation done from front end


Now Reprice on Order Headerfrom Actions, We will the get the strategy accordingly.
describe_of_Document_Prices_aftter_adding_ PricingHdrEff_Custom .json-

describe_of_Docume
nt_Prices_aftter_adding_ PricingHdrEff_Custom.json

Input JSON:-

"Header": [{
"CustomerId":1006

}],

"PricingServiceParameter":[{

"PricingContext":"SALES"

}],

"PricingHdrEff_Custom":[

"SalesChannel_Custom":"ORA_DIRECT"

}
Output JSON:-

"Header": [

"AllowCurrencyOverrideFlag": true,

"AppliedCurrencyCode": "USD",

"CustomerId": 1006,

"DefaultCurrencyCode": "USD",

"HeaderId": 0,

"PriceAsOf": "2019-05-13 15:02:36.514",

"PricedOn": "2019-05-13 15:02:36.514",

"PricingSegmentCode": "CORPORATE_SEGMENT",

"PricingSegmentExplanation": "The applicable pricing segment for this transaction is Pricing


Segment=Corporate Segment Precedence=1 because Revenue Potential=Medium Customer
Size=Medium Cost To Serve=Medium Customer Value=Medium Customer Rating=Medium",

"PricingStrategyExplanation": "The applicable pricing strategy for this transaction is Pricing


Strategy=Corporate Pricing Strategy because Pricing Segment=Corporate Segment
Channel=Direct",

"PricingStrategyId": 300100071623888

],

"PricingHdrEff_Custom": [

"HeaderId_Custom": 0,

"SalesChannel_Custom": "ORA_DIRECT"

],
"PricingServiceParameter": [

"OutputStatus": "elapsedTime: 13480",

"PricingContext": "SALES"

Вам также может понравиться