AR invoice creating using Webservice

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

1) Descriptive Flex Field Setup Details.

Query the RA_INTERFACE_LINES Flex field and create the desired context according to the business requirements.
A sample context definition is shown below which will be referred throughout the document.

a) Context Details Screen shot.

Please note down the Context Code and the API name which needs to be used in the web service invocation.
b) Segment Details of the Context

Please note down the API name which needs to be used in the web service invocation.
Also make sure the Descriptive Flex field is deployed properly after the changes and the deployment status shows as
SUCCESS
2) A sample web service to create multi-line invoices.

The below payload contains four order lines of a particular order.

 Order line 1 = Item line


 Order line 2 = Description Line
 Order Line 3 = Memo Line
 Order Line 4 = Freight Line ( Header level freight for the order )

The Points to note in the payload are

 processInterfaceLine is the operation that supports loading of multiple order lines in one web service call.
 changeOperation value has to be “Create”.
 interfaceLine Xml Tag contains the values for one interface line record. Supplying multiple tags in the payload
will correspond to entry of multiple order lines.
 The xsi namespace has to be declared as shown in the payload.
 While passing the values for the Descriptive Flex field, the value for xsi:Type has to be passed. This value is
nothing but the API name of the Context that is obtained in Step 1.
 The Xml Tag Names for the DFF segment are the API names of the segment obtained in Step 1.

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns1:processInterfaceLine
xmlns:ns1="http://xmlns.oracle.com/apps/financials/receivables/transactions/invoices/invoiceService/types/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ns1:changeOperation>Create</ns1:changeOperation>
<ns1:interfaceLine xmlns:ns2="http://xmlns.oracle.com/apps/financials/receivables/transactions/invoices/invoiceService/">
<ns2:OrgId>204</ns2:OrgId>
<ns2:BillCustomerAccountNumber>1009</ns2:BillCustomerAccountNumber>
<ns2:BillCustomerSiteNumber>1004</ns2:BillCustomerSiteNumber>
<ns2:BatchSourceName>Sample Imported Batch Source</ns2:BatchSourceName>
<ns2:CurrencyCode>USD</ns2:CurrencyCode>
<ns2:CustomerTrxTypeName>Invoice</ns2:CustomerTrxTypeName>
<ns2:ItemNumber>AS10000</ns2:ItemNumber>
<ns2:Description>Envoy Standard Laptop</ns2:Description>
<ns2:LineType>LINE</ns2:LineType>
<ns2:Quantity>113</ns2:Quantity>
<ns2:PaymentTermsName>30 Net</ns2:PaymentTermsName>
<ns2:SalesOrder>1001</ns2:SalesOrder>
<ns2:SalesOrderDate>2015-04-03</ns2:SalesOrderDate>
<ns2:UnitSellingPrice>1510.3</ns2:UnitSellingPrice>
<ns2:UOMName>Each</ns2:UOMName>
<ns2:ContractStartDate>2015-04-03</ns2:ContractStartDate>
<ns2:ContractEndDate>2015-04-03</ns2:ContractEndDate>
<ns2:TransactionInterfaceLineDff
xmlns:ns3="http://xmlns.oracle.com/apps/flex/financials/receivables/transactions/autoInvoices/TransactionLineInterfaceLineDff/"
xsi:type="ns3:SampleContext">
<ns3:__FLEX_Context>SAMPLE_CONTEXT</ns3:__FLEX_Context>
<ns3:orderNumber>1001</ns3:orderNumber>
<ns3:orderLineNumber>1</ns3:orderLineNumber>
</ns2:TransactionInterfaceLineDff>
</ns1:interfaceLine>
<ns1:interfaceLine xmlns:ns2="http://xmlns.oracle.com/apps/financials/receivables/transactions/invoices/invoiceService/">
<ns2:OrgId>204</ns2:OrgId>
<ns2:BillCustomerAccountNumber>1009</ns2:BillCustomerAccountNumber>
<ns2:BillCustomerSiteNumber>1004</ns2:BillCustomerSiteNumber>
<ns2:BatchSourceName>Sample Imported Batch Source</ns2:BatchSourceName>
<ns2:CurrencyCode>USD</ns2:CurrencyCode>
<ns2:CustomerTrxTypeName>Invoice</ns2:CustomerTrxTypeName>
<ns2:Description>Envoy Standard Laptop</ns2:Description>
<ns2:LineType>LINE</ns2:LineType>
<ns2:Quantity>13</ns2:Quantity>
<ns2:PaymentTermsName>30 Net</ns2:PaymentTermsName>
<ns2:SalesOrder>1001</ns2:SalesOrder>
<ns2:SalesOrderDate>2015-04-03</ns2:SalesOrderDate>
<ns2:UnitSellingPrice>15330.33</ns2:UnitSellingPrice>
<ns2:UOMName>Each</ns2:UOMName>
<ns2:ContractStartDate>2015-04-03</ns2:ContractStartDate>
<ns2:ContractEndDate>2015-04-03</ns2:ContractEndDate>
<ns2:TransactionInterfaceLineDff
xmlns:ns3="http://xmlns.oracle.com/apps/flex/financials/receivables/transactions/autoInvoices/TransactionLineInterfaceLineDff/"
xsi:type="ns3:SampleContext">

