Running the Transaction API
You can run the Transaction API from the transaction entry screen in your system or from a feeder program that transfers multiple transactions from your system into Receivables.
The Transaction API does not create transactions in batch mode. You need to submit data to the API once for each transaction you want to create in Receivables. In addition, the Transaction API does not automatically consolidate header freight lines; the API imports each freight line as a separate line invoice line.
Creating Transactions
To create transactions using the Transaction API:
1. Call the API library functions from your feeder system to determine the IDs and default values for one or more of the new transaction columns (optional). The Transaction API only accepts the internal IDs of columns that are foreign keys to the Receivables tables, and the API does not perform this value-to-id conversion automatically. For a list of the columns that support value-to-id conversion and defaulting, see: Transaction API Matrix.
2. Populate PL/SQL records that correspond to the API's parameters. Some columns in the parameter records should not be populated (for a list of these columns, see: Transaction API Matrix). The p_batch_rec parameter is always optional, but the other parameters (except p_header_rec) are optional when they would not be required in the Transaction windows.
3. Call the Create_Transaction() routine to insert your transaction. You must call this routine once for each transaction you want to create in Receivables, so be sure to provide all information required to create the transaction. The API will return a completion status and, if the call was successful, the customer_trx_id of the new transaction.
If the transaction fails validation, the API will display a list of errors. See: Error Handling. In this case, fix the error(s) in your system, then call Create_Transaction() again.
Updating Transactions
You can use the Transaction API to update your transactions after they have been imported into Receivables. You may not be able to update certain transactions if, for example, they have been printed or posted to your general ledger. To see a list of the fields and transactions you can update, see: Maintaining Your Transactions.
To update transactions using the Transaction API:
1. Use the Get_Transaction() routine to populate your PL/SQL tables with the current transaction data.
2. Change any values you wish to update in these tables (optional).
3. Call the Update_Transaction() routine with the modified parameters. The API will return a completion status and, if the call was unsuccessful, a list of errors. See: Error Handling.
4. Resolve any errors, then call Update_Transaction() again.
Deleting Transactions
You can use the Transaction API to delete a transaction in Receivables if the transaction has no activity against it. For more information, see: Maintaining Your Transactions.
To delete transactions using the Transaction API:
1. Call the Delete_Transaction() routine, specifying the customer_trx_id of the transaction you wish to delete. The API will return a completion status and, if the call was unsuccessful, a list of errors. See: Error Handling.
2. Resolve any errors, then call Delete_Transaction() again.
See Also
Transaction API Matrix