Understand Oracle Commerce set up

You must complete preliminary Commerce set up steps in Oracle Configure, Price, Quote for the integration to run successfully.

This topic contains the Commerce set up steps that you must complete in Oracle Configure, Price, Quote.

Note: Request for Quote and Sync Quote flows do not currently support Asset/Subscription based orders.

Create Commerce Attributes at the Transaction Level

You must create the Commerce attributes shown in the following table at the Transaction level and can adjust the attribute labels, as desired.

Note: An asterisk (*) next to the attribute label indicates the attribute should already exist as part of the Base Reference Application.

Attribute Label Variable Name Attribute Type Additional Settings
CC Order Id cC­_OrderId_t Text Field none
Discount Info cC_DiscountInfo_t Text Field none
Requestor Note cC_RequesterNote_t Text Area none
Request Date cC_RequestDate_t Date

Default Value:

System Variable: Current Date

Customer* customer_t Additional Address Set none
Reject Explanation* rejectExplanation_t Text Area none
Rejection Date cC_RejectionDate_t Date none
Provider Note cC_ProviderNote_t Text Field none
Price Expiration Date* priceExpirationDate_t Date none
CC External Id cC_ExternalId_t Text Field none
CC External Order Price cC_ExternalOrderPrice_t Currency

Auto Update: Yes

Modify: Revert to Default

Default Value: Use the formula provided in the Apply Formulas section.

CC External Order Price Quantity cC_ExternalOrderPriceQuantity_t Integer none
CC Expiration Date cC_ExpirationDate_t Date none
CC Agent Id cC_AgentId_t Text Field none
CC Subtotal cC_Subtotal_t Currency none
CC Order Discount cC_OrderDiscount_t Float

Auto Update: Yes

Default Value:

Enter a non-blank default value to ensure the value sent to Commerce during Sync Quote (i.e. externalOrderPrice) is populated.

CC Order Discount Type cC_OrderDiscountType_t Menu

Auto Update: Yes

Menu Options: Percent Off, Amount Off, Price Override

Default Value: Enter a non-blank default value to ensure the value sent to Commerce during Sync Quote (i.e. externalOrderPrice) is populated.

CC_LineItem_Data cC_LineItem_Data_t Text Area none
CC Total Net Price cC_TotalNetPrice_t Currency

Auto Update: Yes

Modify: Revert to Default

Document View: Hide

Default Value: Use the formula provided in the Apply Formulas section.

Order Discount Total cC_OrderDiscountTotal_t Currency

Auto Update: Yes

Document View: Hide

Default Value: Use the formula provided in the Apply Formulas section.

Total (Net)* totalOneTimeNetAmount_t Currency Default Value: Use the formula provided in the Apply Formulas section.
Total Discount* totalOneTimeDiscount_t Currency Default Value: Use the formula provided in the Apply Formulas section.
CC Order Total cC_Order_Total_t Currency none
CC Organization Id cC_OrgId_t Text Field none
CC Site Id cC_SiteId_t Text Field none
CC Site name cC_SiteName_t Text Field none
Ship To Attributes* shipTo_t Additional Address Set none
Invoice To Attributes* invoiceTo_t Additional Address Set none

Note: For all procedures and SSEs that require address information for endpoint inputs, in addition to usingCommerce's default address formats, you can also use the Commerce REST API to create multi-country custom address formats. Refer to the Configure the Commerce Server-Side Extensions topic in this guide for more information on address formatting.

Modify the Existing “Status” Transaction Level Attribute

The Status (“status_t”) attribute is an existing Transaction-level attribute that should already exist on Base Ref App environments. You must modify this attribute as described below.

  • Add the following options:
    • Rejected [REJECTED]
    • Synced [SYNCED]
  • Under Modify, set the attribute to "Use Specified Value" for the following actions:
    • Create Order: ORDERED
    • Customer Rejection: REJECTED
    • Save: CREATED
    • Sync Quote: SYNCED
    • Cancel Transaction: CANCELED

Create Attributes at the Commerce Line Level and Add Them to the Commerce Layout

Create the Commerce attributes shown below at the Commerce line level. Once created, add the attributes to the Commerce layout.