<ns3:__FLEX_Context>SAMPLE_CONTEXT</ns3:__FLEX_Context>
<ns3:orderNumber>1001</ns3:orderNumber>
<ns3:orderLineNumber>2</ns3:orderLineNumber>
</ns2:TransactionInterfaceLineDff>
</ns1:interfaceLine>
<ns1:interfaceLine xmlns:ns2="http://xmlns.oracle.com/apps/financials/receivables/transactions/invoices/invoiceService/">
<ns2:OrgId>204</ns2:OrgId>
<ns2:BillCustomerAccountNumber>1009</ns2:BillCustomerAccountNumber>
<ns2:BillCustomerSiteNumber>1004</ns2:BillCustomerSiteNumber>
<ns2:BatchSourceName>Sample Imported Batch Source</ns2:BatchSourceName>
<ns2:CurrencyCode>USD</ns2:CurrencyCode>
<ns2:CustomerTrxTypeName>Invoice</ns2:CustomerTrxTypeName>
<ns2:MemoLineName>AR_Memo_Line_04</ns2:MemoLineName>
<ns2:Description>Memo Line Line</ns2:Description>
<ns2:LineType>LINE</ns2:LineType>
<ns2:Quantity>46</ns2:Quantity>
<ns2:PaymentTermsName>30 Net</ns2:PaymentTermsName>
<ns2:SalesOrder>1001</ns2:SalesOrder>
<ns2:SalesOrderDate>2015-04-03</ns2:SalesOrderDate>
<ns2:UnitSellingPrice>2600.50</ns2:UnitSellingPrice>
<ns2:UOMName>Each</ns2:UOMName>
<ns2:ContractStartDate>2015-04-03</ns2:ContractStartDate>
<ns2:ContractEndDate>2015-04-03</ns2:ContractEndDate>
<ns2:TransactionInterfaceLineDff
xmlns:ns3="http://xmlns.oracle.com/apps/flex/financials/receivables/transactions/autoInvoices/TransactionLineInterfaceLineDff/"
xsi:type="ns3:SampleContext">
<ns3:__FLEX_Context>SAMPLE_CONTEXT</ns3:__FLEX_Context>
<ns3:orderNumber>1001</ns3:orderNumber>
<ns3:orderLineNumber>3</ns3:orderLineNumber>
</ns2:TransactionInterfaceLineDff>
</ns1:interfaceLine>
<ns1:interfaceLine xmlns:ns2="http://xmlns.oracle.com/apps/financials/receivables/transactions/invoices/invoiceService/">
<ns2:OrgId>204</ns2:OrgId>
<ns2:BillCustomerAccountNumber>1009</ns2:BillCustomerAccountNumber>
<ns2:BillCustomerSiteNumber>1004</ns2:BillCustomerSiteNumber>
<ns2:BatchSourceName>Sample Imported Batch Source</ns2:BatchSourceName>
<ns2:CurrencyCode>USD</ns2:CurrencyCode>
<ns2:CustomerTrxTypeName>Invoice</ns2:CustomerTrxTypeName>
<ns2:LineType>FREIGHT</ns2:LineType>
<ns2:Description>Freight Line</ns2:Description>
<ns2:Quantity>1</ns2:Quantity>
<ns2:PaymentTermsName>30 Net</ns2:PaymentTermsName>
<ns2:SalesOrder>1001</ns2:SalesOrder>
<ns2:SalesOrderDate>2015-04-03</ns2:SalesOrderDate>
<ns2:UnitSellingPrice>4500.50</ns2:UnitSellingPrice>
<ns2:UOMName>Each</ns2:UOMName>
<ns2:ContractStartDate>2015-04-03</ns2:ContractStartDate>
<ns2:ContractEndDate>2015-04-03</ns2:ContractEndDate>
<ns2:TransactionInterfaceLineDff
xmlns:ns3="http://xmlns.oracle.com/apps/flex/financials/receivables/transactions/autoInvoices/TransactionLineInterfaceLineDff/"
xsi:type="ns3:SampleContext">
<ns3:__FLEX_Context>SAMPLE_CONTEXT</ns3:__FLEX_Context>
<ns3:orderNumber>1001</ns3:orderNumber>
<ns3:orderLineNumber>4</ns3:orderLineNumber>
</ns2:TransactionInterfaceLineDff>
</ns1:interfaceLine>
</ns1:processInterfaceLine>
</soap:Body>
</soap:Envelope>

