Calculate Transaction Line Price

post

/rest/v7/commerceDocuments{ProcessVarName}{MainDocVarName}/{_id}/{subDocVarName}/{subDocNumber}/actions/_calculate_price_action

This action re-calculates pricing data after a pricing field is modified.

Request

Path Parameters
Body ()
Root Schema : commerceTransactionLine-CalculatePriceRequest
Type: object
Show Source
Nested Schema : Query Definition
Type: object
Title: Query Definition
Captures the query definition for the current resource request.
Show Source
Nested Schema : commerceTransactionLine
Type: object
Show Source
Nested Schema : actions
Type: array
Array of actions names, whose state is requested in the state object response.
Show Source
Nested Schema : childDefs
Type: array
Show Source
Nested Schema : excludeFieldTypes
Type: array
Array of field names that you want to exclude in the response.
Show Source
Nested Schema : expand
Type: array
Array of child resource names that you want to expand so that the contents return with the parent in the same request.
Show Source
Nested Schema : expandedDomains
Type: array
Array of field names, whose expanded domains are requested in the state object response.
Show Source
Nested Schema : fields
Type: array
Array of field names that you wanted returned in a request.
Show Source
Nested Schema : groups
Type: array
Array of group names, whose state is requested in the state object response.
Show Source
Nested Schema : nodesExceptionList
Type: array
Array of document_number, recording the nodes that violate current expandNodes flag
Show Source
Nested Schema : orderBy
Type: array
Array of field names, each optionally followed by asc or desc, that specifies the order of items returned in the response payload.
Show Source
Nested Schema : Child query criteria.
Type: object
Title: Child query criteria.
Captures the query criteria for the child resource.
Show Source
Nested Schema : Model Base Price
Type: object
Title: Model Base Price
Base price of the model
Show Source
Nested Schema : Part Base Price
Type: object
Title: Part Base Price
Price of the part
Show Source
Nested Schema : Configurable Price
Type: object
Title: Configurable Price
Original price as per catalog (inclusive of discount and premium)
Show Source
Nested Schema : Item Price
Type: object
Title: Item Price
The starting price. For Parts it will be the base price or price book price. For models it may be the base model price or the pricing rule or attribute value prices.
Show Source
Nested Schema : List Price
Type: object
Title: List Price
Will usually be the same value as the Item Price, unless a recommended item price applies.
Show Source
Nested Schema : Net Price
Type: object
Title: Net Price
Net price is subtotal minus the total discount
Show Source
Nested Schema : Override Discount
Type: object
Title: Override Discount
Override original discount
Show Source
Nested Schema : Override Price
Type: object
Title: Override Price
Override original list price
Show Source
Nested Schema : Total Discount
Type: object
Title: Total Discount
Total discount amount
Show Source
Nested Schema : Unit Price
Type: object
Title: Unit Price
Will usually be the same value as the List Price, unless a contract price applies.
Show Source
Nested Schema : Pricing Rule Price
Type: object
Title: Pricing Rule Price
Currently the customer level pricing. (Not applicable for Models)
Show Source
Nested Schema : state
Type: object
Title: state
Captures the current state of the resource row. Of available properties, only those that are applicable and whose values are known in the current context are included.
Show Source
  • Actions
    Title: Actions
    Captures the current state of each action whose state was requested. The object contains one property per action, where the property name is the variable name for the action.
  • Attributes
    Title: Attributes
    Captures the current state of each attribute whose state was requested. The object contains one property per group, where the property name is the resource field name for the attribute.
  • Title: Deletable
    Boolean value that specifies whether the row can be deleted.
  • Groups
    Title: Groups
    Captures the current state of each group whose state was requested. The object contains one property per group, where the property name is the expression string that uniquely identifies the group.
  • Title: Has Error
    Boolean value that specifies whether any error that occurred has been assigned to the row itself.
  • Title: Has Warning
    Boolean value that specifies whether any warning that was issued has been assigned to the row itself.
  • Title: Hidden
    Boolean value that specifies whether the row can be hidden.
  • Messages
    Title: Messages
    Array of messages that have been generated for a specific object.
  • Title: Updatable
    Boolean value that specifies whether the row can be updated.
