Saturday, June 6, 2020

Oracle ERP cloud Receivables transactions- Usage and sample payload

Hello All,

I have recently working on Oracle Cloud ERP and used web services to create transactions in Receivables module.
I am sharing some sample web service payload as it is extremely difficult to find them online

Invoice Service

URL https//yourserver/fscmService/RecInvoiceService

Operation: createInterfaceLine


Usage: Use this service to create one billing transaction at a time. This will give you more control over data created but this will create one billing transaction at a time. You can use it to create both Invoice or Credit memo (without invoice reference) in real time.

Sample Payload for Invoice: 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://xmlns.oracle.com/apps/financials/receivables/transactions/invoices/invoiceService/types/" xmlns:inv="http://xmlns.oracle.com/apps/financials/receivables/transactions/invoices/invoiceService/" xmlns:tran="http://xmlns.oracle.com/apps/flex/financials/receivables/transactions/autoInvoices/TransactionLineInterfaceLineDff/" xmlns:tran1="http://xmlns.oracle.com/apps/financials/receivables/transactions/autoInvoices/model/flex/TransactionInterfaceGdf/" xmlns:tran2="http://xmlns.oracle.com/apps/financials/receivables/transactions/autoInvoices/model/flex/TransactionLineInterfaceGdf/" xmlns:tran3="http://xmlns.oracle.com/apps/flex/financials/receivables/transactions/autoInvoices/TransactionInterfaceLinkToDff/" xmlns:tran4="http://xmlns.oracle.com/apps/flex/financials/receivables/transactions/autoInvoices/TransactionInterfaceReferenceDff/" xmlns:tran5="http://xmlns.oracle.com/apps/flex/financials/receivables/transactions/autoInvoices/TransactionLineDff/" xmlns:tran6="http://xmlns.oracle.com/apps/flex/financials/receivables/transactions/autoInvoices/TransactionInterfaceHeaderDff/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Header/>
   <soapenv:Body>
      <typ:createInterfaceLine>
          <typ:interfaceLine>
             <inv:OrgId>300000001751545</inv:OrgId>
            <inv:Amount currencyCode="USD">100</inv:Amount>
             <inv:BatchSourceName>Invoice Source</inv:BatchSourceName>
            <inv:CustomerTrxTypeName>Invoice Trans</inv:CustomerTrxTypeName>
            <inv:TrxDate>2020-06-05</inv:TrxDate>
            <inv:CurrencyCode>USD</inv:CurrencyCode>
           <inv:ConversionType>Corporate</inv:ConversionType>
              <inv:Description>CAT Dollars</inv:Description>
            <inv:GlDate>2020-06-05</inv:GlDate>
            <inv:LineType>LINE</inv:LineType>
            <inv:PaymentTermsName>Net 30</inv:PaymentTermsName>
           <inv:BillCustomerAccountNumber>100043514</inv:BillCustomerAccountNumber>
            <inv:BillCustomerSiteNumber>25015</inv:BillCustomerSiteNumber>
            <inv:Quantity unitCode="Ea">1</inv:Quantity>
           <inv:UnitSellingPrice currencyCode="USD">100</inv:UnitSellingPrice>
             <inv:TrxNumber>100043514-7001</inv:TrxNumber>
            <inv:UOMName>Each</inv:UOMName>
           <inv:TransactionInterfaceLineDff  xsi:type="tran:context">
              <tran:__FLEX_Context>Context</tran:__FLEX_Context>
<tran:id>100043514</tran:id>
<tran:number>7002</tran:number>
            </inv:TransactionInterfaceLineDff>
            <inv:TransactionInterfaceHeaderDff  xsi:type="tran6:headerContext">
               <tran6:__FLEX_Context>Header Context</tran6:__FLEX_Context>
    <tran6:id></tran6:id>
   <tran6:code></tran6:code>
            </inv:TransactionInterfaceHeaderDff>        
         </typ:interfaceLine>
      </typ:createInterfaceLine>
   </soapenv:Body>
</soapenv:Envelope>

Please note that payment method is required for invoice but not for credit memo as due date calculation will be based on payment method.
In case you need more details on DFF update, please refer my other blog for DFF value update.