Steps to convert the order lines into the receivables invoice

1) Use the above payload and invoke the web service operation – processInterfaceLine of InvoiceService.
2) After successful invocation, submit the Import Auto Invoice ESS process for the Batch source and other relevant
parameters.
3) Verify the Report of the ESS process and check if all the lines have been successfully processed.
4) Query the Invoice on the Manage Transactions UI
A screen shot of the invoice is shown below

3) A sample ADF web service to show all the cases with the combination of using the original bill-to
and ship-to information.

The Values that need to be passed to the service parameters are no different than the values that are being passed today using the
AutoInvoice Template to load data into the interface tables.
A Sample payload is given below that populates the customer related values.

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns1:processInterfaceLine
xmlns:ns1="http://xmlns.oracle.com/apps/financials/receivables/transactions/invoices/invoiceService/types/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ns1:changeOperation>Create</ns1:changeOperation>
<ns1:interfaceLine xmlns:ns2="http://xmlns.oracle.com/apps/financials/receivables/transactions/invoices/invoiceService/">
<ns2:OrgId>204</ns2:OrgId>
<ns2:OrigSystemBillCustomerReference>1004</ns2:OrigSystemBillCustomerReference>
<ns2:OrigSystemShipCustomerReference>1004</ns2:OrigSystemShipCustomerReference>
<ns2:OrigSystemBillAddressReference>1030</ns2:OrigSystemBillAddressReference>
<ns2:OrigSystemShipAddressReference>1030</ns2:OrigSystemShipAddressReference>
<ns2:BatchSourceName>Sample Imported Batch Source</ns2:BatchSourceName>
<ns2:CurrencyCode>USD</ns2:CurrencyCode>
<ns2:CustomerTrxTypeName>Invoice</ns2:CustomerTrxTypeName>
<ns2:ItemNumber>AS10000</ns2:ItemNumber>
<ns2:Description>Envoy Standard Laptop</ns2:Description>
<ns2:LineType>LINE</ns2:LineType>
<ns2:Quantity>113</ns2:Quantity>
<ns2:PaymentTermsName>30 Net</ns2:PaymentTermsName>
<ns2:SalesOrder>1002</ns2:SalesOrder>
<ns2:SalesOrderDate>2015-04-03</ns2:SalesOrderDate>
<ns2:UnitSellingPrice>1510.3</ns2:UnitSellingPrice>
<ns2:UOMName>Each</ns2:UOMName>
<ns2:ContractStartDate>2015-04-03</ns2:ContractStartDate>
<ns2:ContractEndDate>2015-04-03</ns2:ContractEndDate>
<ns2:TransactionInterfaceLineDff
xmlns:ns3="http://xmlns.oracle.com/apps/flex/financials/receivables/transactions/autoInvoices/TransactionLineInterfaceLineDff/"
xsi:type="ns3:SampleContext">
<ns3:__FLEX_Context>SAMPLE_CONTEXT</ns3:__FLEX_Context>
<ns3:orderNumber>1002</ns3:orderNumber>
<ns3:orderLineNumber>1</ns3:orderLineNumber>
</ns2:TransactionInterfaceLineDff>
</ns1:interfaceLine>
<ns1:interfaceLine
xmlns:ns2="http://xmlns.oracle.com/apps/financials/receivables/transactions/invoices/invoiceService/">
<ns2:OrgId>204</ns2:OrgId>
<ns2:OrigSystemBillCustomerReference>1004</ns2:OrigSystemBillCustomerReference>
<ns2:OrigSystemShipCustomerReference>1004</ns2:OrigSystemShipCustomerReference>
<ns2:OrigSystemBillAddressReference>1030</ns2:OrigSystemBillAddressReference>
<ns2:OrigSystemShipAddressReference>1030</ns2:OrigSystemShipAddressReference>
<ns2:BatchSourceName>Sample Imported Batch Source</ns2:BatchSourceName>
<ns2:CurrencyCode>USD</ns2:CurrencyCode>
<ns2:CustomerTrxTypeName>Invoice</ns2:CustomerTrxTypeName>
<ns2:LineType>FREIGHT</ns2:LineType>
<ns2:Description>Freight Line</ns2:Description>
<ns2:Quantity>1</ns2:Quantity>
<ns2:PaymentTermsName>30 Net</ns2:PaymentTermsName>
<ns2:SalesOrder>1002</ns2:SalesOrder>
<ns2:SalesOrderDate>2015-04-03</ns2:SalesOrderDate>
<ns2:UnitSellingPrice>4500.50</ns2:UnitSellingPrice>
<ns2:UOMName>Each</ns2:UOMName>
<ns2:ContractStartDate>2015-04-03</ns2:ContractStartDate>
<ns2:ContractEndDate>2015-04-03</ns2:ContractEndDate>
<ns2:TransactionInterfaceLineDff
xmlns:ns3="http://xmlns.oracle.com/apps/flex/financials/receivables/transactions/autoInvoices/TransactionLineInterfaceLineDff/"
xsi:type="ns3:SampleContext">
<ns3:__FLEX_Context>SAMPLE_CONTEXT</ns3:__FLEX_Context>
<ns3:orderNumber>1002</ns3:orderNumber>
<ns3:orderLineNumber>2</ns3:orderLineNumber>
</ns2:TransactionInterfaceLineDff>
</ns1:interfaceLine>
</ns1:processInterfaceLine>
</soap:Body>
</soap:Envelope>