Nested Schema : Actual Amount
Type: object
Title: Actual Amount
The actual amount billed to the customer.
Show Source
Nested Schema : Annual Discount
Type: object
Title: Annual Discount
The annual discount on the recurring charges on this line.
Show Source
Nested Schema : Annual Value
Type: object
Title: Annual Value
The annual contract value of the recurring charges on this line.
Show Source
Nested Schema : Cancel Reason
Type: object
Title: Cancel Reason
The reason why the customer cancelled this line.
Show Source
Nested Schema : Contract Discount
Type: object
Title: Contract Discount
The total discount of this line including all one - time and recurring charges.
Show Source
Nested Schema : Contract Value
Type: object
Title: Contract Value
The total contract value of this line including all one - time and recurring charges.
Show Source
Nested Schema : Cost Amount
Type: object
Title: Cost Amount
The total cost of this line.
Show Source
Nested Schema : Custom Discount Amount
Type: object
Title: Custom Discount Amount
The amount by which to adjust the list price because of a custom discount.
Show Source
Nested Schema : Discount Type
Type: object
Title: Discount Type
The type of custom discount to apply to this line.
Show Source
Nested Schema : Amount(Discount)
Type: object
Title: Amount(Discount)
The discount amount for this line.
Show Source
Nested Schema : Fulfillment Status
Type: object
Title: Fulfillment Status
The status for this line supplied by the fulfillment system after the transaction is submitted as a sales order.
Show Source
Nested Schema : Amount (List)
Type: object
Title: Amount (List)
The extended list amount for this line.
Show Source
Nested Schema : Price (List)
Type: object
Title: Price (List)
The list price of the item.
Show Source
Nested Schema : Amount (Net)
Type: object
Title: Amount (Net)
The extended list amount minus any discounts for this line.
Show Source
Nested Schema : Price (Net)
Type: object
Title: Price (Net)
The price paid by the customer for the item.
Show Source
Nested Schema : Period
Type: object
Title: Period
The period of service purchased at this price.
Show Source
Nested Schema : Price Type
Type: object
Title: Price Type
Indicates whether the amount on this line is charged once or periodically.
Show Source
Nested Schema : Unit of Measure
Type: object
Title: Unit of Measure
The unit of measure of the item requested by the customer (e.g. "Cases").
Show Source
Nested Schema : Status
Type: object
Title: Status
The status of this line.
Show Source
Nested Schema : Tax Exempt Reason
Type: object
Title: Tax Exempt Reason
The reason why this transaction is exempt from sales tax. For example, in the U.S. goods purchased for re-sale are not taxed. This value defaults from the value on the transaction.
Show Source
Nested Schema : Unit Cost
Type: object
Title: Unit Cost
The unit cost of the item.
Show Source
Nested Schema : Actions
Type: object
Title: Actions
Captures the current state of each action whose state was requested. The object contains one property per action, where the property name is the variable name for the action.
Nested Schema : Attributes
Type: object
Title: Attributes
Captures the current state of each attribute whose state was requested. The object contains one property per group, where the property name is the resource field name for the attribute.
Nested Schema : Groups
Type: object
Title: Groups
Captures the current state of each group whose state was requested. The object contains one property per group, where the property name is the expression string that uniquely identifies the group.
Nested Schema : Messages
Type: array
Title: Messages
Array of messages that have been generated for a specific object.
Show Source
Back to Top

Response

Default Response

Body ()
Root Schema : commerceTransactionLine-CalculatePriceResponse
Type: object
Show Source
Nested Schema : commerceTransactionLine
Type: object
Show Source
Nested Schema : Warnings
Type: array
Title: Warnings
Array of warnings that have been generated for a specific object.
Show Source
Nested Schema : Model Base Price
Type: object
Title: Model Base Price
Base price of the model
Show Source
Nested Schema : Part Base Price
Type: object
Title: Part Base Price
Price of the part
Show Source
Nested Schema : Configurable Price
Type: object
Title: Configurable Price
Original price as per catalog (inclusive of discount and premium)
Show Source
Nested Schema : Item Price
Type: object
Title: Item Price
The starting price. For Parts it will be the base price or price book price. For models it may be the base model price or the pricing rule or attribute value prices.
Show Source
Nested Schema : List Price
Type: object
Title: List Price
Will usually be the same value as the Item Price, unless a recommended item price applies.
Show Source
Nested Schema : Net Price
Type: object
Title: Net Price
Net price is subtotal minus the total discount
Show Source
Nested Schema : Override Discount
Type: object
Title: Override Discount
Override original discount
Show Source
Nested Schema : Override Price
Type: object
Title: Override Price
Override original list price
Show Source
Nested Schema : Total Discount
Type: object
Title: Total Discount
Total discount amount
Show Source
Nested Schema : Unit Price
Type: object
Title: Unit Price
Will usually be the same value as the List Price, unless a contract price applies.
Show Source
Nested Schema : Pricing Rule Price
Type: object
Title: Pricing Rule Price
Currently the customer level pricing. (Not applicable for Models)
Show Source
Nested Schema : state
Type: object
Title: state
Captures the current state of the resource row. Of available properties, only those that are applicable and whose values are known in the current context are included.
Show Source
  • Actions
    Title: Actions
    Captures the current state of each action whose state was requested. The object contains one property per action, where the property name is the variable name for the action.
  • Attributes
    Title: Attributes
    Captures the current state of each attribute whose state was requested. The object contains one property per group, where the property name is the resource field name for the attribute.
  • Title: Deletable
    Boolean value that specifies whether the row can be deleted.
  • Groups
    Title: Groups
    Captures the current state of each group whose state was requested. The object contains one property per group, where the property name is the expression string that uniquely identifies the group.
  • Title: Has Error
    Boolean value that specifies whether any error that occurred has been assigned to the row itself.
  • Title: Has Warning
    Boolean value that specifies whether any warning that was issued has been assigned to the row itself.
  • Title: Hidden
    Boolean value that specifies whether the row can be hidden.
  • Messages
    Title: Messages
    Array of messages that have been generated for a specific object.
  • Title: Updatable
    Boolean value that specifies whether the row can be updated.