Attribute Label Variable Name Attribute Type Additional Settings
Commerce Item Id cC_CommerceItemId_l Text Field none
Product Id cC_ProductId_l Text Field none
Catalog Ref Id cC_CatalogRefId_l Text Field

Default Value: Function

if(_model_variable_name <> ""){

return _model_variable_name;

}

return _part_number;

Note: When creating the Default value Function, _model_variable_name and _part_number need to be selected from the Variable Name for that Transaction Line tab.

External Price cC_ExternalPrice_l Currency none
External Price Quantity cC_ExternalPriceQuantity_l Integer none
CC Net Price cC_NetPrice_l Currency none
Quantity* requestedQuantity_l Currency none
Price (List)* listPrice_l Currency Default Value: Use the formula provided in the Apply Formulas section.
n/a oRCL_ABO_ActionCode_l Single Select Menu This menu attribute comes from the ABO installation package and is a requirement for the Sync Quote action.

Apply Formulas

The following Commerce attributes should already exist on Base Ref App environments. Apply the listed formulas to the attributes.

Table 1-1 Attributes for Base Ref App environments

Variable Name Formula
cC_ExternalOrderPrice_t if( ( cC_OrderDiscountType_t = "amountOff" ), ( cC_TotalNetPrice_t - cC_OrderDiscount_t ), if( ( cC_OrderDiscountType_t = "percentOff" ), ( cC_TotalNetPrice_t - ( cC_TotalNetPrice_t * ( cC_OrderDiscount_t / 100 ) ) ), if( ( cC_OrderDiscountType_t = "priceOverride" ), cC_OrderDiscount_t,cC_TotalNetPrice_t)))
totalOneTimeNetAmount_t* cC_ExternalOrderPrice_t
totalOneTimeDiscount_t* sumIf( ( priceType_l NOT= "Recurring" ), discountAmount_l) + cC_OrderDiscountTotal_t
cC_OrderDiscountTotal_t if( ( cC_OrderDiscountType_t = "amountOff" ), cC_OrderDiscount_t,if( ( cC_OrderDiscountType_t = "percentOff" ), ( cC_ExternalOrderPrice_t - ( cC_OrderDiscount_t / 100 ) ), if( ( cC_OrderDiscountType_t = "priceOverride" ), ( cC_ExternalOrderPrice_t - cC_OrderDiscount_t ), 0 )))
cC_TotalNetPrice_t sumIf( ( priceType_l NOT= "Recurring" ), netAmount_l)
listPrice_l*

if( ( _model_base_price NOT= 0 ), _model_base_price,_price_list_price_each)

if( ( _model_base_price NOT= 0 ), _model_base_price,if( ( _pricing_rule_price_each NOT= 0 ), _pricing_rule_price_each,_price_list_price_each))

Note: An asterisk (*) next to the variable name indicates that a formula for the attribute already exists on Base Ref App environments. You must update the existing formulas as opposed to creating new formulas.

Set Up Commerce Actions

Complete the following steps to set up Commerce actions.

  1. Create the following Commerce action at the Transaction level.

    Table 1-2 Commerce action

    Label Variable Name Action Type Integration Advanced Modify (Before Formulas)
    Sync Quote cC_syncQuote Modify

    CPQ-OCCS Sync Quote

    Transaction Attribute:CC_LineItem_Data

    Transaction Line Attributes:_document_number

    _model_variable_name

    cC_ProductId_l

    cC_CommerceItemId_l

    BML: Refer to Appendix F: Understand the SyncQuote BML

  2. Place the Sync Quote action on the Commerce layout.
  3. Set the quote level actions “cleanSave_t" and " _remove_transactionLine" to define the following attributes based on their formula definitions:
    • Quote Level Attributes:
      • Total Contract Value
      • Total Discount Per Month
      • Total (List) Per Month
      • Total (Net) Per Month
      • Total Discount
      • Total (List)
      • Total (Net)
      • Annual Contract Value
      • Transaction Total
      • Total Contract Discount
      • Annual Contract Discount
      • CC External Order Price
    • Line Level Attributes
      • Actual Amount
      • Annual Value
      • Contract Value
      • Amount (List)
      • Amount (Net)
      • Price (Net)
      • Quantity
  4. Set the line level action “save_l" to define the following line level attributes based on their formula definitions:
    • Actual Amount
    • Annual Value
    • Contract Value
    • Amount (List)
    • Amount (Net)
    • Price (Net)
    • Quantity