Steps to convert the order lines into the receivables invoice

1) Use the above payload and invoke the web service operation – processInterfaceLine of InvoiceService.
2) After successful invocation, submit the Import Auto Invoice ESS process for the Batch source and other relevant
parameters.
3) Verify the Report of the ESS process and check if all the lines have been successfully processed.
4) Query the Invoice on the Manage Transactions UI
A screen shot of the invoice is shown below
4) A sample ADF web service to show how to use the account #, site level attributes etc.

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns1:processInterfaceLine
xmlns:ns1="http://xmlns.oracle.com/apps/financials/receivables/transactions/invoices/invoiceService/types/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ns1:changeOperation>Create</ns1:changeOperation>
<ns1:interfaceLine xmlns:ns2="http://xmlns.oracle.com/apps/financials/receivables/transactions/invoices/invoiceService/">
<ns2:OrgId>204</ns2:OrgId>
<ns2:BillCustomerAccountNumber>1009</ns2:BillCustomerAccountNumber>
<ns2:BillCustomerSiteNumber>1004</ns2:BillCustomerSiteNumber>
<ns2:ShipCustomerAccountNumber>1009</ns2:ShipCustomerAccountNumber>
<ns2:ShipCustomerSiteNumber>1004</ns2:ShipCustomerSiteNumber>
<ns2:BatchSourceName>Sample Imported Batch Source</ns2:BatchSourceName>
<ns2:CurrencyCode>USD</ns2:CurrencyCode>
<ns2:CustomerTrxTypeName>Invoice</ns2:CustomerTrxTypeName>
<ns2:ItemNumber>AS10000</ns2:ItemNumber>
<ns2:Description>Envoy Standard Laptop</ns2:Description>
<ns2:LineType>LINE</ns2:LineType>
<ns2:Quantity>113</ns2:Quantity>
<ns2:PaymentTermsName>30 Net</ns2:PaymentTermsName>
<ns2:SalesOrder>1003</ns2:SalesOrder>
<ns2:SalesOrderDate>2015-04-03</ns2:SalesOrderDate>
<ns2:UnitSellingPrice>1510.3</ns2:UnitSellingPrice>
<ns2:UOMName>Each</ns2:UOMName>
<ns2:ContractStartDate>2015-04-03</ns2:ContractStartDate>
<ns2:ContractEndDate>2015-04-03</ns2:ContractEndDate>
<ns2:TransactionInterfaceLineDff
xmlns:ns3="http://xmlns.oracle.com/apps/flex/financials/receivables/transactions/autoInvoices/TransactionLineInterfaceLineDff/"
xsi:type="ns3:SampleContext">
<ns3:__FLEX_Context>SAMPLE_CONTEXT</ns3:__FLEX_Context>
<ns3:orderNumber>1003</ns3:orderNumber>
<ns3:orderLineNumber>1</ns3:orderLineNumber>
</ns2:TransactionInterfaceLineDff>
</ns1:interfaceLine>
</ns1:processInterfaceLine>
</soap:Body>
</soap:Envelope>

5) createSimpleInvoice web service operation and its limitation.

o This operation is used to create simple invoices in the system directly rather than using Auto Invoice Import Ess Process.
o After successful completion of the Web service invocation , the invoice is created into the system in complete state.
o Only one invoice but with multiple lines can be created using one web service call.
o There are a few attributes exposed on the web service operation and all the functionality around that attributes can be
achieved.
o Invoice with Rules / Sales Credits and other advanced invoices cannot be created via this operation.

6) CreateInterfaceLine and ProcessInterfaceLine

 CreateInterfaceLine supports only loading of one interface line in a web service call.
 ProcessInterfaceLine supports loading of multiple interface lines in one web service call.

7) Values for changeOperation in the SOAP

o Create - This is to create a interface line via the payload.

You might also like