Sample Payload for Credit Memo:


 <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://xmlns.oracle.com/apps/financials/receivables/transactions/invoices/invoiceService/types/" xmlns:inv="http://xmlns.oracle.com/apps/financials/receivables/transactions/invoices/invoiceService/" xmlns:tran="http://xmlns.oracle.com/apps/flex/financials/receivables/transactions/autoInvoices/TransactionLineInterfaceLineDff/" xmlns:tran1="http://xmlns.oracle.com/apps/financials/receivables/transactions/autoInvoices/model/flex/TransactionInterfaceGdf/" xmlns:tran2="http://xmlns.oracle.com/apps/financials/receivables/transactions/autoInvoices/model/flex/TransactionLineInterfaceGdf/" xmlns:tran3="http://xmlns.oracle.com/apps/flex/financials/receivables/transactions/autoInvoices/TransactionInterfaceLinkToDff/" xmlns:tran4="http://xmlns.oracle.com/apps/flex/financials/receivables/transactions/autoInvoices/TransactionInterfaceReferenceDff/" xmlns:tran5="http://xmlns.oracle.com/apps/flex/financials/receivables/transactions/autoInvoices/TransactionLineDff/" xmlns:tran6="http://xmlns.oracle.com/apps/flex/financials/receivables/transactions/autoInvoices/TransactionInterfaceHeaderDff/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Header/>
   <soapenv:Body>
      <typ:fscmService/RecInvoiceService>
          <typ:interfaceLine>
            <inv:OrgId>300000001751545</inv:OrgId>
            <inv:Amount currencyCode="USD">-1000</inv:Amount>
             <inv:BatchSourceName>Credit Memo Source</inv:BatchSourceName>
            <inv:CustomerTrxTypeName>CreditMemo Trans</inv:CustomerTrxTypeName>
            <inv:TrxDate>2020-06-05</inv:TrxDate>
             <inv:CurrencyCode>USD</inv:CurrencyCode>
             <inv:Description>Dollars</inv:Description>
            <inv:GlDate>2020-06-05</inv:GlDate>
            <inv:LineType>LINE</inv:LineType>
           <inv:BillCustomerAccountNumber>10004</inv:BillCustomerAccountNumber>
             <inv:BillCustomerSiteNumber>25015</inv:BillCustomerSiteNumber>
            <inv:Quantity unitCode="Ea">1</inv:Quantity>
            <inv:TrxNumber>7002</inv:TrxNumber>
            <inv:UOMName>Each</inv:UOMName>
           <inv:TransactionInterfaceLineDff  xsi:type="tran:context">
              <tran:__FLEX_Context>Context</tran:__FLEX_Context>
<tran:id>100043514</tran:id>
<tran:number>7002</tran:number>
            </inv:TransactionInterfaceLineDff>
            
            <inv:TransactionInterfaceHeaderDff  xsi:type="tran6:headerContext">
               <tran6:__FLEX_Context>Header Context</tran6:__FLEX_Context>
    <tran6:id></tran6:id>
   <tran6:code></tran6:code>
            </inv:TransactionInterfaceHeaderDff>      
         </typ:interfaceLine>
      </typ:createInterfaceLine>
   </soapenv:Body>
</soapenv:Envelope>

Please note that payment method is required for invoice but not for credit memo as due date calculation will be based on payment method.
In case you need more details on DFF update, please refer my other blog for DFF value update.



Operation: updateInterfaceLine


Usage: Use this service to create billing transactions in bulk. This is more useful for batch operations but provide you limited results in return. You can use it to create both Invoice or Credit memo (without invoice reference)