Notes:

  • The “Save” action is already setup to use formulas for a majority of these attributes in the Base Ref Application.
  • The Request for Quote and Sync Quote flows do not support the “Copy Line Items” action. The action is not accessible for Commerce integrated Transactions.

(Optional) Create Commerce Validation Rule

You have the option of creating a Commerce validation rule that blocks users from editing the quantity of child items.

  1. Open the Admin Home page.
  2. Under Commerce and Documents, click Process Definition. The Processes page opens with Documents displaying by default in the Navigation drop-down menu.
  3. Click List next to the Oracle Quote to Order Commerce process. The Document List page opens.
  4. At the Transaction Line level, select Rules from the Navigation drop-down menu.
  5. Click List.
  6. From the Add menu, select Validation. The Validation: New Rule page opens.
  7. In the Name field, enter a name for the validation rule.
  8. Click in the Variable Name field to auto-populate the field.
  9. For the Condition Type, select Advanced.
  10. Click Define Function. The Select Attributes dialog opens.
  11. Select the attributes shown in the following tables.
    System Variable Name Type Description
    _system_current_document_number String Current Document Number
    Variable Name for (Transaction Line) Type Description
    _model_variable_name String Model Variable Name
    _price_quantity Integer Quantity
  12. Click Next.
  13. Enter the following BML:
    oldvalue = getoldvalue("_price_quantity", atoi(_system_current_document_number));
     
    if((_model_variable_name == "") AND (_price_quantity <> atoi(oldvalue))) { 
    
    return true;
     
    }
    return false;
    
  14. Click Save and Close.
  15. On the Validation: New Rule page, select Advanced as the Action Type.
  16. Click Define Function. The Select Attributes dialog opens.
  17. Select the Variable Name for (Transaction Line) tab.
  18. Select the "_price_quantity" attribute.
  19. Click Next.
  20. Enter the following BML.
    attributeDict = dict("dict<string>"); 
     
        // inner dictionary for attr2 
        attr2ActionDict = dict("string"); 
        // assembling the constraint action 
        put(attr2ActionDict, BM_CM_RULES_MESSAGE, "Please re-configure the item to change quantity of sub-item"); 
          
        // put the inner dictionary into the outer dictionary 
        put(attributeDict, "_price_quantity", attr2ActionDict); 
     
     
    // return the outer dictionary 
    return attributeDict;
    
  21. Click Save and Close
  22. In the Components list add the Quantity (_price_quantity) attribute.
  23. Click Save to save the Validation Rule.

Set Up Steps

You must use Oracle Configure, Price, Quote to create a Synced step as well as step transitions.

  1. Create a new “Synced” step.
  2. Create a step transition for the "Sync Quote" action to move from the "In Progress" step to the "Synced" step.
  3. Create a step transition for the “Save" action to move from the "Synced" step to the "In Progress" step.
  4. Create a step transition for the "Customer Rejection" action to move from the "Synced" step to the "Rejected by Customer" step.
  5. Create a step transition for the “Create Order” action to move from the “Synced” step to the “Ordered” step.
  6. Create a step transition for the “Cancel Transaction” action to move from the “Synced” step to the “Canceled” step.
  7. Hide the "Sync Quote" action from the following steps:
    • Fulfilled
    • Canceled
    • Rejected By Customer
  8. Hide all Modify actions from the “Synced” step EXCEPT the following:
    • Save
    • Customer Rejection
    • Create Order
    • Cancel Transaction

Notes:

  • Make sure all of the attributes used in the Request for Quote flow have read/write access at the Start step.
  • For instructions on how to create Commerce attributes, actions, and step transitions, refer to the Oracle Configure, Price, Quote Administration Help.

Modify Process Manager View

You must complete the following procedure to modify a process manager view.

  1. Add a data column named "CC Order Id".
  2. Map the data column to the "CC Order Id" quote level attribute.
  3. Add a Process Manager column using the "CC Order Id" data column.