Autoinvoice Setup
Autoinvoice Setup
Common Accounts configuration pertains to the Accounting Flexfield setup. This is done in the
Oracle Fusion General Ledger application. The assumption of this case study is that you have
already defined your accounting flexfield segments, and can create and complete manual
transactions using the Transaction Workbench.
Oracle Fusion Receivables uses the transaction flexfields to uniquely identify each transaction
line that is imported though AutoInvoice.
For this case study, you need to setup a Line Transaction Flexfield as shown below.
For additional information on Transaction Flexfields, please review Note 1358419.1
The data you insert into the interface table will be associated to a particular transaction type.
Create an invoice transaction type which will be used when we insert data into the Interface
table.
Note: If you also want to run a test case to import a Credit memo, create a Credit Memo
transaction type as shown below, otherwise you don't need to create a Credit Memo transaction
type.
The following screenshot shows the Credit Memo transaction type: TIP CM
The following screenshot shows the Invoice transaction type: TIP INVOICE
To see more details on how to create new transaction types, please refer to Note 1347608.1,
Setting Up Transaction Types In Oracle Fusion Receivables
Please note that if you want to use the AutoAccounting functionality (next task), and some of the
segments of the Account are sourced from the transaction type, then you must define GL
accounts in the Reference Accounts section when you created the transaction type.
AutoAccounting enables you to create default accounts for revenue, receivable, freight, tax,
unearned revenue, unbilled receivable, late charges, bills receivables accounts, and AutoInvoice
clearing (suspense) accounts.
In the following screen, the source for the third segment is 'Transaction Types'. When the default
accounting is generated for the Receivable account, the accounting flexfield will pull the third
segment from the Receivables account defined for the transaction type. If we cross-reference this
to the screenshot from the previous task, the value for the third segment is 1210, coming from
01-000-1210-0000-000 defined for Receivables account.
During AutoInvoice, you are interfacing data with the intention of creating complete transactions
automatically. Hence, you are advised to complete the setup for AutoAccounting so that
AutoInvoice can determine the GL accounts to use for your interfaced transactions, and process
them completely without errors and without the need for manual intervention.
To see how to manage and setup AutoAccounting, please refer to Note 1347760.1 Setting Up
AutoAccounting Rules In Oracle Fusion Receivables
If you want the data in your interface table to be created in a particular sort order, define Line
Ordering Rules.
The following screenshot shows a Line Ordering Rule, that references the same fields we used in
the Line transaction flexfield defined in Task 2 above.
To see how to manage and setup AutoInvoice Line Ordering Rules, please refer to Note
1354161.1, Setting Up AutoInvoice Line Ordering Rules in Oracle Fusion Receivables
Grouping rules specify attributes that must be identical for lines to be created as one transaction.
Grouping rules always include the mandatory attributes, and to this is added optional attributes
that you define in your grouping rule.
The following screenshot shows a Grouping Rule that uses the Line Ordering Rule defined in
Task 5 above.
To see how to manage and setup AutoInvoice Grouping Rules, please refer to Note 1354222.1,
Setting Up AutoInvoice Grouping Rules in Oracle Fusion Receivables
Payment terms let you define the due date to be calculated for transactions. When you interface
data, it is mandatory to provide either a TERM_ID or a TERM_NAME in the
RA_INTERFACE_LINES_ALL table (depending on how you have set up your transaction batch
source). Although there is a defaulting mechanism for payment term when entering transactions
manually in the form, this is defaulting is not available during AutoInvoice, because it would
significantly slow down the performance of the process.
The following screenshot shows a Payment term we will use in our interface data.
To see how to manage and setup Payment Terms, please refer to Note 1356788.1, Setting Up
Payment Terms in Oracle Fusion Receivables
Batch sources define default information such as transaction type and automatic numbering.
There are two types available: Manual and Imported. AutoInvoice requires a batch of type
Imported.
The following screenshot shows a Transaction source we will use to interface data via
AutoInvoice. Highlighted below is the transaction type we created earlier, here we are
associating it to this Imported Batch Source.
To see how to manage and setup Transaction Sources, please refer to Note 1356812.1, Setting
Up Transaction Sources in Oracle Fusion Receivables
To default a payment method to the transactions you interface via AutoInvoice, you need to
define a Receipt Class and Method for your transaction to use.
To see how to manage and setup Receipt Classes and Methods, please refer to Note 1356865.1,
Setting Up Receipt Class and Methods in Oracle Fusion Receivables
If necessary, you can define different customer profile classes to categorize your customers. You
can associate Customer Profile classes to customer records you create later. By using a profile
class you default certain attributes/fields into the customer records to make customer
maintenance more efficient.
The following screenshot defines a new customer profile class, to which we associate the
Payment Term from Task 7 and the grouping rule from Task 6.
To see how to manage and setup Customer Profile Classes, please refer to Note 1369503.1
Create customer record to use for interface data, at this point we reference various setup data we
created earlier.
We associate to this customer record the customer profile created in Task 10, the payment term
from Task 7 and the Grouping Rule from Task 6 created earlier.
Then switch to Manage Customers to edit the profile, Query up the same customer.
and click on the link for Account Number and associate the setups created earlier.
To see how to Create Customer Records, please refer to Note xxx.x
The settings in System Options that impact AutoInvoice are in the Trans and Customers tab. The
following screenshot shows recommended settings for fields in the 'AutoInvoice' Section. Also
highlighted is the Grouping rule we defined earlier.
To see how to Manage Receivable System Options, please refer to Note 1358495.1
Open or close periods in your accounting calendar to control the recording of accounting
information for these periods. Since the objective of AutoInvoice is to create new transactions,
the goal is to have these transactions impact open GL periods.
Ensure that the GL_DATE value you provide in the next task is within an open period.
To see how to Manage Receivable Accounting Periods, please refer to Note 1358499.1
Define a Remit-To Address so that customers know where to send payment for their invoices.
At this point we have completed the bare minimum setup required to enable us to insert data into
the interface table and have it processed by AutoInvoice to create a transaction in the core AR
tables.
The following section gives you sample scripts to populate the table for various scenarios.
Note:
For a detailed discussion of the fields in RA_INTERFACE_LINES_ALL, please review Note
1195997.1, Description and Usage of Fields in RA_INTERFACE_LINES Table.
COMMIT;
For some fields, we pass constant values and for other fields we need to provide values that tie in
with the setup we created in Tasks 1 - 14 above. The following section explains how to
determine the ID values created during the setup.
INTERFACE_LINE_CONTEXT - identifies the Transaction Flexfield used by the
interface data; this helps AutoInvoice understand what data is being passed in the
interface table's fields. The value here ties in with the setup created in Task 2, where we
created the Line Transaction Flexfield = 'TIP Flexfield'.
Use the values = 'TIP SAMPLE INVOICE 1' and 'TIP SAMPLE INVOICE 1'
AMOUNT - this field contains the value of your transaction; pass in a constant. This
value should be the product of the numbers you pass in for QUANTITY *
UNIT_SELLING_PRICE.
BATCH_SOURCE_NAME - the value you specify here identifies the transaction batch
source to be used by AutoInvoice when interfacing this transaction. In Task 8, we created
the Batch Source 'TIP BATCH SOURCE'.
CONVERSION_TYPE - Specify the conversion rate type, for our test case we will use
'User'.
CURRENCY_CODE - Indicate the currency code of the transaction, for our test case we
will use 'USD'.
GL_DATE - the value you specify here will be used by AutoInvoice as the GL_DATE
of your transaction. Typically the period in which this GL_DATE value falls should be
an open period.
ORIG_SYSTEM_BILL_ADDRESS_ID and
ORIG_SYSTEM_BILL_CUSTOMER_ID - identifies the Address ID and Customer
ID associated to the invoice.
TERM_ID - identifies the term ID associated with the setup created in Task 7.
select term_id
from ra_terms_tl
where name = 'TIP TERM';
The set of books id is associated to your Operating Unit. If you know your operating unit ID,
you can run the following:
select set_of_books_id
from ar_system_parameters_all
where org_id = &org_id;
ORG_ID - indicates the ID of the Operating Unit against which this transaction is
created.
Use the value = 204
This following script will create a Credit Memo against the Invoice created above. The text
highlighted in bold are the pertinent changes from the insert script for the Invoice.
OPTION 1:
Using REFERENCE_LINE_CONTEXT and REFERENCE_LINE_ATTRIBUTE* Fields.
This method can be used when the Invoice you are crediting was also created from AutoInvoice,
and has the REFERENCE* fields populated. If you need to credit an Invoice that does not have
REFERENCE* fields populated (i.e. it was not created via AutoInvoice) you can use OPTION 2
below.
The following section explains how to determine the ID values created during the setup. Many of
the fields are the same as the insert statement used for the Invoice. We will focus on the things
that changed.
INTERFACE_LINE_ATTRIBUTE1 and
INTERFACE_LINE_ATTRIBUTE2 - the combination of values in these two
fields uniquely identify the transaction you are creating.
Use the values = 'TIP SAMPLE CM #1' and 'TIP SAMPLE CM #1'
REFERENCE_LINE_CONTEXT
REFERENCE_LINE_ATTRIBUTE1
REFERENCE_LINE_ATTRIBUTE2
These fields associate this credit memo to an invoice, the values in these fields need to match the
INTERFACE_LINE* fields of the invoice, because this is how you are telling Autoinvoice
which Invoice you want to apply this Credit memo to.
AMOUNT - this field contains the value of your credit memo; pass in a constant.
This value should be the product of the numbers you pass in for QUANTITY *
UNIT_SELLING_PRICE.
TERM_ID
It is important to understand that a Credit Memo does not have a payment term, and this field
should be left NULL
OPTION 2:
Using REFERENCE_LINE_ID.
You can use this method to credit any transaction, whether it was created manually or via
AutoInvoice.
The following section explains how to determine the ID values created during the setup. Many of
the fields are the same as the insert statement for Option 1 above, we will focus on the
difference.
The following script will create an On-Account credit memo. This script does not use any of the
REFERENCE_* fields because this credit memo is not associated to any invoice.
INSERT INTO ra_interface_lines_all
(interface_line_context, interface_line_attribute1, interface_line_attribute2,
amount, batch_source_name, conversion_rate,
conversion_type, currency_code, cust_trx_type_seq_id,
description, gl_date, line_type,
orig_system_bill_address_id, orig_system_bill_customer_id, quantity,
unit_selling_price, term_id, taxable_flag,
amount_includes_tax_flag, set_of_books_id, org_id,
created_by, creation_date, last_updated_by,
last_update_date, object_version_number)
VALUES
('TIP', 'TIP SAMPLE ON-ACCT CM 1', 'TIP SAMPLE ON-ACCT CM 1',
-1000, 'TIP BATCH SOURCE', 1,
'User', 'USD', 100000156011150,
'TIP SAMPLE ON-ACCT CM 1 - ITEM #1', '17-Aug-2011', 'LINE',
100000181905793, 100000181905792, -10,
100, null, 'Y',
'N', 1, 204,
'BILLING_MGR_OPERATIONS', '17-Aug-2011', 'BILLING_MGR_OPERATIONS',
'17-Aug-2011', 1);
The following section explains how to determine the ID values created during the setup. Many of
the fields are the same as for the insert for Invoice above, we will focus on the differences:
INTERFACE_LINE_ATTRIBUTE1 and
INTERFACE_LINE_ATTRIBUTE2 - the combination of values in these two
fields uniquely identify the transaction you are creating.
Use the values = 'TIP SAMPLE ON-ACCT CM 1' and 'TIP SAMPLE ON-ACCT CM 1'
AMOUNT - this field contains the value of your credit memo; pass in a constant.
This value should be the product of the numbers you pass in for QUANTITY *
UNIT_SELLING_PRICE.
TERM_ID
It is important to understand that a Credit Memo does not have a payment term, and this field
should be left NULL
Notes:
If you have setup AutoAccounting and would like to use the GL accounts derived
by your setup, you do not have to pass in data in
RA_INTERFACE_DISTRIBUTIONS_ALL. The GL distributions and GL
accounts will be automatically created for your transactions.
When passing GL distributions, AutoAccounting will be used to derive the GL
accounts of all accounting distributions that are not explicitly provided in
RA_INTERFACE_DISTRIBUTIONS_ALL.
In the following script, we interface an Invoice and pass in distributions for the Revenue and
Receivable account. The setup in this instance will create Rounding rows, and since we do not
explicitly pass in that distribution, it will derive the GL account from the AutoAccounting setup.
COMMIT;
For an explanation of the fields/values used for the insert statement, please review the first
example script above, the values used are similar.
The following provides an explanation of the fields/values used for the 2nd and 3rd insert
statements:
AMOUNT - this field contains the value associated to the GL distribution you are
creating; pass in a constant. For the REC account, this should be the sum of all the
LINE, TAX and FREIGHT amounts in RA_INTERFACE_LINES_ALL for this
particular transaction.
Use the value = 100.00 (for both REC and REV)
Use the value = 12833 (for REC) and 107410 (for REV)
INTERFACE_LINE_ATTRIBUTE1 and
INTERFACE_LINE_ATTRIBUTE2 - the combination of values in these two
fields uniquely identify the transaction you are creating.
Use the values = 'TIP DIST INVOICE #1' and 'TIP DIST INVOICE SAMPLE'
ORG_ID - indicates the ID of the Operating Unit against which this transaction is
created.
Once the data is inserted into the Interface table, we are ready to submit the AutoInvoice Import
Process
Fill in parameters, in this case, Batch Source Name is sufficient to identify the data we want to
import. In most cases, you also provide the Customer or Transaction number range to limit the
data to process.
Click on Submit
Go back to process monitor to check the status of the process. Once status changes to Succeeded,
you can click on the Succeeded link to open up the process details, if you scroll all the way
down, you can see the output and log files.
To verify whether AutoInvoice created the invoice successfully, view the invoice in the
Transaction workbench.
To automatically purge the AutoInvoice Interface tables after running AutoInvoice, check the
Purge Interface Tables box in the receivables system options. If you check this box, Receivables
deletes the records that have successfully transferred into permanent Receivables tables. Do not
check this box if you want to submit the AutoInvoice Purge program manually after running
AutoInvoice.
r>Troubleshooting Tip: De-select this setting when troubleshooting records that seem to be
importing incorrectly such as when grouping rules are not being honored or line ordering appears
incorrect. This will allow you to review the data as it looked in the interface table and after it has
imported.
For more on the purge process please see Note 1127413.1 Understanding and Troubleshooting
AutoInvoice Purge