Nested Schema : Actual Amount
Type: object
Title: Actual Amount
The actual amount billed to the customer.
Show Source
Nested Schema : Annual Discount
Type: object
Title: Annual Discount
The annual discount on the recurring charges on this line.
Show Source
Nested Schema : Annual Value
Type: object
Title: Annual Value
The annual contract value of the recurring charges on this line.
Show Source
Nested Schema : Cancel Reason
Type: object
Title: Cancel Reason
The reason why the customer cancelled this line.
Show Source
Nested Schema : Contract Discount
Type: object
Title: Contract Discount
The total discount of this line including all one - time and recurring charges.
Show Source
Nested Schema : Contract Value
Type: object
Title: Contract Value
The total contract value of this line including all one - time and recurring charges.
Show Source
Nested Schema : Cost Amount
Type: object
Title: Cost Amount
The total cost of this line.
Show Source
Nested Schema : Custom Discount Amount
Type: object
Title: Custom Discount Amount
The amount by which to adjust the list price because of a custom discount.
Show Source
Nested Schema : Discount Type
Type: object
Title: Discount Type
The type of custom discount to apply to this line.
Show Source
Nested Schema : Amount(Discount)
Type: object
Title: Amount(Discount)
The discount amount for this line.
Show Source
Nested Schema : Fulfillment Status
Type: object
Title: Fulfillment Status
The status for this line supplied by the fulfillment system after the transaction is submitted as a sales order.
Show Source
Nested Schema : Amount (List)
Type: object
Title: Amount (List)
The extended list amount for this line.
Show Source
Nested Schema : Price (List)
Type: object
Title: Price (List)
The list price of the item.
Show Source
Nested Schema : Amount (Net)
Type: object
Title: Amount (Net)
The extended list amount minus any discounts for this line.
Show Source
Nested Schema : Price (Net)
Type: object
Title: Price (Net)
The price paid by the customer for the item.
Show Source
Nested Schema : Period
Type: object
Title: Period
The period of service purchased at this price.
Show Source
Nested Schema : Price Type
Type: object
Title: Price Type
Indicates whether the amount on this line is charged once or periodically.
Show Source
Nested Schema : Unit of Measure
Type: object
Title: Unit of Measure
The unit of measure of the item requested by the customer (e.g. "Cases").
Show Source
Nested Schema : Status
Type: object
Title: Status
The status of this line.
Show Source
Nested Schema : Tax Exempt Reason
Type: object
Title: Tax Exempt Reason
The reason why this transaction is exempt from sales tax. For example, in the U.S. goods purchased for re-sale are not taxed. This value defaults from the value on the transaction.
Show Source
Nested Schema : Unit Cost
Type: object
Title: Unit Cost
The unit cost of the item.
Show Source
Nested Schema : Actions
Type: object
Title: Actions
Captures the current state of each action whose state was requested. The object contains one property per action, where the property name is the variable name for the action.
Nested Schema : Attributes
Type: object
Title: Attributes
Captures the current state of each attribute whose state was requested. The object contains one property per group, where the property name is the resource field name for the attribute.
Nested Schema : Groups
Type: object
Title: Groups
Captures the current state of each group whose state was requested. The object contains one property per group, where the property name is the expression string that uniquely identifies the group.
Nested Schema : Messages
Type: array
Title: Messages
Array of messages that have been generated for a specific object.
Show Source
Back to Top

Examples

The following example shows how to re-calculate pricing data, after a pricing field is modified, by submitting a POST request to the REST resource using cURL. For more information about cURL, see Use cURL.

curl -X POST -i -H "Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQg" -H "Accept: application/json"
https://sitename.oracle.com/rest/v7/commerceDocumentsOraclecpqoTransaction/18016533/transactionLine/3/actions/_calculate_price_action

Request Body Sample

{
   "documents": {
      "_price_quantity": 10,
      "_price_override_quantity": true,
      "_price_item_price_each": {
         "value": 11,
         "currency": "USD"
      },
      "_pricing_rule_price_each": {
         "value": 14,
         "currency": "USD"
      },
      "_price_unit_price_each": {
         "value": 15,
         "currency": "USD"
      },
      "_price_override_price": {
         "value": "Yes",
         "displayValue": "Yes"
      },
      "_price_discount_percent": 18,
      "_price_override_discount": {
         "value": "Percent",
         "displayValue": "Percent"
      }
   }
}
         

Response: The response contains the JSON Transaction data.

Notes:

  • The Override Price attribute should be set to Yes to allow overrides when invoking the REST to perform recalculation.
  • If Override Price is set to No and there are new price values, the values will be reset to the original values and returned via the REST API. There will be no warning or error message when new values are provided for recalculation.
  • The recalculated values returned via the REST API are not saved in the database until a modify type action is invoked.
Back to Top