Sample Payload for Invoice: 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:typ="http://xmlns.oracle.com/apps/financials/receivables/transactions/invoices/invoiceService/types/" 
xmlns:inv="http://xmlns.oracle.com/apps/financials/receivables/transactions/invoices/invoiceService/" 
xmlns:tran="http://xmlns.oracle.com/apps/flex/financials/receivables/transactions/autoInvoices/TransactionLineInterfaceLineDff/" 
xmlns:tran1="http://xmlns.oracle.com/apps/financials/receivables/transactions/autoInvoices/model/flex/TransactionInterfaceGdf/" 
xmlns:tran2="http://xmlns.oracle.com/apps/financials/receivables/transactions/autoInvoices/model/flex/TransactionLineInterfaceGdf/" 
xmlns:tran3="http://xmlns.oracle.com/apps/flex/financials/receivables/transactions/autoInvoices/TransactionInterfaceLinkToDff/" 
xmlns:tran4="http://xmlns.oracle.com/apps/flex/financials/receivables/transactions/autoInvoices/TransactionInterfaceReferenceDff/" 
xmlns:tran5="http://xmlns.oracle.com/apps/flex/financials/receivables/transactions/autoInvoices/TransactionLineDff/" 
xmlns:tran6="http://xmlns.oracle.com/apps/flex/financials/receivables/transactions/autoInvoices/TransactionInterfaceHeaderDff/" 
xmlns:typ1="http://xmlns.oracle.com/adf/svc/types/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Header/>
   <soapenv:Body>
      <typ:processInterfaceLine>
         <typ:changeOperation>Create</typ:changeOperation>
         <!--Zero or more repetitions:-->
         <typ:interfaceLine>
              <inv:OrgId>300000001751545</inv:OrgId>
            <inv:Amount currencyCode="USD">100</inv:Amount>
             <inv:BatchSourceName>Invoice Source</inv:BatchSourceName>
            <inv:CustomerTrxTypeName>Invoice Trans</inv:CustomerTrxTypeName>
            <inv:TrxDate>2020-06-05</inv:TrxDate>
            <inv:CurrencyCode>USD</inv:CurrencyCode>
           <inv:ConversionType>Corporate</inv:ConversionType>
              <inv:Description>CAT Dollars</inv:Description>
            <inv:GlDate>2020-06-05</inv:GlDate>
            <inv:LineType>LINE</inv:LineType>
            <inv:PaymentTermsName>Net 30</inv:PaymentTermsName>
           <inv:BillCustomerAccountNumber>100043514</inv:BillCustomerAccountNumber>
            <inv:BillCustomerSiteNumber>25015</inv:BillCustomerSiteNumber>
            <inv:Quantity unitCode="Ea">1</inv:Quantity>
           <inv:UnitSellingPrice currencyCode="USD">100</inv:UnitSellingPrice>
             <inv:TrxNumber>100043514-7001</inv:TrxNumber>
            <inv:UOMName>Each</inv:UOMName>
<inv:TransactionInterfaceLineDff  xsi:type="tran:context">
              <tran:__FLEX_Context>Context</tran:__FLEX_Context>
<tran:id>100043514</tran:id>
<tran:number>7002</tran:number>
            </inv:TransactionInterfaceLineDff>
            <inv:TransactionInterfaceHeaderDff  xsi:type="tran6:headerContext">
               <tran6:__FLEX_Context>Header Context</tran6:__FLEX_Context>
    <tran6:id></tran6:id>
   <tran6:code></tran6:code>
            </inv:TransactionInterfaceHeaderDff>              
         </typ:interfaceLine>
         <typ:interfaceLine>
              <inv:OrgId>300000001751545</inv:OrgId>
            <inv:Amount currencyCode="USD">100</inv:Amount>
             <inv:BatchSourceName>Invoice Source</inv:BatchSourceName>
            <inv:CustomerTrxTypeName>Invoice Trans</inv:CustomerTrxTypeName>
            <inv:TrxDate>2020-06-05</inv:TrxDate>
            <inv:CurrencyCode>USD</inv:CurrencyCode>
           <inv:ConversionType>Corporate</inv:ConversionType>
              <inv:Description>CAT Dollars</inv:Description>
            <inv:GlDate>2020-06-05</inv:GlDate>
            <inv:LineType>LINE</inv:LineType>
            <inv:PaymentTermsName>Net 30</inv:PaymentTermsName>
           <inv:BillCustomerAccountNumber>100043514</inv:BillCustomerAccountNumber>
            <inv:BillCustomerSiteNumber>25015</inv:BillCustomerSiteNumber>
            <inv:Quantity unitCode="Ea">1</inv:Quantity>
           <inv:UnitSellingPrice currencyCode="USD">100</inv:UnitSellingPrice>
             <inv:TrxNumber>100043514-7002</inv:TrxNumber>
            <inv:UOMName>Each</inv:UOMName>
<inv:TransactionInterfaceLineDff  xsi:type="tran:context">
              <tran:__FLEX_Context>Context</tran:__FLEX_Context>
<tran:id>100043514</tran:id>
<tran:number>7002</tran:number>
            </inv:TransactionInterfaceLineDff>
            <inv:TransactionInterfaceHeaderDff  xsi:type="tran6:headerContext">
               <tran6:__FLEX_Context>Header Context</tran6:__FLEX_Context>
    <tran6:id></tran6:id>
   <tran6:code></tran6:code>
            </inv:TransactionInterfaceHeaderDff>              
</typ:interfaceLine>
         <typ:processControl>
            <typ1:returnMode>Key</typ1:returnMode>
            <typ1:exceptionReturnMode>Key</typ1:exceptionReturnMode>
            <typ1:partialFailureAllowed>true</typ1:partialFailureAllowed>
         </typ:processControl>
      </typ:processInterfaceLine>
   </soapenv:Body>
</soapenv:Envelope>



Please refer Oracle Documentation for more details.