Order Management

Get Involved. Join the Conversation.

Topic

    Prateek Parasar
    [Solved]Webservice Payload for Change OrderAnswered
    Topic posted August 24, 2019 by Prateek ParasarBlack Diamond: 60,000+ Points, last edited October 8, 2019, tagged Order Management 
    178 Views, 21 Comments
    Title:
    [Solved]Webservice Payload for Change Order
    Summary:
    Webservice payload for change order to update quantity
    Content:

    I have a requirement to update and cancel the order through an integration. I know there is only one webservice called createorder which can be used for everything. I have been able to cancel the order which was originally created in fusion manually but I have not been able to update the order quantity. It keeps complaining about some fields specially about billing address or address usage. Has anyone got a working example payload sample. It would be a great help.

     

     

    Version:
    R13

    Best Comment

    Venkatesh Malapati

    For create order, ship to & bill to gets cascaded from the header to the lines if they are not sent on the line and where as in the context of change order, the bill to & ship to need to be explicitly passed on the lines. So please make sure that the bill to & ship to are passed on the lines. Also in the SOAP webservices, the change order requires both the changed & unchanged attributes on the order & lines to be passed in the payload. So you will have to use the Get Order Details to ensure that all of the attributes are passed on the change order.

    With sales order for order hub REST in 19C, the patch operation allows sending only the changed attribute for a specific line and not the entire order.

    Comment

     

    • Shyam Singh Patel

      Hi Prateek,

      this is the same web service you can use to update the sales order Qty(OrderImportService). Make sure to prepare the payload and include <ns3:OperationMode>UPDATE</ns3:OperationMode>  at header and Line Level TAG

      Regards
      Shyam

    • Prateek Parasar

      I have been able to work with the same Payload and cancel using the operation mode but somehow Update isn't working. I am assuming I must send exact payload a create would do but In my case order is getting created in fusion manually. Do you have the payload/sample which would work ? Any working copu would help. Mine always fails around Bill to address whatever I do, may be I need to query some fusion table and supply specific info but I have done that. A sample would help. thanks.

       

    • Shyam Singh Patel

      Hi Prateek,

      If you are creating the Order Manually in fusion then first you have to construct the payload and the use it in web service. for this, you must use the web service to get order details. 
       

      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://xmlns.oracle.com/apps/scm/doo/decomposition/orderDetailServices/orderInformationService/types/" xmlns:ord="http://xmlns.oracle.com/apps/scm/doo/decomposition/orderDetailServices/orderInformationService/">
         <soapenv:Header/>
         <soapenv:Body>
            <typ:GetOrderDetails>
               <!--Zero or more repetitions:-->
               <typ:Order>
                  <ord:SourceTransactionSystem>OPS</ord:SourceTransactionSystem>
                  <ord:SourceTransactionNumber>201906191004</ord:SourceTransactionNumber>
               </typ:Order>
            </typ:GetOrderDetails>
         </soapenv:Body>
      </soapenv:Envelope>

    • Prateek Parasar

      I have been doing this already. My czncel works fine but somehow updat didn’t. I will try again for sure.

    • Venkatesh Malapati

      For create order, ship to & bill to gets cascaded from the header to the lines if they are not sent on the line and where as in the context of change order, the bill to & ship to need to be explicitly passed on the lines. So please make sure that the bill to & ship to are passed on the lines. Also in the SOAP webservices, the change order requires both the changed & unchanged attributes on the order & lines to be passed in the payload. So you will have to use the Get Order Details to ensure that all of the attributes are passed on the change order.

      With sales order for order hub REST in 19C, the patch operation allows sending only the changed attribute for a specific line and not the entire order.

      • Prateek Parasar

        I have used the order information service and used all the attributes but Getting this error as I can't see any currency field on header. and I am not able to supply Linecharge as it still complains about this

         

         <env:Body>
              <ns0:createOrdersResponse xmlns:ns0="http://xmlns.oracle.com/apps/scm/fom/importOrders/orderImportService/types/">
                 <ns1:result xsi:type="ns0:OrderImportResponse" xmlns:ns1="http://xmlns.oracle.com/apps/scm/fom/importOrders/orderImportService/types/" xmlns:ns0="http://xmlns.oracle.com/apps/scm/fom/importOrders/orderImportService/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
                    <ns0:SourceTransactionNumber>18122</ns0:SourceTransactionNumber>
                    <ns0:SourceTransactionIdentifier>300000023119408</ns0:SourceTransactionIdentifier>
                    <ns0:SourceTransactionSystem>OPS</ns0:SourceTransactionSystem>
                    <ns0:OrderNumber xsi:nil="true"/>
                    <ns0:HeaderId xsi:nil="true"/>
                    <ns0:OrderStatus xsi:nil="true"/>
                    <ns0:ReturnStatus>ERROR</ns0:ReturnStatus>
                    <ns0:MessageName>env:Server</ns0:MessageName>
                    <ns0:MessageText>The order was not priced because the currency in order 18122 does not contain a value. Make sure this currency contains a value, and then reprice the order.</ns0:MessageText>
                    <ns0:FlowType xsi:nil="true"/>
                    <ns0:ChangeVersionNumber>2</ns0:ChangeVersionNumber>
                 </ns1:result>
              </ns0:createOrdersResponse>
           </env:Body>

         

        • Prateek Parasar

          Finally got it working. I could change the quantity but the amounts were going away so had to add LineCharge and Charge Component as well

          <soapenv:Envelope xmlns:mod="http://xmlns.oracle.com/apps/scm/doo/processOrder/model/" xmlns:ord="http://xmlns.oracle.com/apps/scm/fom/importOrders/orderImportService/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://xmlns.oracle.com/apps/scm/fom/importOrders/orderImportService/types/">
             <soapenv:Header>
            
             </soapenv:Header>
             <soapenv:Body>
                <typ:createOrders>
                   <typ:request>
                      <!--Optional:-->
                      <ord:BatchName/>
                      <!--Zero or more repetitions:-->
                      <ord:Order>
                         <!--Optional:-->
                         <ord:SourceTransactionIdentifier>300000023124757</ord:SourceTransactionIdentifier>
                         <!--Optional:-->
                         <ord:SourceTransactionSystem>OPS</ord:SourceTransactionSystem>
                         <!--Optional:-->
                         <ord:RevisionSourceSystem>OPS</ord:RevisionSourceSystem>
                         <!--Optional:-->
                         <ord:SourceTransactionNumber>18127</ord:SourceTransactionNumber>
                         <!--Optional:-->
                         <ord:BuyingPartyType/>
                         <!--Optional:-->
                         <ord:BuyingPartyId>300000014697863</ord:BuyingPartyId>
                         <!--Optional:-->
                         <ord:BuyingPartyName>MY CUSTOMER</ord:BuyingPartyName>
                         <!--Optional:-->
                         <ord:BuyingPartyNumber/>
                         <!--Optional:-->
                         <ord:BuyingPartyOrigSystemReference/>
                         <!--Optional:-->
                         <ord:BuyingPartyPersonFirstName/>
                         <!--Optional:-->
                         <ord:BuyingPartyPersonLastName/>
                         <!--Optional:-->
                         <ord:BuyingPartyPersonMiddleName/>
                         <!--Optional:-->
                         <ord:BuyingPartyPersonNameSuffix/>
                         <!--Optional:-->
                         <ord:BuyingPartyPersonTitle/>
                         <!--Optional:-->
                         <ord:BuyingPartyContactId/>
                         <!--Optional:-->
                         <ord:BuyingPartyContactName/>
                         <!--Optional:-->
                         <ord:BuyingPartyContactNumber/>
                         <!--Optional:-->
                         <ord:BuyingPartyContactOrigSystemReference/>
                         <!--Optional:-->
                         <ord:BuyingPartyContactFirstName/>
                         <!--Optional:-->
                         <ord:BuyingPartyContactLastName/>
                         <!--Optional:-->
                         <ord:BuyingPartyContactMiddleName/>
                         <!--Optional:-->
                         <ord:BuyingPartyContactNameSuffix/>
                         <!--Optional:-->
                         <ord:BuyingPartyContactTitle/>
                         <!--Optional:-->
                         <ord:PreferredSoldToContactPointIdentifier/>
                         <!--Optional:-->
                         <ord:PreferredSoldToContactPointOrigSystemReference/>
                         <!--Optional:-->
                         <ord:CustomerPONumber/>
                         <!--Optional:-->
                         <!--Optional:-->
                         <ord:TransactionOn/>
                         <!--Optional:-->
                         <ord:RequestingBusinessUnitIdentifier/>
                         <!--Optional:-->
                         <ord:RequestingBusinessUnitName>MY BU</ord:RequestingBusinessUnitName>
                         <!--Optional:-->
                         <ord:TransactionTypeCode>ORDER TYPE</ord:TransactionTypeCode>
                         <!--Optional:-->
                         <ord:CurrencyConversionType/>
                         <!--Optional:-->
                         <ord:CurrencyConversionRate/>
                         <!--Optional:-->
                         <ord:CurrencyConversionDate/>
                         <!--Optional:-->
                         <ord:TransactionDocumentTypeCode/>
                         <!--Optional:-->
                         <ord:SourceTransactionRevisionNumber/>
                         <!--Optional:-->
                         <ord:CancelReasonCode/>
                         <!--Optional:-->
                         <ord:CancelReason/>
                         <!--Optional:-->
                         <ord:RequestCancelDate/>
                         <ord:TransactionalCurrencyCode>GBP</ord:TransactionalCurrencyCode>
                         <!--Optional:-->
                         <ord:Comments>Prateek updated quantity SoapUI</ord:Comments>
                         <!--Optional:-->
                         <ord:RequestingLegalUnitIdentifier/>
                         <!--Optional:-->
                         <ord:RequestingLegalUnit/>
                         <!--Optional:-->
                         <ord:OrigSystemDocumentReference/>
                         <!--Optional:-->
                         <ord:PartialShipAllowedFlag/>
                         <!--Optional:-->
                         <ord:OperationMode>UPDATE</ord:OperationMode>
                         <!--Optional:-->
                         <ord:PricedOn/>
                         <!--Optional:-->
                         <ord:FreezePriceFlag/>
                         <!--Optional:-->
                         <ord:FreezeShippingChargeFlag/>
                         <!--Optional:-->
                         <ord:FreezeTaxFlag/>
                         <!--Optional:-->
                         <ord:ShipToPartyType/>
                         <!--Optional:-->
                         <ord:ShipToPartyIdentifier>300000014697863</ord:ShipToPartyIdentifier>
                         <!--Optional:-->
                         <ord:ShipToPartyName/>
                         <!--Optional:-->
                         <ord:ShipToPartyNumber/>
                         <!--Optional:-->
                         <ord:ShipToPartyPersonFirstName/>
                         <!--Optional:-->
                         <ord:ShipToPartyPersonLastName/>
                         <!--Optional:-->
                         <ord:ShipToPartyPersonMiddleName/>
                         <!--Optional:-->
                         <ord:ShipToPartyPersonNameSuffix/>
                         <!--Optional:-->
                         <ord:ShipToPartyPersonTitle/>
                         <!--Optional:-->
                         <ord:ShipToPartySiteIdentifier>300000014697867</ord:ShipToPartySiteIdentifier>
                         <!--Optional:-->
                         <ord:ShipToAddress1/>
                         <!--Optional:-->
                         <ord:ShipToAddress2/>
                         <!--Optional:-->
                         <ord:ShipToAddress3/>
                         <!--Optional:-->
                         <ord:ShipToAddress4/>
                         <!--Optional:-->
                         <ord:ShipToCity/>
                         <!--Optional:-->
                         <ord:ShipToPostalCode/>
                         <!--Optional:-->
                         <ord:ShipToState/>
                         <!--Optional:-->
                         <ord:ShipToProvince/>
                         <!--Optional:-->
                         <ord:ShipToCounty/>
                         <!--Optional:-->
                         <ord:ShipToCountry/>
                         <!--Optional:-->
                         <ord:ShipToAddressOrigSystemReference/>
                         <!--Optional:-->
                         <ord:ShipToPartyContactIdentifier/>
                         <!--Optional:-->
                         <ord:ShipToPartyContactName/>
                         <!--Optional:-->
                         <ord:ShipToPartyContactNumber/>
                         <!--Optional:-->
                         <ord:ShipToPartyContactOrigSystemReference/>
                         <!--Optional:-->
                         <ord:ShipToContactFirstName/>
                         <!--Optional:-->
                         <ord:ShipToContactLastName/>
                         <!--Optional:-->
                         <ord:ShipToContactMiddleName/>
                         <!--Optional:-->
                         <ord:ShipToContactNameSuffix/>
                         <!--Optional:-->
                         <ord:ShipToContactTitle/>
                         <!--Optional:-->
                         <ord:PreferredShipToContactPointIdentifier/>
                         <!--Optional:-->
                         <ord:PreferredShipToContactPointOrigSystemReference/>
                         <!--Optional:-->
                         <ord:BillToPartyType/>
                         <!--Optional:-->
                         <ord:BillToCustomerIdentifier/>
                         <!--Optional:-->
                         <ord:BillToCustomerName/>
                         <!--Optional:-->
                         <ord:BillToCustomerNumber>21004</ord:BillToCustomerNumber>
                         <!--Optional:-->
                         <ord:BillToAccountDescription/>
                         <!--Optional:-->
                         <ord:BillToAccountPersonFirstName/>
                         <!--Optional:-->
                         <ord:BillToAccountPersonLastName/>
                         <!--Optional:-->
                         <ord:BillToAccountPersonMiddleName/>
                         <!--Optional:-->
                         <ord:BillToAccountPersonNameSuffix/>
                         <!--Optional:-->
                         <ord:BillToAccountPersonTitle/>
                         <!--Optional:-->
                         <ord:BillToAccountSiteUseIdentifier>300000014697886</ord:BillToAccountSiteUseIdentifier>
                         <!--Optional:-->
                         <ord:BillToAddress1/>
                         <!--Optional:-->
                         <ord:BillToAddress2/>
                         <!--Optional:-->
                         <ord:BillToAddress3/>
                         <!--Optional:-->
                         <ord:BillToAddress4/>
                         <!--Optional:-->
                         <ord:BillToCity/>
                         <!--Optional:-->
                         <ord:BillToPostalCode/>
                         <!--Optional:-->
                         <ord:BillToState/>
                         <!--Optional:-->
                         <ord:BillToProvince/>
                         <!--Optional:-->
                         <ord:BillToCounty/>
                         <!--Optional:-->
                         <ord:BillToCountry/>
                         <!--Optional:-->
                         <ord:BillToAddressOrigSystemReference/>
                         <!--Optional:-->
                         <ord:BillToAccountContactIdentifier/>
                         <!--Optional:-->
                         <ord:BillToAccountContactName/>
                         <!--Optional:-->
                         <ord:BillToAccountContactNumber/>
                         <!--Optional:-->
                         <ord:BillToAccountContactOrigSystemReference/>
                         <!--Optional:-->
                         <ord:BillToContactFirstName/>
                         <!--Optional:-->
                         <ord:BillToContactLastName/>
                         <!--Optional:-->
                         <ord:BillToContactMiddleName/>
                         <!--Optional:-->
                         <ord:BillToContactNameSuffix/>
                         <!--Optional:-->
                         <ord:BillToContactTitle/>
                         <!--Optional:-->
                         <ord:PreferredBillToContactPointIdentifier/>
                         <!--Optional:-->
                         <ord:PreferredBillToContactPointOrigSystemReference/>
                         <!--Optional:-->
                         <ord:BuyingPartyPersonEmail/>
                         <!--Optional:-->
                         <ord:BuyingPartyOrganizationEmail/>
                         <!--Optional:-->
                         <ord:BuyingPartyContactEmail/>
                         <!--Optional:-->
                         <ord:BillToPartyPersonEmail/>
                         <!--Optional:-->
                         <ord:BillToPartyOrganizationEmail/>
                         <!--Optional:-->
                         <ord:BillToContactEmail/>
                         <!--Optional:-->
                         <ord:Line>
                            <!--Optional:-->
                            <ord:SourceTransactionLineIdentifier>300000023124792</ord:SourceTransactionLineIdentifier>
                            <!--Optional:-->
                            <ord:SourceTransactionScheduleIdentifier>1</ord:SourceTransactionScheduleIdentifier>
                            <!--Optional:-->
                            <ord:SourceTransactionLineNumber>1</ord:SourceTransactionLineNumber>
                            <!--Optional:-->
                            <ord:SourceTransactionScheduleNumber>1</ord:SourceTransactionScheduleNumber>
                            <!--Optional:-->
                            <ord:ProductIdentifier>300000014718431</ord:ProductIdentifier>
                            <!--Optional:-->
                            <ord:ProductNumber>ITM14</ord:ProductNumber>
                            <!--Optional:-->
                            <ord:ProductDescription/>
                            <!--Optional:-->
                            <ord:SourceSystemProductReference/>
                            <!--Optional:-->
                            <ord:OrderedQuantity unitCode="zzI">8</ord:OrderedQuantity>
                            <!--Optional:-->
                            <ord:OrderedUOMCode>zzI</ord:OrderedUOMCode>
                            <!--Optional:-->
                            <ord:OrderedUOM>WKLY</ord:OrderedUOM>
                            <ord:PaymentTermsCode/>
                            <!--Optional:-->
                            <ord:PaymentTerms>30 days</ord:PaymentTerms>
                            <!--Optional:-->
                            <ord:TransactionCategoryCode>ORDER</ord:TransactionCategoryCode>
                            <!--Optional:-->
                            <!--Optional:-->
                            <ord:InventoryOrganizationIdentifier/>
                            <!--Optional:-->
                            <ord:InventoryOrganization>ZEN_2</ord:InventoryOrganization>
                            <!--Optional:-->
                            <ord:ShipToPartyType/>
                            <!--Optional:-->
                            <ord:ShipToPartyIdentifier/>
                            <!--Optional:-->
                            <ord:ShipToPartyName>MY CUSTOMER</ord:ShipToPartyName>
                            <!--Optional:-->
                            <ord:ShipToPartyNumber/>
                            <ord:ShipToPartySiteIdentifier>300000014697867</ord:ShipToPartySiteIdentifier>
                            <!--Optional:-->
                            <ord:BillToPartyType/>
                            <!--Optional:-->
                            <ord:BillToCustomerIdentifier/>
                            <!--Optional:-->
                            <ord:BillToCustomerName>MY CUSTOMER</ord:BillToCustomerName>
                            <!--Optional:-->
                            <ord:BillToCustomerNumber>21004</ord:BillToCustomerNumber>
                            <!--Optional:-->
                            <ord:BillToAccountSiteUseIdentifier>300000014697886</ord:BillToAccountSiteUseIdentifier>
                            <!--Optional:-->
                            <ord:Comments>test pp line1</ord:Comments>
                            <!--Optional:-->
                            <ord:UnitListPrice currencyCode="GBP">1400</ord:UnitListPrice>
                            <!--Optional:-->
                            <ord:UnitSellingPrice currencyCode="GBP">1400</ord:UnitSellingPrice>
                            <ord:ExtendedAmount currencyCode="GBP">11200</ord:ExtendedAmount>
                            <!--Optional:-->
                            <ord:UnitQuantity unitCode="zzI">8</ord:UnitQuantity>
                            <ord:TransactionBusinessCategoryName/>
                            <!--Optional:-->
                            <ord:TransactionBusinessCategory/>
                            <ord:LineIdentifier>300000023124792</ord:LineIdentifier>
                            <ord:LineNumber>1</ord:LineNumber>
                            <ord:FulfillLineIdentifier>300000023124777</ord:FulfillLineIdentifier>
                            <!--Optional:-->
                            <ord:OperationMode>UPDATE</ord:OperationMode>
                            <!--Optional:-->
                            <ord:OrderCharge>
                               <!--Optional:-->
                               <ord:ChargeDefinition>Sale Price</ord:ChargeDefinition>
                               <!--Optional:-->
                               <ord:ChargeDefinitionCode>QP_SALE_PRICE</ord:ChargeDefinitionCode>
                               <!--Optional:-->
                               <ord:ChargeSubtype>Price</ord:ChargeSubtype>
                               <!--Optional:-->
                               <ord:ChargeSubtypeCode/>
                               <!--Optional:-->
                               <ord:PriceType/>
                               <!--Optional:-->
                               <ord:PriceTypeCode>ONE_TIME</ord:PriceTypeCode>
                               <!--Optional:-->
                               <ord:PricedQuantity unitCode="zzI">8</ord:PricedQuantity>
                               <!--Optional:-->
                               <ord:PricedQuantityUOM>WKLY</ord:PricedQuantityUOM>
                               <!--Optional:-->
                               <ord:PricedQuantityUOMCode>zzI</ord:PricedQuantityUOMCode>
                               <!--Optional:-->
                               <ord:PrimaryFlag>true</ord:PrimaryFlag>
                               <!--Optional:-->
                               <ord:ApplyTo>PRICE</ord:ApplyTo>
                               <!--Optional:-->
                               <ord:RollupFlag/>
                               <!--Optional:-->
                               <ord:SourceChargeIdentifier>300000023124793</ord:SourceChargeIdentifier>
                               <!--Optional:-->
                               <ord:ChargeType>Sale</ord:ChargeType>
                               <!--Optional:-->
                               <ord:ChargeTypeCode/>
                               <!--Optional:-->
                               <ord:ChargeCurrencyName/>
                               <!--Optional:-->
                               <ord:ChargeCurrencyCode>GBP</ord:ChargeCurrencyCode>
                               <!--Optional:-->
                               <ord:SequenceNumber>1</ord:SequenceNumber>
                               <!--Optional:-->
                               <ord:PricePeriodicityCode/>
                               <!--Optional:-->
                               <!--Optional:-->
                               <ord:OrderChargeComponent>
                                  <!--Optional:-->
                                  <ord:ChargeCurrencyName/>
                                  <!--Optional:-->
                                  <ord:ChargeCurrencyCode>GBP</ord:ChargeCurrencyCode>
                                  <!--Optional:-->
                                  <ord:HeaderCurrencyName></ord:HeaderCurrencyName>
                                  <!--Optional:-->
                                  <ord:HeaderCurrencyCode>GBP</ord:HeaderCurrencyCode>
                                  <!--Optional:-->
                                  <ord:HeaderCurrencyExtendedAmount currencyCode="GBP">11200</ord:HeaderCurrencyExtendedAmount>
                                  <!--Optional:-->
                                  <ord:PriceElement>Your Price</ord:PriceElement>
                                  <!--Optional:-->
                                  <ord:PriceElementCode>QP_NET_PRICE</ord:PriceElementCode>
                                  <!--Optional:-->
                                  <ord:SequenceNumber>
          1002</ord:SequenceNumber>
                                  <!--Optional:-->
                                  <ord:PriceElementUsage/>
                                  <!--Optional:-->
                                  <ord:PriceElementUsageCode>NET_PRICE</ord:PriceElementUsageCode>
                                  <!--Optional:-->
                                  <ord:ChargeCurrencyUnitPrice currencyCode="GBP">1400</ord:ChargeCurrencyUnitPrice>
                                  <!--Optional:-->
                                  <ord:HeaderCurrencyUnitPrice currencyCode="GBP">1400</ord:HeaderCurrencyUnitPrice>
                                  <!--Optional:-->
                                  <ord:RollupFlag/>
                                  <!--Optional:-->
                                  <ord:SourceParentChargeComponentId/>
                                  <!--Optional:-->
                                  <ord:SourceChargeIdentifier/>
                                  <!--Optional:-->
                                  <ord:SourceChargeComponentIdentifier>300000023124793</ord:SourceChargeComponentIdentifier>
                                  <!--Optional:-->
                                 
                             
                               </ord:OrderChargeComponent>
                            </ord:OrderCharge>
                         </ord:Line>
                      </ord:Order>
                   </typ:request>
                </typ:createOrders>
             </soapenv:Body>
          </soapenv:Envelope>

           

           

    • Prateek Parasar

      I have experienced that even with cancel order I had to pass all the header values else it updates them to blank. Similarly I could see that I had to supply everything on the line otherwise I was getting error for fields. I almost got it working as mine only failed for bill to address usage, I passed the value exactly as its in the party site table but still not worked. 

       

      I like rest more than soap but couldn’t find rest until June when I was trying this. If rest is available Inwill try. Can you send me the reference to the rest service for Order Management 

    • Venkatesh Malapati

      Can you share the JSON payload along with the URL you used for the patch?

       

      The following URL for POST along with the payload referenced below for creating the order works for me. I further subsequently used the patch operation for changing the warehouse on the line. 

      Please note this was for a Fusion Priced Order where the freezeflags were sent as false and hence the charge & charge components don't need to be passed in the payload. Only if it is a pre-priced order, then the charge & charge components need to be passed in the payload while creating the order. But for change, only whatever the attributes that are being changed need to be sent in the payload as shown for the warehouse example below.

      https://host:port/fscmRestApi/resources/11.13.18.05/salesOrdersForOrderHub/

      {
         
          "SourceTransactionNumber": "VM1",
          "SourceTransactionSystem": "GPR",
          "SourceTransactionId": "VM1",
          "BusinessUnitId": 204,
          "BusinessUnitName": "Vision Operations",
          "TransactionOn": "2019-10-04T18:35:19+00:00",
          "BuyingPartyId": 1006,
          "BuyingPartyName": "Computer Service and Rentals",
          "BuyingPartyNumber": "1006",
          "RequestedShipDate": "2019-10-04T18:35:19+00:00",
          "RequestingBusinessUnitId": 204,
          "RequestingBusinessUnitName": "Vision Operations",
          "RequestingLegalEntityId": 204,
          "RequestingLegalEntity": "Vision Operations",
          "FreezePriceFlag": false,
          "FreezeShippingChargeFlag": false,
          "FreezeTaxFlag": false,
          "lines": [
              {
                  "SourceTransactionLineId": "1",
                  "SourceTransactionLineNumber": "1",
                "SourceTransactionScheduleId":"1",
                "SourceScheduleNumber":"1",
                  "TransactionCategoryCode": "ORDER",
                  "ProductId": 149,
                  "ProductNumber": "AS54888",
                  "ProductDescription": "Standard Desktop",
                  "OrderedQuantity": 6,
                  "OrderedUOMCode": "Ea",
                  "OrderedUOM": "Each"
                }
      ]
      }

      For patch, use the following URL. For the Order Key in the URL, you will have to provide the sourceordersystem:sourceorderID as shown below.

      https://host:port/fscmRestApi/resources/11.13.18.05/salesOrdersForOrderHub/GPR:300100180763845

      {
      "lines": [
      {
      "FulfillLineId":300100180763870,
      "RequestedFulfillmentOrganizationCode": "M1"

      }
      ]
      }

       

       

      • Prateek Parasar

        I was using patch on the line. I will try this, you are still updating whole order and passing line details. My order is also priced in fusion but kept on asking line charge and component in the error. Is it some setting in fusion as even in the soap my error was about missing charge components. I was just updating the order created manually so source system is OpS.

        I got it working but still had to provide children of line as charge and components. Could it be because I want update quantity which requires repricing while your scenario doesn’t.

         

        I got Soap working for cancelling my whole order. Can you send me a sample to cancel the order from Rest if you have. Similarly cancel one line. This would be really helpful.

        • Venkatesh Malapati

          If the order is pre priced in an external application/channel, then you can send in the  "FreezePriceFlag": true which requires the charge & charge components to be sent in when the order is being created. Whereas the order is priced in Fusion and in which the   "FreezePriceFlag": false is what you will send as and the charge & charge components won't be required to be passed.

          So depending on whether the order is pre-priced or not, the charge & charge components need to be sent. Please note sending the  "FreezePriceFlag": true means the order will never be repriced in Order Management Cloud.

      • Prateek Parasar

        Ok so doing a simple test now. I created the order through Front end and now just updating comments. So first showin GET

        https://aaaaa.fa.us2.oraclecloud.com/fscmRestApi/resources/11.13.18.05/salesOrdersForOrderHub?q=OrderNumber=18135 (GET)

        Returns my order as below :

        {
            "items": [
                {
                    "HeaderId": 300000024228568,
                    "OrderNumber": "18135",
                    "SourceTransactionNumber": "18135",
                    "SourceTransactionSystem": "OPS",
                    "SourceTransactionId": "300000024228568",
                    "BusinessUnitId": 300000009777624,
                    "BusinessUnitName": "Zen One Group",
                    "TransactionOn": "2019-10-03T10:06:35+00:00",
                    "BuyingPartyId": 300000014697863,
                    "BuyingPartyName": "Oasis Customer Zen",
                    "BuyingPartyNumber": "54075",
                    "BuyingPartyPersonFirstName": null,
                    "BuyingPartyPersonLastName": null,
                    "BuyingPartyPersonMiddleName": null,
                    "BuyingPartyPersonNameSuffix": null,
                    "BuyingPartyPersonTitle": null,
                    "BuyingPartyContactId": null,
                    "BuyingPartyContactName": null,
                    "BuyingPartyContactNumber": null,
                    "BuyingPartyContactFirstName": null,
                    "BuyingPartyContactLastName": null,
                    "BuyingPartyContactMiddleName": null,
                    "BuyingPartyContactNameSuffix": null,
                    "BuyingPartyContactTitle": null,
                    "PreferredSoldToContactPointId": null,
                    "CustomerPONumber": null,
                    "TransactionTypeCode": "",
                    "TransactionType": "",
                    "SubstituteAllowedFlag": false,
                    "PackingInstructions": null,
                    "ShippingInstructions": null,
                    "ShipsetFlag": false,
                    "PartialShipAllowedFlag": true,
                    "RequestedShipDate": "2019-10-01T10:06:35+00:00",
                    "RequestedArrivalDate": null,
                    "LatestAcceptableShipDate": null,
                    "LatestAcceptableArrivalDate": null,
                    "EarliestAcceptableShipDate": null,
                    "ShipmentPriorityCode": null,
                    "ShipmentPriority": null,
                    "ShippingCarrierId": null,
                    "ShippingCarrier": null,
                    "ShippingServiceLevelCode": null,
                    "ShippingServiceLevel": null,
                    "ShippingModeCode": null,
                    "ShippingMode": null,
                    "FOBPointCode": null,
                    "FOBPoint": null,
                    "DemandClassCode": null,
                    "DemandClass": null,
                    "FreightTermsCode": null,
                    "FreightTerms": null,
                    "RequestedFulfillmentOrganizationId": null,
                    "RequestedFulfillmentOrganizationCode": null,
                    "RequestedFulfillmentOrganizationName": null,
                    "SupplierId": null,
                    "SupplierName": null,
                    "SupplierSiteId": null,
                    "PaymentTermsCode": 300000003001618,
                    "PaymentTerms": "30 days",
                    "SalespersonId": null,
                    "Salesperson": null,
                    "PricedOn": null,
                    "TransactionalCurrencyCode": "GBP",
                    "TransactionalCurrencyName": "Pound Sterling",
                    "AppliedCurrencyCode": "GBP",
                    "CurrencyConversionDate": null,
                    "CurrencyConversionRate": null,
                    "CurrencyConversionType": null,
                    "PricingSegmentCode": null,
                    "PricingStrategyId": 300000014707533,
                    "PricingStrategyName": "Test",
                    "AllowCurrencyOverrideFlag": true,
                    "SegmentExplanationMessageName": null,
                    "PricingSegmentExplanation": null,
                    "StrategyExplanationMessageName": null,
                    "PricingStrategyExplanation": "The applicable pricing strategy for this transaction is Pricing Strategy=Test because Pricing Segment=null",
                    "SalesChannelCode": null,
                    "SalesChannel": null,
                    "Comments": null,
                    "StatusCode": "OPEN",
                    "Status": "Processing",
                    "OnHoldFlag": false,
                    "CanceledFlag": false,
                    "CancelReasonCode": null,
                    "CancelReason": null,
                    "RequestedCancelDate": null,
                    "RequestingBusinessUnitId": 300000009777624,
                    "RequestingBusinessUnitName": "Zen One Group",
                    "RequestingLegalEntityId": 300000009736874,
                    "RequestingLegalEntity": "Zen Construction Ltd",
                    "FreezePriceFlag": false,
                    "FreezeShippingChargeFlag": false,
                    "FreezeTaxFlag": false,
                    "SubmittedFlag": true,
                    "SubmittedBy": "products.user",
                    "SubmittedDate": "2019-10-03T10:10:00.312+00:00",
                    "TransactionDocumentTypeCode": null,
                    "PreCreditCheckedFlag": false,
                    "RevisionSourceSystem": null,
                    "SourceTransactionRevisionNumber": 1,
                    "TradeComplianceResultCode": null,
                    "LastUpdatedBy": "products.user",
                    "LastUpdateDate": "2019-10-03T10:10:00.003+00:00",
                    "CreatedBy": "products.user",
                    "CreationDate": "2019-10-03T10:06:35+00:00",
                    "OrigSystemDocumentReference": null,
                    "OrderKey": "OPS:300000024228568",
                    "AppliedCurrencyName": "Pound Sterling",
                    "TradeComplianceResult": null,
                    "SupplierSiteName": null,
                    "MessageText": null,
                    "links": [
                        {
                            "rel": "self",
                            "href": "https://fa.us2.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/salesOrdersForOrderHub/OPS%3A300000024228568",
                            "name": "salesOrdersForOrderHub",
                            "kind": "item",
                            "properties": {
                                "changeIndicator": "ACED0005737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A657870000000017704000000017372001B6F7261636C652E6A626F2E646F6D61696E2E4E756C6C56616C75655899C1C58DAABEEB02000149000A6D53514C54797065496478700000000C78"
                            }
                        },
                        {
                            "rel": "canonical",
                            "href": "https://.fa.us2.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/salesOrdersForOrderHub/OPS%3A300000024228568",
                            "name": "salesOrdersForOrderHub",
                            "kind": "item"
                        },
                        {
                            "rel": "child",
                            "href": "https://fa.us2.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/salesOrdersForOrderHub/OPS%3A300000024228568/child/additionalInformation",
                            "name": "additionalInformation",
                            "kind": "collection"
                        },
                        {
                            "rel": "child",
                            "href": "https://.fa.us2.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/salesOrdersForOrderHub/OPS%3A300000024228568/child/attachments",
                            "name": "attachments",
                            "kind": "collection"
                        },
                        {
                            "rel": "child",
                            "href": "https:/.fa.us2.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/salesOrdersForOrderHub/OPS%3A300000024228568/child/billToCustomer",
                            "name": "billToCustomer",
                            "kind": "collection"
                        },
                        {
                            "rel": "child",
                            "href": "https://.fa.us2.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/salesOrdersForOrderHub/OPS%3A300000024228568/child/copyOrderReference",
                            "name": "copyOrderReference",
                            "kind": "collection"
                        },
                        {
                            "rel": "child",
                            "href": "https://.fa.us2.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/salesOrdersForOrderHub/OPS%3A300000024228568/child/holds",
                            "name": "holds",
                            "kind": "collection"
                        },
                        {
                            "rel": "child",
                            "href": "https://.fa.us2.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/salesOrdersForOrderHub/OPS%3A300000024228568/child/lines",
                            "name": "lines",
                            "kind": "collection"
                        },
                        {
                            "rel": "child",
                            "href": "https://.fa.us2.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/salesOrdersForOrderHub/OPS%3A300000024228568/child/payments",
                            "name": "payments",
                            "kind": "collection"
                        },
                        {
                            "rel": "child",
                            "href": "https://t.fa.us2.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/salesOrdersForOrderHub/OPS%3A300000024228568/child/salesCredits",
                            "name": "salesCredits",
                            "kind": "collection"
                        },
                        {
                            "rel": "child",
                            "href": "https://t.fa.us2.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/salesOrdersForOrderHub/OPS%3A300000024228568/child/shipToCustomer",
                            "name": "shipToCustomer",
                            "kind": "collection"
                        },
                        {
                            "rel": "child",
                            "href": "https://.fa.us2.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/salesOrdersForOrderHub/OPS%3A300000024228568/child/totals",
                            "name": "totals",
                            "kind": "collection"
                        }
                    ]
                }
            ],
            "count": 1,
            "hasMore": false,
            "limit": 25,
            "offset": 0,
            "links": [
                {
                    "rel": "self",
                    "href": "https://.fa.us2.oraclecloud.com:443/fscmRestApi/resources/11.13.18.05/salesOrdersForOrderHub",
                    "name": "salesOrdersForOrderHub",
                    "kind": "collection"
                }
            ]
        }

         

        Just just trying to update the comment, I tried Status too but consistently getting below error.

        My Patch URL

        https://ecdw-test.fa.us2.oraclecloud.com/fscmRestApi/resources/11.13.18.05/salesOrdersForOrderHub/OPS:300000024228568 (PATCH)

        Payload :

        {
            
                   
                    "Comments": "Prateek Updated"
           
        }

         

        Error : (This is always an error when JSON is about to do something so when payload passes any validation otherwise I get a validation error)

        SourceTransactionLineNumber 1, SourceScheduleNumber 1: An order was not created for the source order with the following details: source order 18135, source order line 1, source order schedule 1. (DOO-2685704) Details: An order was not created because the value QP_BASE_LIST_PRICE provided for the attribute PriceElementCode is invalid for the source order with the following details: source order 18135, source order line 1, source order schedule 1, source order charge 300000024228616, source order charge component 300000024228617. Check the attribute value, and resubmit the order.
        SourceTransactionLineNumber 1, SourceScheduleNumber 1: An order was not created for the source order with the following details: source order 18135, source order line 1, source order schedule 1. (DOO-2685704) Details: An order was not created because the value QP_NET_PRICE provided for the attribute PriceElementCode is invalid for the source order with the following details: source order 18135, source order line 1, source order schedule 1, source order charge 300000024228616, source order charge component 300000024228619. Check the attribute value, and resubmit the order.
        SourceTransactionLineNumber 1, SourceScheduleNumber 1: An order was not created for the source order with the following details: source order 18135, source order line 1, source order schedule 1. (DOO-2685704) Details: An order was not created because the value QP_MARGIN provided for the attribute PriceElementCode is invalid for the source order with the following details: source order 18135, source order line 1, source order schedule 1, source order charge 300000024228616, source order charge component 300000024228620. Check the attribute value, and resubmit the order.

         

        I could update line quantity through soap only when I supplied this but atleast I could cancel without giving any of this. But REST fails all the time with this error.

    • Prateek Parasar

      Following this DOC now

      Error When Create Order Via Rest API (Doc ID 2536187.1)

      • Prateek Parasar

        I activated these element code Using "Manage Price Elements" and now can update everything.

        all working. So glad.

        • Prateek Parasar

          Cancelled using this

          {
             
                     
                         "CanceledFlag": true,
                          "Comments": "Prateek cancelled"
             
          }

    • Prateek Parasar

      I think now even SOAP should take the update without passing charge and components as Charge components seem to have an issue althogu they were working fine through front end or when supplied through SOAP.

    • Prateek Parasar

      Just updated quantity by this

      https://ecdw-test.fa.us2.oraclecloud.com/fscmRestApi/resources/11.13.18.05/salesOrdersForOrderHub/OPS:300000024427453/child/lines/00020000000EACED00057708000110D932E37BBF0000000EACED00057708000110D932E37BBE (PATCH)

      Payload :

      {"OrderedQuantity": 8}